I am trying to access a USB device that appears in /dev/ as hidraw4 .
I have a communication interface specification (based on RS232 serial port), but I canβt even get a connection with pyserial to work:
The code:
import serial ser = serial.Serial(port='/dev/hidraw4')
Error:
serial.serialutil.SerialException: Could not configure port: (22, 'Invalid argument')
I really don't understand what is the difference between the hidraw and tty files I can find in /dev/ . Can Pyserial connect to such devices (and if not, is there a workaround)?
source share