argilo / gr-nrsc5

A GNU Radio implementation of HD Radio (NRSC-5)
GNU General Public License v3.0
129 stars 24 forks source link

Failed to use '0' as HackRF device index: not enough devices #21

Closed thenerdie closed 2 years ago

thenerdie commented 2 years ago

Hey!

I'm trying to transmit with my HackRF, and I keep running into issues. I cloned the repo, ran the batch of commands that were outlined in the README, and tried to run it with GNU Radio Companion. Yesterday I got the error Failed to open HackRF device (-1000) Access denied (insufficient permissions), so I tried tinkering for a few hours to no avail. I even tried this thing and refreshed the rules with udevadm control --reload-rules (just tried it with udevadm trigger, still no luck). Today I keep getting the error Failed to use '0' as HackRF device index: not enough devices both in GNU Radio Companion and by manually executing the Python code with python hd_tx_hackrf.py.

I'm running Manjaro version 21.1.4, and GNU Radio version 3.9.2.

>python hd_tx_hackrf.py
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.9.2.0
built-in sink types: uhd hackrf bladerf soapy redpitaya file 
[INFO] [UHD] linux; GNU C++ version 11.1.0; Boost_107600; UHD_4.1.0.1-0-unknown
Traceback (most recent call last):
  File "/home/kisperal/Projects/gr-nrsc5/apps/hd_tx_hackrf.py", line 191, in <module>
    main()
  File "/home/kisperal/Projects/gr-nrsc5/apps/hd_tx_hackrf.py", line 169, in main
    tb = top_block_cls()
  File "/home/kisperal/Projects/gr-nrsc5/apps/hd_tx_hackrf.py", line 66, in __init__
    self.osmosdr_sink_0 = osmosdr.sink(
RuntimeError: Failed to use '0' as HackRF device index: not enough devices
argilo commented 2 years ago

It sounds to me like something is wrong with your udev setup. I'd suggest following the instructions here: https://hackrf.readthedocs.io/en/latest/faq.html

Since this is not a problem with gr-nrsc5 itself, I'll close off this issue for now.