I have a Silicon Labs CP2102 USB to UART Bridge device. I am writing some python to script writing/reading data to a serial device with pyserial on Windows 10.
It works fine without flow control. However, it fails to read and times out if I enable either DSR/DTR or RTS/CTS.
import serial
ser = serial.Serial()
ser.baudrate = 230400
ser.port = "COM13"
ser.dtr = 1
ser.dsrdtr = True
ser.write_timeout = 1
ser.timeout = 1
ser.open()
n = ser.write(bytes([1]))
n += ser.write(bytes([2]))
n += ser.write(bytes([3]))
print("bytes written ", n)
byte_read = []
byte_read += ser.read(1)
byte_read += ser.read(1)
byte_read += ser.read(1)
print(byte_read)
ser.close()
The same device works fine with TS232 terminal tools, like Termite or TeraTerm, on Windows 10.
It seems like an issue with pyserial.