C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 17th, 2003, 12:15 AM
pkplex pkplex is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: New Zealand
Posts: 28 pkplex User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to pkplex
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?

Reply With Quote
  #2  
Old February 17th, 2003, 03:22 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,966 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 52 m 24 sec
Reputation Power: 189
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.

Reply With Quote
  #3  
Old February 18th, 2003, 06:24 AM
pkplex pkplex is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: New Zealand
Posts: 28 pkplex User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to pkplex
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...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Win32 Serial IO?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap