I have the following simple code:
ser = serial.Serial('/dev/ttyUSB0', baudrate = 9600, timeout=.25)
ser.write(chr(0xFF) + chr(0) + chr(3))
The device is a USB relay board with a FTDI 245RL. On windows, if I change '/dev/ttyUSB0' to 2 for COM3, it works great. I tried it on a Debian machine and a CentOS 5 machine and neither worked. I ran it as root, so I don't think it is permissions. The symptom is that it seems to hang on the write(). I'm using Python 2.6. The values of serial.VERSION are: CentoS5 & Windows :2.6, Debian:1.35.
Log in to post a comment.