usbusbserial

How to watch/change windows buffer size for RS232 (com)?


I'm using USB for communication. Our device sends 100k/s data (ARM7, very small memory size), and the PC needs to receive and process it all.

My previous design was implemented as a mass storage device, and extended a command for the communication protocol. The PC software runs a thread with a loop to receive the data.

The issue is: sometime it loses data.

So we used another solution: usb sim com (RS232).

But I don't know whether or not the OS can contain that much data before I get it using MFC (or pyserial). How can I get/set the buffer size?


Solution

  • We regularly punch about 100KByte/sec through our USB CDC implementation, the PC is fast enough to receive all data. But it seems that the built-in limits are lower with usb-serial (CDC) than with mass-storage protocol (in our case ~600KB/s versus ~100KB/s CDC).

    The PC receive thread should have a buffer that's "big enough".

    Edit: I don't know Windows' Buffer sizes, or how to get them, though.