r820tweak icon indicating copy to clipboard operation
r820tweak copied to clipboard

Failed to start from Raspberry PI 3

Open bousqi opened this issue 8 years ago • 2 comments

Python interface refuses to start. Any hint to fix it ?

rpi-stable:/usr/local/src/rt2382 $ r820tweak /usr/local/bin/r820tweak:258: wxPyDeprecationWarning: Using deprecated class PySimpleApp. app = wx.PySimpleApp() Traceback (most recent call last): File "/usr/local/bin/r820tweak", line 266, in main() File "/usr/local/bin/r820tweak", line 260, in main MyPanel(frame,-1) File "/usr/local/bin/r820tweak", line 169, in init value=self.device_list[0], IndexError: list index out of range

bousqi avatar Dec 14 '16 21:12 bousqi

I just had a very similar mail, so I will repost my reply:

Hello,

I can think of two possible reasons for this:

  1. The modified librtlsdr.so was not loaded by any program - this means you haven't started any SDR software via r820tweak, e.g to run gqrx with the custom driver, you need to type "r820tweak gqrx". In this case, the GUI counterpart is unable to communicate with the modified driver and it will fail. Note that r820tweak can only modify the i2c registers of already initialized (opened) device, for a number of reasons, one of them is this is the only way to know the device has gone through a proper initialization. You cannot tweak registers of non-active devices, they have to be running and they have to be running the modified librtlsdr.so. Obviously, r820tweak needs to die in a more graceful manner in cases like that, with useful error messages, sorry for that, I guess that was confusing.

  2. It is also possible but not likely that this is a filesystem permissions issue - since it uses unix domain sockets in /var/tmp - if the directory is not writable or the sockets are owned by different user with no permissions to read/write by the user that runs the GUI, it would fail the same way.

Apparently error reporting needs to improve :)

Regards, Milen

gat3way avatar Dec 14 '16 23:12 gat3way

The answer is in the terminal:

......

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 FATAL: Failed to open rtlsdr device. ......

use $ rmmod -f dvb_usb_rtl28xxu

sv1 avatar Dec 16 '16 15:12 sv1