pyserial: loose connection after inactivity

Hendrik van Rooyen mail at microcorp.co.za
Fri Nov 9 01:40:33 EST 2007


"Frank Aune" <Fran...park.no> wrote:

> Hello,
>
> I configure the serial connection using:
>
> self.port = serial.Serial(baudrate=57600,
>                                      timeout=0.06,
>                                      parity=serial.PARITY_EVEN,
>                                      stopbits=serial.STOPBITS_TWO,
>                                      bytesize = serial.EIGHTBITS)
>
> After X hours of inactivity I loose connection to my serial device, with error
> message "Input/Output error" printed to stdout. The error happens both on
> Linux and Windows (although the error message is probably different on
> Windows, I've only been told the behaviour is the same).
>
> I cannot find an obvious reason for why this is happening, and since it
> happens after a long time of inactivite, debugging is awkward. So I though
> I'd run the question through the expert panel for ideas, before venturing
> down the path of pain and suffering myself :)

I have heard rumours that on windoze, the serial drivers for USB attached
serial ports are not stable.
Never seen it myself, though.
And if its good old COM1 its not applicable.
Have not heard similar rumours about Linux.

Cold comfort, I know.

- Hendrik




More information about the Python-list mailing list