UdevConfig

'''If you're using UHD, you've probably done something like this already. This is really only necessary when using a USRP1 with the deprecated libusrp.'''

The udev daemon is used by some Linux distributions to handle plug/unplug events for usb devices.

Follow these steps to allow users other than root to use the USRP:

Setup udev for the usrp
1. Define a group for the usrp

sudo groupadd usrp 2. Add users to the usrp group

sudo usermod -a -G usrp [username] 3. Add a new udev rule

echo 'ACTION==&quot;add&quot;, BUS==&quot;usb&quot;, SYSFS{idVendor}==&quot;fffe&quot;, SYSFS{idProduct}==&quot;0002&quot;, GROUP:=&quot;usrp&quot;, MODE:=&quot;0660&quot;' &gt; tmpfile sudo chown root.root tmpfile sudo mv tmpfile /etc/udev/rules.d/10-usrp.rules On later Ubuntu, the syntax has changed, BUS is no longer a valid keyword and SYSFS -&gt; ATTR. If

grep BUS /etc/udev/rules.d/* is empty, try this rule instead:

echo 'ACTION==&quot;add&quot;, ATTR{idVendor}==&quot;fffe&quot;, ATTR{idProduct}==&quot;0002&quot;, GROUP:=&quot;usrp&quot;, MODE:=&quot;0660&quot;' &gt; tmpfile sudo chown root.root tmpfile sudo mv tmpfile /etc/udev/rules.d/10-usrp.rules 4. Load the new udev rule

sudo udevadm control --reload-rules

Verify the setup
Power cycle the usrp device and:

lsusb | grep fffe:0002 You should see an entry with ID: fffe:0002

ls -lR /dev/bus/usb You should see a device file with group usrp and mode crw-rw

Notes for the NI version of the devices
In order to get the NI version of the, e.g., B210 working, which is actually sold as National Instruments USRP-2901, one has to use another USB vendor and product ID. In the case of the USRP-2901 the vendor ID is 3923 and the product id is 7814. The udev rule would then look as follows (for Ubuntu):

echo 'ACTION==&quot;add&quot;, ATTR{idVendor}==&quot;3923&quot;, ATTR{idProduct}==&quot;7814&quot;, GROUP:=&quot;usrp&quot;, MODE:=&quot;0660&quot;' &gt; tmpfile sudo chown root.root tmpfile sudo mv tmpfile /etc/udev/rules.d/10-usrp.rules