serial madness?

I am trying to write a serial program which simply takes in characters and
then writes them out on a port the whole time is sitting and waiting for
characters from the other computer to be read in. My problem lies in here
the code I have written will send out the characters to the other computer
running DOS that part works fine. But my computer doesn’t display the
characters it recieves until I go and press a key. I have even gone as far
as to insert threads and that has not worked. I am using the raw() and
unraw() functions posted in the applications newsgroup. Does anyone have a
solution so that keys pressed on the DOS computer appear on my QNX computer
even if I don’t press anything. I am thinking it may be a blocking a
write(). Please any solutions, pointers, sites you can point me to are much
appreciated.

kweisser@udel.edu
Kevin Weisser

Kevin Weisser <kweisser@udel.edu> wrote:

Answered in more detail elsewhere.

This newsgroup is primarily about modifying/coding new drivers, rather
than using the existing one.

-David

I am trying to write a serial program which simply takes in characters and
then writes them out on a port the whole time is sitting and waiting for
characters from the other computer to be read in. My problem lies in here
the code I have written will send out the characters to the other computer
running DOS that part works fine. But my computer doesn’t display the
characters it recieves until I go and press a key. I have even gone as far
as to insert threads and that has not worked. I am using the raw() and
unraw() functions posted in the applications newsgroup. Does anyone have a
solution so that keys pressed on the DOS computer appear on my QNX computer
even if I don’t press anything. I am thinking it may be a blocking a
write(). Please any solutions, pointers, sites you can point me to are much
appreciated.

kweisser@udel.edu
Kevin Weisser


QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

I had similar problems dubugging some code, and found it was a quirk in how
printf was handled.

It doesn’t update the screen until it sees an end of line.

I was printing out characters with printf("%02X,"ch); in a loop that
received data, but I didn’t see any of it until an en of line character was
sent.

Just a thought

Jeddy

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:ae7lgm$631$6@nntp.qnx.com

Kevin Weisser <> kweisser@udel.edu> > wrote:

Answered in more detail elsewhere.

This newsgroup is primarily about modifying/coding new drivers, rather
than using the existing one.

-David

I am trying to write a serial program which simply takes in characters
and
then writes them out on a port the whole time is sitting and waiting for
characters from the other computer to be read in. My problem lies in
here
the code I have written will send out the characters to the other
computer
running DOS that part works fine. But my computer doesn’t display the
characters it recieves until I go and press a key. I have even gone as
far
as to insert threads and that has not worked. I am using the raw() and
unraw() functions posted in the applications newsgroup. Does anyone
have a
solution so that keys pressed on the DOS computer appear on my QNX
computer
even if I don’t press anything. I am thinking it may be a blocking a
write(). Please any solutions, pointers, sites you can point me to are
much
appreciated.

kweisser@udel.edu
Kevin Weisser


\

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

This isn’t a “quirk” - it’s called line buffering, and it’s standard Unix
behavior for stdout when attached to a terminal. See the doc page for
setvbuf() for more information on how to change this default.

dB

“john eddy” <johnheddy@adelphia.net> wrote in message
news:afkjps$5eb$1@inn.qnx.com

I had similar problems dubugging some code, and found it was a quirk in
how
printf was handled.

It doesn’t update the screen until it sees an end of line.

I was printing out characters with printf("%02X,"ch); in a loop that
received data, but I didn’t see any of it until an en of line character
was
sent.

Just a thought

Jeddy

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:ae7lgm$631$> 6@nntp.qnx.com> …
Kevin Weisser <> kweisser@udel.edu> > wrote:

Answered in more detail elsewhere.

This newsgroup is primarily about modifying/coding new drivers, rather
than using the existing one.

-David

I am trying to write a serial program which simply takes in characters
and
then writes them out on a port the whole time is sitting and waiting
for
characters from the other computer to be read in. My problem lies in
here
the code I have written will send out the characters to the other
computer
running DOS that part works fine. But my computer doesn’t display the
characters it recieves until I go and press a key. I have even gone
as
far
as to insert threads and that has not worked. I am using the raw()
and
unraw() functions posted in the applications newsgroup. Does anyone
have a
solution so that keys pressed on the DOS computer appear on my QNX
computer
even if I don’t press anything. I am thinking it may be a blocking a
write(). Please any solutions, pointers, sites you can point me to
are
much
appreciated.

kweisser@udel.edu
Kevin Weisser


\

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.