Re: XON/XOFF communication problem
From: Grant Edwards (grante_at_visi.com)
Date: 10/22/03
- Next message: Newbie: "Re: Safe e-mail?"
- Previous message: Mike Oliver: "Re: Buying new mobo/CPU"
- In reply to: Villy Kruse: "Re: XON/XOFF communication problem"
- Next in thread: Andrej Trobentar: "Re: XON/XOFF communication problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Oct 2003 15:57:18 GMT
In article <slrnbpd1j4.su.vek@station02.ohout.pharmapartners.nl>, Villy Kruse wrote:
>
>>Over the past few years, I've spent a lot of time reading the
>>Linux tty layer and serial driver code, and I wouldn't be a bit
>>surprised if Xon/Xoff just didn't work right in all
>>situations...
>
> Or more likely, there is a latency between receiving xoff and the flow of
> characters actualy stops. Expecialy if you have a uart with a FIFO then
> the content of the FIFO will be transmitted even after X-OFF is received.
> The X-OFF may also need to tranverse through the receive FIFO hefore it
> is acted on.
Exactly. It may take up to 10ms for Linux to stop sending after an XOFF is
received since that's handled by the tty layer, and the normal mode of
operation is (or at least used to be) to buffer up received bytes and push
them up to the tty layer once every tick (10ms). At 115.2K, that's 115
bytes of data -- the terminal may not be able to tolerate receiving that
much data after it sends an XOFF. You might be able to improve things by
setting the low latency option on the port using setserial (do a "man
setserial"). I know that will improve XOFF response time with some drivers,
since it will shove bytes up to the tty layer on every rx interrupt, but I
don't remember if the 16x50 driver does that or not.
Some nicer UARTs (e.g. 16850) handle XON/XOFF in hardware -- if you're using
one of those (and the driver is well-written), XON/XOFF should work at any
baud rate.
At first serial ports seem fairly simple...
--
Grant Edwards grante Yow! Where's th' DAFFY
at DUCK EXHIBIT??
visi.com
- Next message: Newbie: "Re: Safe e-mail?"
- Previous message: Mike Oliver: "Re: Buying new mobo/CPU"
- In reply to: Villy Kruse: "Re: XON/XOFF communication problem"
- Next in thread: Andrej Trobentar: "Re: XON/XOFF communication problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|