# CDC ACM Class Modem Example

This example will, upon connection of a CDC ACM device, issue a set of AT commands and display the results on the console. Note that in order to correctly execute this example, you will need a CDC ACM USB device that supports the AT commands.

The example accomplishes the following tasks:

• Initialize the CDC base class
• Initialize the ACM subclass
• Call the CDC base class Post Init function to inform the base class that all the subclasses have been initialized
• Allocate a buffer that is used to issue the AT commands and that holds the returned data
• Create a kernel task that will handle the AT commands issuing and that is triggered when a CDC ACM device is connected

• Wait for the connection of a CDC ACM device
• Set a proper line coding
• Set the control line state
• Issue the following AT commands, and read and display the result:
• ATQ0V1E0
• ATI0
• ATI1
• ATI2
• ATI3
• ATI7

The example will also display the serial state changes on the console.

## Location

The example implementation is located in /examples/usb/host/ex_usbh_cdc_acm_modem.c.

## API

This example offers only one API named Ex_USBH_CDC_ACM_Init(). This function is normally called from a USB host core example.