Hello All , I will ask the same issue in a better way.......
I need to connect a USB CDC ACM modem device to the MCU-tWRK60D100.
Modem-MCU is having 2 communication interface. One usb and one UART.
I have to send and receive data to and from modem through USB interface .
And UART interface for controlling the modem with AT commands.
I have few queries regarding this setup. I will ask one by one.
1) I don't have much idea about the CDC ACM communication. So One basic question,
When i connect a cdc device(Modem) to the host MCU, the device will be considered as
a USB device or UART device?
In the MQX CDC serial example, usb device is open using "tty0".ie will the device
use one physical serial port of the MCU? OR
when we connect the cdc device, the usb device will be appeared as "tty0"?
Can we change this name?
2) My Modem has 2 USB interfaces. One for sending AT commands and one for data.
I thought of using USB for data transfer and separate UART for AT commands. If the
USB CDC acm device itself will use a separate serial port, i have shortage of UART channels.
In this case i have to use only USB with 2 different interface.
( Interface 0 for AT commands and interface 1 for data). Please comment on this.
3) How to change these interfaces in the example code?
4) I have gone through MQX example for USB host CDC device. In this, as per my understanding,
after reading data from UART hyper-terminal, it will write to the device through USB.
And after reading data from the device through USB, it will display the data in hyper-terminal by UART. Am i right?
5) For me i need to send a data buffer to modem. For this can i pass data "myBuff" directly
to the below API in the cdc_serial.c,without using UART APIs?
fwrite( myBuff, sizeof(myBuff), num, f_usb) in cdc_serial.c ?
Similarly For reading data from modem to my local buffer, can i directly use the API
fread(myBuff, 1, sizeof(myBuff), f_usb) ?
6) All the enumeration should be done with this example code cdc_serial.c?
Please help me to solve these issues.