Python 串行通信接收命令未知

Python Serial Communication Receiving COMMAND UNKNOWN

所以我正在尝试通过串行(USB-A 到 USB-B)控制 Thermo Scientific 恒温槽,当我发送命令时,我收到响应 "F001" 告诉我该命令已知.格式是 "command" "carriage return" 我的格式是:

ser = serial.Serial('/dev/tty.usbserial-A800dars', 9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=5) #no timeout=0
print(ser.name)                         # check which port was really used

ser.write(b'RT\r')                      # read internal temp
# TODO probably not getting 100 bytes here, need to find what to expect and whether or not to do a timeout
serial_response = ser.read(100)         # read up to one hundred bytes or as much is in the buffer
print(serial_response)

我尝试在 \r 之后添加一个 \n ,我尝试了多个其他命令,我在 RT 和 \r 之间添加了一个 space 并且我设置了波特率温度浴上的速率与我通过串行发送的速率相同。我还确保我在这里使用了来自 http://www.ftdichip.com/FTDrivers.htm 的正确驱动程序。

有什么想法吗?我正在使用 Mac,通过 USB-A 到 USB-B 电缆发送,只有在恒温槽开启且 运行.

时我才会收到 F001 响应

事实证明,制造商给了我错误的手册。在找到正确的一个并且现在知道通过串行发送的正确命令之后,以上所有代码都可以正常工作。