pySerial: write in a blocking mode

Alejandro alejandro.weinstein at gmail.com
Wed Mar 29 01:25:43 CEST 2006


Peter Hansen wrote:
> Alejandro wrote:
> > I'm using pySerial to talk to a RS232 to RS485 converter. In order to
> > control the converter, I need to control the DTR line to enable/disable
> > de RS485 driver.
>
> This seems a little odd to me.  We've used several RS232-RS485
> converters without needing to do that.  Maybe a more sophisticated
> device would eliminate this need?

Yes. The device is very simple (I made it).

> What you're trying to do is a hard realtime operation, and unless it's
> directly supported you could be up against an impossible task using
> Windows.  (But it seems you already knew that. :-)

I know it can be difficult/impossible. By the way, I am coding in
Linux, but want my code to be portable between Windows and Linux(!).

I will rethink the whole issue. May be I will use the time.sleep
alternative, taking a good margin to manage the uncertainty of the
delay.




More information about the Python-list mailing list