# Problem with gnuradio-companion and HackRF

**URL:** <https://www.ruby-forum.com/t/problem-with-gnuradio-companion-and-hackrf/231951>\
**Category:** GNU Radio\
**Created:** [September 9, 2014, 12:07am UTC](https://www.ruby-forum.com/t/problem-with-gnuradio-companion-and-hackrf/231951 "2014-09-09T00:07:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [September 9, 2014, 12:07am UTC](https://www.ruby-forum.com/t/problem-with-gnuradio-companion-and-hackrf/231951/1 "2014-09-09T00:07:52Z")

</div>

I just reinstalled Ubuntu on my computer, I compiled GNURadio from  
source.

I’m now running GNU Radio Companion 3.7.6git-1-g01deede3

With GNU Radio Companion I can access and listen to radio stations on my  
RTL-SDR dongle just fine. However today I just received my HackRF  
radio.

Now, using the “osmocom Source” & HackRF I receive the following error  
msg.  
“FATAL: No supported devices found to pick from” Is there a driver I  
need to download for HackRF, if so where & how to I add that to my  
system?

Thanks  
George

---

<div class="post-metadata">

**Author:** ![GeorgeF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/77aa72/32.png) [@GeorgeF](https://www.ruby-forum.com/u/GeorgeF)\
**Post date:** [September 9, 2014, 12:20am UTC](https://www.ruby-forum.com/t/problem-with-gnuradio-companion-and-hackrf/231951/2 "2014-09-09T00:20:47Z")

</div>

On Mon, Sep 08, 2014 at 06:06:42PM -0400, GeorgeF wrote:

> Now, using the “osmocom Source” & HackRF I receive the following error  
> msg. “FATAL: No supported devices found to pick from” Is there a  
> driver I need to download for HackRF, if so where & how to I add that  
> to my system?

You need libhackrf. And you’ll probably need to recompile gr-osmosdr  
after installing it:

> **[GitHub - greatscottgadgets/hackrf: low cost software radio platform](https://github.com/greatscottgadgets/hackrf#software-setup)**
>
> low cost software radio platform

Mike

---

<div class="post-metadata">

**Author:** ![GeorgeF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/77aa72/32.png) [@GeorgeF](https://www.ruby-forum.com/u/GeorgeF)\
**Post date:** [September 9, 2014, 12:37am UTC](https://www.ruby-forum.com/t/problem-with-gnuradio-companion-and-hackrf/231951/3 "2014-09-09T00:37:23Z")

</div>

George -

I just finished doing the same thing for my shiny-new Hackrf.  
Here is what worked for me on the same Ubuntu and GNURadio:

sudo apt-get install hackrf-tools

Add a one-line file to enable USB access to hackrf.

sudo gedit  
Start a new file and enter this one line:  
ATTR{idVendor}==“1d50”, ATTR{idProduct}==“6089”,  
SYMLINK+=“hackrf-one-%k”, MODE=“660”, GROUP=“plugdev”  
Right-click on the file tab, click Save As, click on Computer, then go  
to this directory:  
/etc/udev/rules.d Enter this file name: 52-hackrf.rules then  
click Save.

Exit gedit  
_Reboot_\*  
\*  
With Hackrf One plugged in to USB, test it:  
hackrf\_info

A few lines of data should display.

Doug

---

<div class="post-metadata">

**Author:** ![GeorgeF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/77aa72/32.png) [@GeorgeF](https://www.ruby-forum.com/u/GeorgeF)\
**Post date:** [September 9, 2014, 1:55am UTC](https://www.ruby-forum.com/t/problem-with-gnuradio-companion-and-hackrf/231951/4 "2014-09-09T01:55:27Z")

</div>

On Mon, Sep 8, 2014 at 3:35 PM, Doug H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Start a new file and enter this one line:  
> ATTR{idVendor}==“1d50”, ATTR{idProduct}==“6089”, SYMLINK+=“hackrf-one-%k”,  
> MODE=“660”, GROUP=“plugdev”  
> Right-click on the file tab, click Save As, click on Computer, then go to  
> this directory:  
> /etc/udev/rules.d Enter this file name: 52-hackrf.rules  
> then click Save.
> 
> Exit gedit  
> Reboot

That file comes with the hackrf sources and I did not have to reboot  
to have that work. Linux needs less reboots than Windows 🙂

ls pybombs/src/hackrf/host/libhackrf/  
53-hackrf.rules CMakeLists.txt libhackrf.pc.in Readme.md src

> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

–  
Regards,  
Richard Sharpe  
(何以解憂？唯有杜康。–曹操)

---

<div class="post-metadata">

**Author:** ![GeorgeF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/77aa72/32.png) [@GeorgeF](https://www.ruby-forum.com/u/GeorgeF)\
**Post date:** [September 9, 2014, 2:38pm UTC](https://www.ruby-forum.com/t/problem-with-gnuradio-companion-and-hackrf/231951/5 "2014-09-09T14:38:41Z")

</div>

Try this page:

> **[GitHub - greatscottgadgets/hackrf: low cost software radio platform](https://github.com/greatscottgadgets/hackrf)**
>
> low cost software radio platform. Contribute to greatscottgadgets/hackrf development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![GeorgeF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/77aa72/32.png) [@GeorgeF](https://www.ruby-forum.com/u/GeorgeF)\
**Post date:** [September 9, 2014, 2:26pm UTC](https://www.ruby-forum.com/t/problem-with-gnuradio-companion-and-hackrf/231951/6 "2014-09-09T14:26:18Z")

</div>

When I run “sudo apt-get install hackrf-tools” I get the following: “E:  
Unable to locate package hackrf-tools”.

I then assumed that the command should be “sudo apt-get install  
hackrf”. That seemed to install something.

I then added the needed line to 52-hackrf.rules and rebooted.

Now when I run hackrf\_info I received the following:  
hackrf\_open() failed: HACKRF\_ERROR\_NOT\_FOUND (-5)

What else am I missing?

George

---

<div class="post-metadata">

**Author:** ![GeorgeF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/77aa72/32.png) [@GeorgeF](https://www.ruby-forum.com/u/GeorgeF)\
**Post date:** [September 9, 2014, 4:15pm UTC](https://www.ruby-forum.com/t/problem-with-gnuradio-companion-and-hackrf/231951/7 "2014-09-09T16:15:26Z")

</div>

On Tue, Sep 9, 2014 at 5:24 AM, GeorgeF [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> When I run “sudo apt-get install hackrf-tools” I get the following: “E:  
> Unable to locate package hackrf-tools”.
> 
> I then assumed that the command should be “sudo apt-get install hackrf”.  
> That seemed to install something.
> 
> I then added the needed line to 52-hackrf.rules and rebooted.
> 
> Now when I run hackrf\_info I received the following:  
> hackrf\_open() failed: HACKRF\_ERROR\_NOT\_FOUND (-5)

Are you in the group that was mentioned in that line you added?

Does an OpenMoko show when you do lsusb?

Who owns the device /dev/bus/usb/bus-from-usb/number-from-lsusb?

> /etc/udev/rules.d Enter this file name: 52-hackrf.rules  
> Doug
> 
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

–  
Regards,  
Richard Sharpe  
(何以解憂？唯有杜康。–曹操)

---

<div class="post-metadata">

**Author:** ![GeorgeF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/77aa72/32.png) [@GeorgeF](https://www.ruby-forum.com/u/GeorgeF)\
**Post date:** [September 15, 2014, 1:33am UTC](https://www.ruby-forum.com/t/problem-with-gnuradio-companion-and-hackrf/231951/8 "2014-09-15T01:33:12Z")

</div>

I had this same issue with a newly arrived unit.

I had installed libhackrf and hackrf\_tools from the Ubuntu packages,  
then from a tarball version 2014.08.1

The problem was that the Ubuntu libhackrf was still in /use/lib  
and without LD\_LIBRARY\_PATH set, it got used instead of the new one in  
/usr/local/lib.

The answer was to either:

- Uninstall the Ubuntu libhackrf (best) or

- Install the new version into /usr instead of /usr/local or

- set LD\_LIBRARY\_PATH=/usr/local/lib (worst)

> > Now when I run hackrf\_info I received the following:  
> > hackrf\_open() failed: HACKRF\_ERROR\_NOT\_FOUND (-5)
> 
> Are you in the group that was mentioned in that line you added?
> 
> Does an OpenMoko show when you do lsusb?
> 
> Who owns the device /dev/bus/usb/bus-from-usb/number-from-lsusb?

This is what you should see:

$ lsusb  
…  
Bus 002 Device 005: ID 1d50:6089 OpenMoko, Inc.  
…

$ ll /dev/bus/usb/002/005  
crw-rw---- 1 root plugdev 189, 132 Sep 14 16:01 /dev/bus/usb/002/005

$ id  
…  
groups=…,46(plugdev),…

$ ll /dev/hackrf-one-2-4  
lrwxrwxrwx 1 root root 15 Sep 14 16:01 /dev/hackrf-one-2-4 →   
bus/usb/002/005

I got the same error as root too.

Don
