Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CRTSCTS flow control does not work

203 views
Skip to first unread message

Stuart Hodgkinson

unread,
Sep 18, 2000, 3:00:00 AM9/18/00
to
This problem has been driving me up the wall for ages. I have managed a
solution but its not 100% so im trying to find out if theres anything i've
missed. Im running s.u.s.e version 6.4 on an i386 platform. Now the problem
is this, I open the serial port in my application,the appication is using
flow control as it is set in the termios structure using CRTSCTS. A call to
stty reports that the flow control is on, stty -a --file=/dev/ttyS0. I have
an application on the other side which is also using flow , although written
for DOS this application uses flow control correctly as its been running
correctly for the past 10 years! I have a monitor in between that is
checking the data and line states (RTS CTS line states). However the flow
control on the linux side fails, if the CTS state changes from the DOS side
the LINUX side does not recognize this and it continues to run as if in full
duplex mode. This confuses the DOS side as it never manages to read all the
information correctly and data is lost completley!
I have tried all sorts of different aproaches but the one I found the best
was to hack the device driver and force it to use the flow control directly
at the UART level. This works however there are timing issues that I can
only relate to the driver being sheduled off the processor or something on
them lines. I still lose data but its less frequent and i can trap that at
the application level.
I was wondering if anyone else had this problem? The flow control just
doesn't work! If im having to do stuff to the driver I would assume someone
else has had this problem! Is there something i've missed? Could there be
someting conflicting with the port that is resetting the flow control? any
ideas anyone!!!!

Stuart Hodgkinson
Software Engineer.


Mazzachre

unread,
Oct 9, 2000, 3:00:00 AM10/9/00
to
On Mon, 18 Sep 2000 14:52:01 -0700, "Stuart Hodgkinson"
<shodg...@pes-halifax.zoom.co.uk> wrote:

>is this, I open the serial port in my application,the appication is using
>flow control as it is set in the termios structure using CRTSCTS. A call to
>stty reports that the flow control is on, stty -a --file=/dev/ttyS0. I have

The answer to this is quite simple as I found out today (I was in need
of RTS/CTS too)

The POSIX termios interphase is not fully implemented!

You do not set anything when you set the CRTSCTS in the termios!!

You can see it if you go through all the termios.h includes in the
various include directories...

In the termios structure the c_cflag is an unsigned short (16bit) and
the CRTSCTS is defined as an 48bit constant, that adds 0 to the 16bit
variable...

Either someone have screwed up, or POSIX hardware flowcontrol is not
implemented in Linux on purpose...

I am right now trying the Solaris 7 Posix implementation on the same
hardware to see if it worsk there... then a solution will be to port
the solaris version...

- Mazzachre

0 new messages