libusb couldn't open usb device (GNURadio)

1,569 views
Skip to first unread message

Dan

unread,
Jun 16, 2012, 10:17:40 PM6/16/12
to ultra-c...@googlegroups.com
I'm getting the following error in GNURadio when I try to use the RTL2832 source. I have an eztv666. My lsusb output is also below. I set the VID and PID manually, but that shouldn't matter as I seem to have the default values anyway. Looking in the /dev/bus/usb/002/ folder, I don't seem to have a 005. It skips from 004 to 006. Any thoughts as to what is going on here? Thanks!

Executing: "/home/daniel/gnuradio/gnuradio_projects/Personal_Projects/GRC_Projects/top_block.py"

RTL2832
Source block configuration:
   
Read length (bytes): 32768
   
Buffer enabled: yes
   
Buffer multiplier: 8
   
Buffer size (samples): 131072
   
Samples per read: 16384
   
Buffer level: 50.0%
libusb couldn
't open USB device /dev/bus/usb/002/005: Permission denied.
libusb requires write access to USB device nodes.
Could not find a compatible device
Traceback (most recent call last):
  File "/home/daniel/gnuradio/gnuradio_projects/Personal_Projects/GRC_Projects/top_block.py", line 85, in <module>
    tb = top_block()
  File "/home/daniel/gnuradio/gnuradio_projects/Personal_Projects/GRC_Projects/top_block.py", line 49, in __init__
    if self.rtl2832_source_0.create() == False: raise Exception("Failed to create RTL2832 Source: rtl2832_source_0")
Exception: Failed to create RTL2832 Source: rtl2832_source_0

Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 006: ID 0bda:2838 Realtek Semiconductor Corp.
Bus 002 Device 004: ID 147e:1001 Upek
Bus 002 Device 003: ID 04b4:0060 Cypress Semiconductor Corp.
Bus 002 Device 002: ID 8087:0020  
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub



Dan

unread,
Jun 16, 2012, 10:21:27 PM6/16/12
to ultra-c...@googlegroups.com
Oops, looks like the skip from 004 to 006 was because I removed the dongle without restarting gnuradio. Restarting shows it failing to write to 006, which is the dongle (removing it again moves it to 007). I'm still getting a permission denied error though.

Dan

unread,
Jun 16, 2012, 10:25:07 PM6/16/12
to ultra-c...@googlegroups.com
Sorry to triple post. It works when running GNURadio as root. Is it necessary to run as root every time?

Adam Nielsen

unread,
Jun 16, 2012, 10:40:07 PM6/16/12
to ultra-c...@googlegroups.com
> Sorry to triple post. It works when running GNURadio as root. Is it necessary
> to run as root every time?

Not if you follow the many online guides :-P You can add something like this
to a file in /etc/udev to grant normal users permission to the device:

# rule to grant read/write access on RTL2832 to group named usb.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", MODE:="0666"

Obviously changing the device IDs as necessary.

Cheers,
Adam.

Dan

unread,
Jun 17, 2012, 12:06:31 AM6/17/12
to ultra-c...@googlegroups.com
Thanks Adam! Sorry for the confusion. I was using Balint Seeber's wiki but somewhere skipped the pertinent step entirely. My bad on that.

http://wiki.spench.net/wiki/Gr-baz#Permissions
Reply all
Reply to author
Forward
0 new messages