Jim*_*Jim 5 python linux hid pyserial
我试图访问它出现在一个USB设备/dev/的hidraw4.
我有通信接口的规范(基于RS232串口通信),但我甚至无法与pyserial连接工作:
码:
import serial
ser = serial.Serial(port='/dev/hidraw4')
Run Code Online (Sandbox Code Playgroud)
错误:
serial.serialutil.SerialException: Could not configure port: (22, 'Invalid argument')
Run Code Online (Sandbox Code Playgroud)
我真的不明白我能找到的文件hidraw和tty文件之间有什么区别/dev/.Pyserial可以连接到这样的设备(如果没有,是否有解决方法)?