Forum: GNU Radio RuntimeError: Failed to open rtlsdr device

389ad6d3564ada178e6267608fca5df9?d=identicon&s=25 Phil (Guest)
on 2012-06-16 11:53
(Received via mailing list)
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 <module>
     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
Ad391e772e72e9564d8441f65bc9c0de?d=identicon&s=25 Alex DEKKER (Guest)
on 2012-06-16 12:12
(Received via mailing list)
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
389ad6d3564ada178e6267608fca5df9?d=identicon&s=25 Phil (Guest)
on 2012-06-16 12:32
(Received via mailing list)
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
389ad6d3564ada178e6267608fca5df9?d=identicon&s=25 Phil (Guest)
on 2012-06-16 12:56
(Received via mailing list)
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
Ad391e772e72e9564d8441f65bc9c0de?d=identicon&s=25 Alex DEKKER (Guest)
on 2012-06-16 13:14
(Received via mailing list)
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
558c40b97bd1af8d912424757714bda9?d=identicon&s=25 Marcus D. Leech (Guest)
on 2012-06-16 17:24
(Received via mailing list)
On 16/06/12 07:14 AM, Alex DEKKER wrote:
> $ cat /etc/udev/rules.d/20-fcd.rules
>
> alexd
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
The rtl-sdr source includes a rules file that can be placed in
/etc/udev/rules.d


--
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org
389ad6d3564ada178e6267608fca5df9?d=identicon&s=25 Phil (Guest)
on 2012-06-17 03:39
(Received via mailing list)
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
389ad6d3564ada178e6267608fca5df9?d=identicon&s=25 Phil (Guest)
on 2012-06-17 03:41
(Received via mailing list)
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
Ad391e772e72e9564d8441f65bc9c0de?d=identicon&s=25 Alex DEKKER (Guest)
on 2012-06-17 11:21
(Received via mailing list)
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
389ad6d3564ada178e6267608fca5df9?d=identicon&s=25 Phil (Guest)
on 2012-06-17 11:46
(Received via mailing list)
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
This topic is locked and can not be replied to.