Does anyone know how the data in data packet looks like when the USB is initialized as COM port?
I have a Arduino Mega 2560. I have initialized COM port with a baud rate of 9600. I know that there are four types of USB packets as
- Token Packet (Commonly used for device identification and transaction initiation.)
- Data Packet (Contains the data that needs to be transferred from host to client or vice-versa.)
- Acknowledgement Packet (Acknowledgement for error-free data reception.)
- Special Packets (Hub to hub communication and speed differential.)
The payload in data packet is formatted as
DATA1 >> PAYLOAD >> CRC16 ; DATA2 >> >> PAYLOAD >> CRC16 ; etc.
Till this point I am clear about whats happening.
Now all I want to know is
- How the data is structured in the PAYLOAD section, when USB is initialized as COM port?
- How the baud rate comes into picture i.e how a particular baudrate is achieved in this type of communication?
- How is communication in terms of packet sequence? Does the sequence of packets change? (Like token>>data>>ack>>data>>ack>>...)
As @Simon said that this might be a vendor specific protocol, does anyone know how its used in Arduino?
This is really important to me to explore. Below is what I am trying.
- This is what I have already done. I was successfully able to transfer the data of 180KBytes of data in one sec. If I increase the data even by 1Kbytes, it starts to show error in the received data. I didn't initialized communication at any fixed baud rate. Mega is just waiting for data. I the next bit doesn't arrive in next 50 milliseconds, it considers this as end of communication.
- I wish to achieve same data rate for each Arduino Mega. Thus USB has to transfer total of 540KBytes of data in one sec. Here also I have to use USB hub. I would also like to know if this might cause any trouble, for proposed data transfer.
Now here I want to know weather this limitation is from USB side or Mega side or combination of both. So before I actually go and buy new Mega to test, I would just like to know if it will work or not.