EasyManua.ls Logo

Great Scott Gadgets HackRF - HackRF FAQ and Troubleshooting; HackRF Access Issues on Linux

Great Scott Gadgets HackRF
104 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CHAPTER
SEVEN
FAQ
7.1 I can’t seem to access my HackRF under Linux
Question: When running hackrf_info or any other command which tries to communicate with the HackRF, I get
the following error message, although the board seems to be enumerated properly by the Linux kernel:
hackrf_open() failed: HACKRF_ERROR_NOT_FOUND (-5)
or:
hackrf_open() failed: HACKRF_ERROR_LIBUSB (-1000)
Answer:
7.1.1 Using the latest version
First make sure that you are running the latest version of libhackrf and hackrf-tools. HackRF One, for example, is only
supported by release 2014.04.1 or newer. Then check to see if hackrf_info is successful when running as root. If it
is, then your other user is lacking permission.
7.1.2 Permission Problem
A normal user under Linux doesnt have the permissions to access arbitrary USB devices because of security reasons.
The first solution would be to run every command which tries to access the HackRF as root which is not recommended
for daily usage, but at least shows you if your HackRF really works.
To fix this issue, you can write a udev rule to instruct udev to set permissions for the device in a way that it can be
accessed by any user on the system who is a member of a specific group.
(The following things have been tested on Ubuntu and Gentoo and may need to be adapted to other Linux distributions.
In particular, your distro may have a group named something other than plugdev for this purpose.) To do that, you need
to create a new rules file in the /etc/udev/rules.d folder. I called mine 52-hackrf.rules. Here is the content:
ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE=
˓"660", GROUP="plugdev"
ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660",
˓GROUP="plugdev"
ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="hackrf-dfu-%k", MODE="660",
˓GROUP="plugdev"
23

Table of Contents