Serial port Input/Output conflicts
cliechti at gmx.net
Thu Feb 7 22:33:32 CET 2002
[posted and mailed]
jwk at mrao.cam.ac.uk (James Keen) wrote in
news:ef77152a.0202070729.3a6a5d2a at posting.google.com:
> The status data gets sent to the port from my Hardware, which I can
> read, but the serial port refuses to send any more commands to my
> hardware until I close and then reopen the port.
> serial = os.open('/dev/ttyS1', FCNTL.O_RDWR|os.O_NDELAY,0)
not much of an initialization... your port could be in processing mode
where it interprets control characters, flow controls etc...
this initialization is not likely to work with binary data.
(the url above should be one line, here's the project page:
http://mspgcc.sourceforge.net/) download pybsl, extract serial* and
use the serial.Serial class. i have trimmed it to work with binary
> global serial
codesidered writing a class that represents you hardware? would be
cleaner that juggling around globals.
Chris <cliechti at gmx.net>
More information about the Python-list