You are not logged in.

#1 2021-09-01 20:08:11

tghe-retford
Member
From: Retford, United Kingdom
Registered: 2011-12-08
Posts: 25

[SOLVED] RTL-SDR USB stick permission issue.

I have an issue with my RTL-SDR USB stick where running as a non-root user will report a permission issue. It was working fine under the same circumstances yesterday. I checked the relevant udev file and it all looks fine and clear.

Running rtl_test as non-root:

$ rtl_test
Found 1 device(s):
  0:  Failed to query data

Using device 0: Generic RTL2832U OEM
usb_open error -3
Please fix the device permissions, e.g. by installing the udev rules file rtl-sdr.rules
Failed to open rtlsdr device #0.

And as root:

# rtl_test
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T/2 tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 
Sampling at 2048000 S/s.

Info: This tool will continuously read from the device, and report if
samples get lost. If you observe no further output, everything is fine.

Reading samples in async mode...
Allocating 15 zero-copy buffers
lost at least  32 bytes in buffer 0

So there isn't a hardware issue with the USB stick. I have other RTL-SDR USB sticks and they all have the same problem.

My lsusb output and /usr/lib/udev/rules.d/10-rtl-sdr.rules specific rule is as below:

$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 8087:0029 Intel Corp. AX200 Bluetooth
Bus 003 Device 008: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 003 Device 002: ID 276d:2068  2.4G RF Keyboard & Mouse
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0b05:1866 ASUSTek Computer, Inc. N-KEY Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
# RTL2832U OEM vid/pid, e.g. ezcap EzTV668 (E4000), Newsky TV28T (E4000/R820T) etc.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666"

Reinstalling the rtl-sdr package does nothing. I'm stumped at what could have caused a working installation to suddenly stop working for a non-root user. I did notice systemd had upgraded earlier today but a downgrade to the previous version did not change the outcome. Anything else I could try? Because I don't want and should not need to run any RTL-SDR sticks and software as root. Thanks in advance.

Last edited by tghe-retford (2021-09-02 18:21:57)

Offline

#2 2021-09-02 18:21:42

tghe-retford
Member
From: Retford, United Kingdom
Registered: 2011-12-08
Posts: 25

Re: [SOLVED] RTL-SDR USB stick permission issue.

Solved it.

A second 10-rtl-sdr.rules file was placed in /etc/udev/rules.d which was causing a conflict. Deleting it and rebooting got the USB stick working again with a non-root user. I'll post this here in case anyone searching in future has the same problem and doesn't have to go through the same rigmarole as I did.

Offline

Board footer

Powered by FluxBB