Serial port error statistics - any comparable data?

Hendrik van Rooyen mail at microcorp.co.za
Sun Mar 30 10:55:50 EDT 2008


On Sunday 30 March 2008 12:19:58 Bjoern Schliessmann wrote:
> Diez B. Roggisch wrote:
> > if you have the chance, try & attach a machine with legacy rs232
> > port, and see if the errors still remain.
>
> Additionally, what kind of buffers does your device have? I'm using
> pyserial to control a very "sensitive" device with nuttily
> implemented buffering strategy. It has a "fast" and a "slow" buffer
> which are filled in order, and no signalling to the outside sender
> on how full they are. If the fast buffer fills the slow buffer
> kicks in and requires less transmission rate. That may be how
> characters could be lost with you.
>
> Regards,
>
>
> Bjoern

That is a horrible device - have they not heard of RTS / CTS?
or even XON / XOFF ?  It is a wonder that you got that working
without turning into an axe murderer.  I don't think I could have.

I have not been exactly forthcoming about the setup - the device
in question sits on the LAN, so I connect to it via a TCP socket 
connection (in either client or server mode - seems to make no
difference) . On the other side of the device, there is a serial port,
and another PC is connected to the RS-232 side.  This is the PC 
that runs a simple echo script that makes the occasional error,
on its receive - I can see this because the transmission is
paused when I see an error, and the two strings are identical
on the two machines.

As I mentioned in my reply to Diez and Castironpi - its not the device
that is making the errors, as proved by a simple loopback.

Another interesting statistic is that the number of lines 
"in flight"  on the round trip machine1 > xport  >
 machine2 > xport > machine 1 due to buffering varies 
between  about 4 and about 26.

So much for using it for real time control...

- Hendrik





More information about the Python-list mailing list