I am running usbipd on windows 11 to enable USB devices to attach to WSL. This works. I can run my serial application as root and it works fine. I would rather not run my application as root. My user is in group dialout (and tty).
I cannot get the group of a FTDI serial port to change from root:
:~$ ls /dev/ttyUS* -Alcrw------- 1 root root 188, 0 May 13 08:07 /dev/ttyUSB0
Notice that the group is root and the permissions are 188.lsusb:
$ lsusbBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) ICBus 001 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) ICBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I set up a udev rule in /etc/udev/rules.d/99-usb-serial.rules:
ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", GROUP:="dialout", MODE:="0666"
I have a feeling that my udev rules are incorrect, but I looked around and cannot figure out what might be wrong.My method to test changes:
- make change to udev rules
- close ubuntu terminal, in windows type wsl --shutdown
- Open Ubuntu terminal
- in windows, type usbipd wsl attach --busid 10-3
- (device attaches, windows makes a noise as it does)
- ls /dev and check the user & permissions
~$ sudo journalctl -b 0 /dev/ttyUSB1No journal files were found.-- No entries --