Package: libhackrf0
Version: 2014.08.1-1
Severity: important
The udev rules for hackrf devices in
/lib/udev/rules.d/60-libhackrf0.rules do not work for logged in users if
the user information originate from LDAP (ie users that can not be a
member of the plugdev group).
I've investigated and got some help on #debian-devel, and the way this
is supposed to work with logind from systemd is that some file system
ACLs should grant access to the device in /dev/bus/usb/* when the device
is logged in. The rules to set this up is in
/lib/udev/rules.d/70-uaccess.rules. And for software defined radios, I
believe this should be triggered by using ENV{ID_SOFTWARE_RADIO}="1".
Please modify /lib/udev/rules.d/60-libhackrf0.rules to include this
environment setting like this:
ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b",
SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="plugdev",
ENV{ID_SOFTWARE_RADIO}="1"
ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k",
MODE="660", GROUP="plugdev", ENV{ID_SOFTWARE_RADIO}="1"
ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k",
MODE="660", GROUP="plugdev", ENV{ID_SOFTWARE_RADIO}="1"
With this modification in place, the ACLs show up in /dev/ and I can
access the device as a normal user.
Here is the output from 'udevadm info /dev/bus/usb/003/026' with this
setting in place:
P: /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2
N: bus/usb/003/026
S: hackrf-one-3-1.2
E: BUSNUM=003
E: DEVLINKS=/dev/hackrf-one-3-1.2
E: DEVNAME=/dev/bus/usb/003/026
E: DEVNUM=026
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2
E: DEVTYPE=usb_device
E: DRIVER=usb
E: ID_BUS=usb
E: ID_FOR_SEAT=usb-pci-0000_00_1a_0-usb-0_1_2
E: ID_MM_DEVICE_IGNORE=1
E: ID_MODEL=HackRF_One
E: ID_MODEL_ENC=HackRF\x20One
E: ID_MODEL_ID=6089
E: ID_PATH=pci-0000:00:1a.0-usb-0:1.2
E: ID_PATH_TAG=pci-0000_00_1a_0-usb-0_1_2
E: ID_REVISION=0100
E: ID_SERIAL=Great_Scott_Gadgets_HackRF_One_0000000000000000909864cxxxxxxxxx
E: ID_SERIAL_SHORT=0000000000000000909864xxxxxxxxxx
E: ID_SOFTWARE_RADIO=1
E: ID_USB_INTERFACES=:ffffff:
E: ID_VENDOR=Great_Scott_Gadgets
E: ID_VENDOR_ENC=Great\x20Scott\x20Gadgets
E: ID_VENDOR_FROM_DATABASE=OpenMoko, Inc.
E: ID_VENDOR_ID=1d50
E: MAJOR=189
E: MINOR=281
E: PRODUCT=1d50/6089/100
E: SUBSYSTEM=usb
E: TAGS=:seat:uaccess:
E: TYPE=0/0/0
E: USEC_INITIALIZED=18463410617
Without the setting the TAGS line is missing and logind fail to grant
access to the device.
--
Happy hacking
Petter Reinholdtsen