Hi, i have tried getting pySerial to work on both Windows XP (32-bit) and Ubuntu.
When i run the miniterm.py example everything works fine, i can both read and write to my USB serial connected device.
But when i try to write my own script it doesn't work, all the examples use threading and all sorts of neat tricks, but i think the beginner really need some much simpler examples.
When i try the following example, readline() times out.
port = serial.Serial ( 'COM8', baudrate = 57600, parity = 'N', stopbits = 1, bytesize = 8, rtscts = False, xonxoff = False, timeout = 10 )
print port.write ( 'PROTOCOL\r\n' )
But when i write PROTOCOL<newline> into the miniterm.py example it works great, leaving me to wonder whether threading is required for it to work (i have tried that too and it didn't work).
So i have two problems, really, better examples. And why doesn't the code above work?
Thanks for any insight you can give
Log in to post a comment.