Is an actual baudrate of 115,200 or higher possible?

benchmarking, serial-port

Solution

The results that you observe are because of the way serial over USB works. This is a USB 1.1 chip. The USB does transfers using packets and not a continuous stream as for example serial.

So your device will get a time sliced window and it is up to the driver to utilize this window effectively. When you set the packet size to 1 you can only transmit one byte per USB packet. To transmit the next byte you have to wait for your turn again.

Usually a USB device has a buffer on the device end where it can buffer the data between transfers and thus keep the output rate constant. You are under-flowing this buffer when you set packet size too low. The time slice on USB 1.1 is 10 ms which only gives you 100 transfers per second to be shared between all of the devices.

When you make a "send" call, all of your data will go out in one transfer to keep interactive applications working right. It is best to use the maximum transfer size to achieve best performance on USB devices. This is not always possible if you have interactive application, but mostly possible when you have a data transfer application.

Problem

While running some tests with an FT232R USBtoRS232 Chip, which should be able to manage speeds up to 3 Mbaud, I have the problem that my actual speed is only around 38 kbaud or 3,8 KB/s. I've searched the web, but I could not find any comparable data, to prove or disprove this limitation. While I am looking further into this, I would like to know, if someone here has comparable data. I tested with my own code and with this tool here: http://www.aggsoft.com/com-port-stress-test.htm Settings would be 115,200, 8N1, and 64 byte data-packet. I would have expected results like these: At 115200 baud -> effectively 11,520 byte/s or 11,52 KB/s At 921600 baud -> 92,16 KB/s I need to confirm a minimal speed of 11,2 KB/s, better speeds around 15-60 KB/s. Based on the datasheet, this should be no problem - based on reality, I am stuck at 3,8 KB/s - for now at least. Oh my, found a quite good hint - my transfer rate is highly dependent on the size of the packets. So, while using 64 byte packets, I end up with 3,8 KB/s, using 180 byte packets, it somewhat averages around 11,26 KB/s - and the main light went on, when I checked the speed for 1 byte packets -> around 64 byte/s! Adding some math to it -> 11,52 KB/s divided by 180 equals to 64 byte/s. So basically the speed scales with the byte-size. Is this right? And why is that?

Original source