TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Simon Bowring
from: Craig Swanson
date: 1994-10-12 23:35:16
subject: Serial Problem

SB> A device connected to the PC's serial port sends out a 6 character poll
 SB> every second, to which I have to reply to before the
 SB> next poll.  I have written the serial code as a single
 SB> thread which waits for the poll and responds
 SB> immediately.  When I load the system (as above), and
 SB> monitor the serial line, I can see that my PC does not
 SB> respond to the poll(s) straight away, typically two or
 SB> three polls from the remote device will come in before
 SB> my code sends two or three responses (all bunched up).

How do you know that the responses weren't sent by your program until after
multiple polls have arrived?  One possibility is that the writes are being
accumulated prior to being flushed to the hardware.  This could explain the
"clustering" of the replies to the poll.  You may need to flush
the I/O buffer immediately after a write operationg in order to force the
data to be written out to the serial port.


--- Maximus/2 2.01wb

* Origin: OS/2 Connection {at} Mira Mesa, CA (1:202/354)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 202/354 301 1 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.