pyserial: loose connection after inactivity

Frank Aune Frank.Aune at broadpark.no
Thu Nov 8 04:15:45 EST 2007


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 :)

Best regards,
Frank



More information about the Python-list mailing list