|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Win32 Serial IO?
Hello
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? |
|
#2
|
|||
|
|||
|
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?
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
|||
|
|||
|
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... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Win32 Serial IO? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|