[Tutor] question about serial coms

Python python at venix.com
Tue Nov 15 13:56:45 CET 2005


The device at the far end of the serial connection is echoing what you
write back to you.  This is a convenience for someone typing at a
terminal, but a nuisance when you are programming.

The easier way out is to turn echoing off at the far device.  Failing
that, you will want to provide a copy of your output to the read routine
so that it can filter your output out of the data stream coming back to
you.

Unfortunately there is no reliable error detection on a serial line, so
line errors can complicate the task of matching the echoes to your
output.

On Mon, 2005-11-14 at 17:04 -0800, Bennett, Joe wrote:
> I have been working with pyserial. One question I have
> is this. I have a loop that writes to the serial port
> and then waits about 500ms and then reads from the
> serial port. The first thing read from the serial port
> is ALWAYS the data written to the serial port... I
> must be missing something obvious, but I thuoght the
> two buffers were separate...
(snipped)
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
-- 
Lloyd Kvam
Venix Corp



More information about the Tutor mailing list