Hello,
Perhaps someone knows more about the following problem and can
give me some hints:
My application implements a connection to several Simatic S5
plcs over their programming device interface. This works with a
20mA TTY Interface, so I use a RS232 to 20mA converter.
The program runs very good under SuSE-Linux 5.3, Kernel 2.0.35.
The I ported it to SuSE-Linux 6.3, Kernel 2.2.10.
Now on the new system:
Under normal circumstances the program works very well. But at a
high system load it stops; sending a request to the plc
and waiting for the reply leads to a timeout.
With a serial analyzer I can see both the request from the linux
box and the reply from the plc, so the data from plc disappear
in the serial receiver of the linux box...
I have of course checked my computer's hardware in respect of
interrupt lines and so on; the behaviour is the same if I remove
all unnecessary cards from my PC. It even occurs on all my 3 PC
when I boot SuSE 6.2...
I have found the following:
The lost of input data (the locking of the receiver) always
occurs after the plc sent a BREAK to the PC. After this the
receiver is dead!
Background: the plc interface protocol has rather strong timing
conditions; each data block you receive from plc you must
acknowledge "at once"; if not the plc complains and sends a
BREAK.
With a medium system load linux is fast enough to send ACK, but
on higher loads (e.g. extract a very big tgz-file) it doesn't.
So the program schould repeat the request sometimes later, but
this fails because the receiver is locked.
My (so I think poor) WORKAROUND is the following:
When I have send a STX to start communication I observe the port
for incoming data within 2 seconds. If there are data, good.
IF NOT I suppose the receiver is locked and
do:
close the port
open the port
The next try to start communication then always succeeds.
Is there anyone who already had this problem ? Is there any way
to avoid the locking of the receiver without reopen the port and
without changing the "linux/drivers/char/serial.c" which I
suppose causes the problem ?
gme
--
++++++++++++
+ Gerald Emig, Engelstr. 17, D - 66564 Ottweiler
+ Tel.+Fax +49 6858 6197
++++++++++++
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to [EMAIL PROTECTED]