Subj : win32 - High speed serial streaming code??? To : comp.programming From : DarkD Date : Wed Aug 31 2005 05:39 pm I need to capture data from a serial device that has 115200bps output. Its continously outputs 3byte packets 1250 times per second. I have tried using the win standard way to do serial port access (CreateFile ReadFile etc.) and cannot obtain anywhere near 3750 bytes per second. The system is completely dropping some data. The 3rd byte in every packet is 0xFF and the packets can have no break in time between the 3rd byte of one and the first of the next. I am not sure if 0xFF is affecting anything. Alot of the packets are: 0x00 0x00 0xFF, so im not sure if this is cuasing the problem either. I have tried use setupcomm to give massive buffers (30KB etc.) and can't get close to 3750 bytes per second .. With ReadFile how many bytes should I be reading? If I put 3 I can get about 100 packets per second. If I put 1000bytes I get about 200 packets per second... I am using visual c++ I know it is not a CPU performance thing because this is a 3GHz P4 and the CPU usuage is zero all the time. Is there some other way to low level access the uart chip so I can stream in this data fully? I cannot understand why modern computer cannot continously stream and save data at 115200bps. I have also tried event based triggering and the performance is just as bad. .