February 17th, 2003, 01:15 AM
Win32 Serial IO?
Im having troubles with win32 serial IO in C.
It appears extremely flakey... using hardware flow control, it often results in very slow thruput , and if not that, I get NULL characters and things... overall it just sucks, Im using examples straight out of MSDN.
Has anyone else had extensive experience with win32's serial IO methods? Is it just me or is it very buggy?
February 17th, 2003, 04:22 PM
1. hardware flow control is your best choice.
- if it is supported by your external device
- if you did setup your external device to also use it
- if your cable is not broken or has to few pins
You canīt have slow thruput unless you have programmed some error correction. did you set the baud rate?
2. did you setup the timeout values? i had big troubles with serial communication too until i manually set them.
3. which way are you using anyway? event-driven? overlapping IO?
Tell us a little more, maybe post some code?
February 18th, 2003, 07:24 AM
Well the code I was using was essentially the code out of the MSDN writeup on serial IO.
Ive got it working now... instead of overlapped IO, I instead used non-overlapped IO and set the timeouts with SetCommTimeouts.
IT seems to work properly like that.
/me slaps microsoft
Thanks for the reply...