run the same program on the PC it is compiled on gives no error.
Oddly, it did give same error till I followed these instructions in cmake
----------------------------------------------------------------------------------------------
http://m3php.com/2012/10/10/remote-s...tl_tcp/Michele Romanini on April 14, 2014 at 7:55 pm
For the records – to those who might encounter problems “Kernel driver is active, or device is claimed by second instance of librtlsdr […] Failed to open rtlsdr device #0” needs to recompile using this syntax:
cmake ../ -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON
(honesly, my very first working “make”
Cheers.
Reply
luke on December 11, 2014 at 6:06 pm
ahhhh that can also be actually due to something else using the card… didn’t notice any mention of blacklisting DVB modules, which tbh in the version of the RPI’s software used probably wasn’t needed…
but anyway…
add “blacklist dvb_usb_rtl28xxu” (or something else if you have a different usb device) to a file in /etc/modprobe.d/ (i used raspi-blacklist.conf as it seemed sensible)
-----------------------------------------------------------------------------------------
It did run the program
However says could not capture the device
-----------------------------------------------------------------------------------------------
Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.
usb_claim_interface error -6
Failed to open rtlsdr device #0.
------------------------------------------------------------------------------------------------
How to blacklist dvb_usb_rtl28xxu?
Or maybe do this compile time detaching ability?
=--------------------------------------------------
On the MINT 17.3 PC it runs but has the error
boat@boat-MS-7529 ~/rtl-ais $ ./rtl_ais
Edge tuning disabled.
DC filter enabled.
RTL AGC disabled.
Internal AIS decoder enabled.
Buffer size: 163.84 mS
Downsample factor: 64
Low pass: 25000 Hz
Output: 48000 Hz
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.
usb_claim_interface error -6
Failed to open rtlsdr device #0.
boat@boat-MS-7529 ~/rtl-ais $
-------------------------------------------------------------------
NOW ON UBUNTU PC, it runs
scott@scott-P5QC:~/rtl-ais$ ./rtl_ais
Edge tuning disabled.
DC filter enabled.
RTL AGC disabled.
Internal AIS decoder enabled.
Buffer size: 163.84 mS
Downsample factor: 64
Low pass: 25000 Hz
Output: 48000 Hz
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
Detached kernel driver
Found Rafael Micro R820T tuner
Log NMEA sentences to console OFF
AIS data will be sent to 127.0.0.1 port 10110
Tuner gain set to automatic.
Tuned to 162000000 Hz.
Sampling at 1600000 S/s.
^CSignal caught, exiting!
User cancel, exiting...
Reattached kernel driver
scott@scott-P5QC:~/rtl-ais$