serial communication

Grant Edwards ge at nowhere.none
Mon Oct 2 11:06:12 EDT 2000


In article <39D4C491.A77C8CB9 at tellurian-inc.com>, Blaine Lee wrote:
>
>I am having trouble understanding how to control a serial port.
>I am communicating with a couple different devices on serial
>ports.  One of the devices uses a protocal that does not end
>with a lf, therfore I think I am having a problem with
>buffering.

Probably.

>On a side note, I cannot find documentation for termios on my
>Debian linux system.  Would it help if I found it?

Probably.

You might want to read the Linux Serial-Programming-HOWTO.
Then if you use the posix open/read/write calls instead of the
Python ones, everything in the SP-HOWTO will apply directly.

If you use the Python open/read/write calls, you've got two
layers of buffereing: one in the Linux tty driver, one in the
python file object implimentation.

If there's an easy-to-use Python wrapper for Unix serial
ports/termios stuff, I haven't stumbled across it.  So I just
use the posix calls and do things the same way I would in C.

-- 
Grant Edwards                   grante             Yow!  I think my CAREER
                                  at               is RUINED!!
                               visi.com            



More information about the Python-list mailing list