Serial port error statistics - any comparable data?

Diez B. Roggisch deets at nospam.web.de
Sat Mar 29 17:26:56 EDT 2008


Hendrik van Rooyen schrieb:
> Hi,
> 
> I have been doing some tests on a device that
> we are thinking of incorporating into a product, 
> and I have seen that reception on a serial port
> at 115200 baud over about six metres of RS-232
> cable makes mistakes, to the order of 125 lines
> with errors in them out of approximately 18.4
> million lines of 65 or so chars - about one errored
> line in 147000, or one error character in 95 million.
> 
> The PC that is making the errors is a 64 bit dual
> core AMD machine running at 2 Gig, and I am 
> running stock standard Open Suse 10.3 with 
> the supplied Python 2.5.
> 
> What kind of bothers me is the nature of the errors -
> I seem to get only missing characters, as if an 
> interrupt was missed.  There are no munged characters
> as one would expect if the errors were bit related.
> 
> Has anyone else seen anything like this, and am I worrying
> needlessly?
> 
> I realise that my production protocols will easily handle
> this almost non existent level of error - but if this were in
> microcontroller code that I had written myself, I would
> suspect that I was spending too long in some critical
> section of code.

RS232 is unfortunately as bad as a "protocol" as it can get. I've used 
it for communication with a microcontroller for just a few bytes every 
second. And it failed miserably, so I needed to implement a protocol on 
top of it.

The machine spec is totally irrelevant - what is interesting is the 
serial hardware you use. Are you by any chance using a 
serial2usb-converter? I had nothing but troubles with these.

if you have the chance, try & attach a machine with legacy rs232 port, 
and see if the errors still remain.

Diez



More information about the Python-list mailing list