0

Problem

udev rule that sets group of USB device to usrp, mode to 0660 used to work for allowing my user, which is in group usrp, to access the USB device. Not anymore.

Platform

x86_64 Fedora 34 / stock fedora UHD 4.0.0.0 uhd-4.0.0.0-3.fc34.x86_64

Hardware discovery

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:568b Realtek Semiconductor Corp. Integrated_Webcam_HD
Bus 001 Device 003: ID 04f3:20d0 Elan Microelectronics Corp. Touchscreen
Bus 001 Device 002: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 009: ID 2500:0020 Ettus Research LLC USRP B210
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The rule in /usr/lib/udev/rules.d/10-usrp-uhd.rules seems to work well:

…
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0020", GROUP:="usrp" MODE:="0660", ENV{ID_SOFTWARE_RADIO}="1"
…

leading to

$sudo udevadm test /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1
…
1-1: /usr/lib/udev/rules.d/10-usrp-uhd.rules:15 GROUP 1000
1-1: /usr/lib/udev/rules.d/10-usrp-uhd.rules:15 MODE 0660
1-1: Handling device node '/dev/bus/usb/001/009', devnum=c189:8
1-1: Setting permissions /dev/bus/usb/001/009, uid=0, gid=1000, mode=0660
…

confirmed by ls -l:

crw-rw----. 1 root usrp 189, 8 Nov  9 14:53 /dev/bus/usb/001/009

And I'm pretty sure I'm in usrp:

$ groups
marcus wheel libvirt usrp mockbuild

Symptom

$ export UHD_IMAGES_DIR=/usr/share/uhd/images
$ uhd_usrp_probe
[INFO] [UHD] linux; GNU C++ version 11.0.1 20210324 (Red Hat 11.0.1-0); Boost_107500; UHD_4.0.0.0
[ERROR] [USB] USB open failed: insufficient permissions.
See the application notes for your device.

Error: LookupError: KeyError: No devices found for ----->
Empty Device Address

(but works as root)

Further side info

  • used to work pretty well
  • no entries in /var/log/audit/audit.log

1 Answer 1

1

I had the same issue under Fedora 35 with another SDR and resolved it by adding the "OWNER" / username for device access:

SUBSYSTEMS=="usb", ATTR{idVendor}=="xxxx", ATTR{idProduct}=="xxxx", MODE="0660", OWNER="myUser"

Then, run

sudo udevadm control --reload-rules && sudo udevadm trigger

This command informs udev deamon to reload the newly added device rule and re-trigger service again without rebooting this system. And now it works without root privileges!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .