RuntimeError: Failed to open rtlsdr device

I’m almost there at last! Is this a permission issue?

I notice that there aren’t any USB devices listed under /dev. Should
there be?

Using device #0: ezcap USB 2.0 DVB-T/DAB/FM dongle
usb_open error -3
Traceback (most recent call last):
File “./simple_fm_rcv.py”, line 949, in
tb = simple_fm_rcv(devid=options.devid, volume=options.volume,
rdsfile=options.rdsfile, gain=options.gain, freq=options.freq,
xmlport=options.xmlport, arate=options.arate, mute=options.mute,
ftune=options.ftune, ant=options.ant, subdev=options.subdev,
ahw=options.ahw, deemph=options.deemph, prenames=options.prenames,
prefreqs=options.prefreqs)
File “./simple_fm_rcv.py”, line 402, in init
self.osmosdr_source_c_0 = osmosdr.source_c( args=“nchan=” + str(1)

  • " " + devid )
    File
    “/usr/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py”, line
    431, in source_c
    return _osmosdr_swig.source_c(args)
    RuntimeError: Failed to open rtlsdr device.


Regards,
Phil

Try running the test program that comes with one of the libraries [can’t
remember which one OTTOMH] as yourself and as root. That should answer
the permissions question.

alexd

On 16/06/12 20:11, Alex DEKKER wrote:

Try running the test program that comes with one of the libraries [can’t
remember which one OTTOMH] as yourself and as root. That should answer
the permissions question.

Thanks Alex,

As me, I receive an open usb error and as root I receive a can’t find
librtlsdr.so.0 error. The library is in /usr/local/lib.

How might I set the usb permission?

[phil@localhost src (master)]$ rtl_test -t
Found 1 device(s):
0: ezcap USB 2.0 DVB-T/DAB/FM dongle

Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle
usb_open error -3
Failed to open rtlsdr device #0.
[phil@localhost src (master)]$ su
Password:
[root@localhost src (master)]# rtl_test -t
rtl_test: error while loading shared libraries: librtlsdr.so.0: cannot
open shared object file: No such file or directory
[root@localhost src (master)]#


Regards,
Phil

On 16/06/12 20:31, Phil wrote:

OK I now have simple_FM_rcv running as root!

So all I need now is to set the permission of the dongle. How might I do
that?


Regards,
Phil

On 16/06/12 11:56, Phil wrote:

OK I now have simple_FM_rcv running as root!

So all I need now is to set the permission of the dongle. How might I
do that?

I have an FCD and an RTL dongle. I got the FCD first, for which I
created a udev rule. I duplicated these for the RTL dongle:

$ cat /etc/udev/rules.d/20-fcd.rules
SUBSYSTEM==“usb” ATTRS{idVendor}==“04d8” ATTRS{idProduct}==“fb56”
MODE:=“0666” SYMLINK+=“FCD”
SUBSYSTEM==“usb” ATTRS{idVendor}==“1d19” ATTRS{idProduct}==“1101”
MODE:=“0666” SYMLINK+=“DVB”

In case it’s not obvious, the hex numbers are the VID/PID of the USB
device. You can see these for connected USB devices with lsusb. The MODE
parameter determines the permissions, in this case RW for everybody.
Once the rules are created, reload udev and reinsert the device.

alexd

On 16/06/12 07:14 AM, Alex DEKKER wrote:

$ cat /etc/udev/rules.d/20-fcd.rules

alexd


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page

The rtl-sdr source includes a rules file that can be placed in
/etc/udev/rules.d


Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On 17/06/12 01:23, Marcus D. Leech wrote:

device.

alexd

The rtl-sdr source includes a rules file that can be placed in
/etc/udev/rules.d

Thanks Marcus.


Regards,
Phil

On 17/06/12 02:38, Phil wrote:

By “reload udev” do you mean restart udevd?

To be precise, reloading a service [usually] results in it re-reading
its config without restarting it. Restarting it, stops it and starts it.
Restarting udev will achieve the same end result in this case as
reloading it. With some more heavyweight services [eg squid, apache] a
reload is a lot quicker and less disruptive than a restart.

alexd

On 17/06/12 19:20, Alex DEKKER wrote:

Thanks yet again Alex for the explanation. I now have two different
receivers running. It’s easy, once you know how.


Regards,
Phil

On 16/06/12 21:14, Alex DEKKER wrote:

$ cat /etc/udev/rules.d/20-fcd.rules
SUBSYSTEM==“usb” ATTRS{idVendor}==“04d8” ATTRS{idProduct}==“fb56”
MODE:=“0666” SYMLINK+=“FCD”
SUBSYSTEM==“usb” ATTRS{idVendor}==“1d19” ATTRS{idProduct}==“1101”
MODE:=“0666” SYMLINK+=“DVB”

In case it’s not obvious, the hex numbers are the VID/PID of the USB
device. You can see these for connected USB devices with lsusb. The MODE
parameter determines the permissions, in this case RW for everybody.
Once the rules are created, reload udev and reinsert the device.

Thanks again Alex,

By “reload udev” do you mean restart udevd?


Regards,
Phil