AnsweredAssumed Answered

MQX CDC ACM Communication

Question asked by kiran kunnath on Oct 29, 2013
Latest reply on Dec 7, 2013 by mauricioscalerandi

Hello All,

     I need to connect a USB CDC ACM modem device to the MCU. I have to send and receive data packets to and from modem through USB interface. My modem device is having a UART interface for controlling the modem with AT commands. I have gone through MQX example for USB host CDC device. In this example, as per my understanding, after reading data from UART hyper-terminal, it will  write to the device through USB interface. And after reading data from the device through USB interface, it will display the data in hyper-terminal by UART.

For me i need to send a data buffer to modem. For this can i pass data "myBuffer" directly to the below API in the cdc_serial.c,without using UART APIs?

 

fwrite( myBuffer, sizeof(buffer[0]), num, f_usb);in the cdc_serial.c ?

 

Similarly For reading data from modem to my local buffer, can i directly use the API

 

fread(myBuffer, 1, sizeof(myBuffer) / sizeof(myBuffer[0]) - num, f_usb);?

 

All the enumeration should be done with this example code cdc_serial.c?

 

I don't have much idea about the CDC ACM communication.

One  basic question,

What is the relation between CDC ACM device and USB COM communication? I went through different documents, still i have some confusion.

When i connect a cdc device to the host MCU, the device will be considered as a USB device or UART device?

 

Please help me to solve this issue.

 

Thanks in advance,

Kiran

Outcomes