I am trying to access an USB device as $USER
running some Python Code based on this GIT repo. I am running Ubuntu 20.04 Server on a RaspberryPi4b. It works fine as root
sudo python3 myPythonCode.py
but not as $USER
i.e.
python3 myPythonCode.py
which leads me to believe it's an Access Rights Problem. I tried
sudo chown $USER /dev/usb/
sudoedit /etc/udev/rules.d/50-myusb.rules
and add lineKERNEL=="ttyUSB[0-9]",MODE="0666"
to filesudo usermod -a -G dialout $USER
The device is mounted obviously lsusb
:
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 045e:02fe Microsoft Corp.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
But it does not show up in /dev/ttyUSB
but you can find it in /dev/bus/usb/001/005
(duh). dmesg | tail
:
[ 210.127161] input: Microsoft X-Box One pad as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/gip0/gip0.0/input/input1
[ 998.563321] usb 1-1.4: USB disconnect, device number 4
[ 1018.975089] usb 1-1.4: new high-speed USB device number 5 using xhci_hcd
[ 1019.076591] usb 1-1.4: New USB device found, idVendor=045e, idProduct=02fe, bcdDevice= 1.00
[ 1019.076607] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1019.076619] usb 1-1.4: Product: XBOX ACC
[ 1019.076630] usb 1-1.4: Manufacturer: Microsoft Inc.
[ 1019.076640] usb 1-1.4: SerialNumber: 430112
[ 1019.163760] usb 1-1.4: reset high-speed USB device number 5 using xhci_hcd
[ 1022.292169] input: Microsoft X-Box One pad as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/gip0/gip0.0/input/input2
Any suggestions?