Tournesol
Posts: 1
Joined: Fri Jul 05, 2019 5:33 am

Raspberry Pi 4 RTL-SDR stick not working

Fri Jul 05, 2019 5:42 am

Hi,
Has anybody tested an RTL-SDR stick yet?
I get the following output:
root@Pi4:~ # rtl_test
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 000001

Using device 0: Generic RTL2832U OEM
Found Fitipower FC0012 tuner
Supported gain values (5): -9.9 -4.0 7.1 17.9 19.2
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 1516 bytes
lost at least 478 bytes
lost at least 222 bytes
lost at least 478 bytes
lost at least 222 bytes
lost at least 222 bytes
^CSignal caught, exiting!

User cancel, exiting...
Samples per million lost (minimum): 43
root@Pi4:~ # rtl_test
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 000001

Using device 0: Generic RTL2832U OEM
rtlsdr_read_reg failed with -7
rtlsdr_write_reg failed with -7
rtlsdr_read_reg failed with -7
rtlsdr_write_reg failed with -7
rtlsdr_read_reg failed with -7
rtlsdr_write_reg failed with -7
rtlsdr_read_reg failed with -7
rtlsdr_write_reg failed with -7
No supported tuner found
rtlsdr_demod_write_reg failed with -7
rtlsdr_demod_read_reg failed with -7
rtlsdr_demod_write_reg failed with -7
rtlsdr_demod_read_reg failed with -7
rtlsdr_demod_write_reg failed with -7
rtlsdr_demod_read_reg failed with -7
rtlsdr_demod_write_reg failed with -7
rtlsdr_demod_read_reg failed with -7
Enabled direct sampling mode, input 1
rtlsdr_demod_write_reg failed with -7
rtlsdr_demod_read_reg failed with -7
rtlsdr_demod_write_reg failed with -7
rtlsdr_demod_read_reg failed with -7
rtlsdr_demod_write_reg failed with -7
rtlsdr_demod_read_reg failed with -7

I reverted to the original firmware, but the same result. Tested a different stick: same result!!!

Compiled a little c-program called 'usbreset'. With the help of this program I could (in 80% of the cases) reuse my stick.

Like this...
Resetting USB device /dev/bus/usb/001/004
Reset successful
root@Pi4:~ # rtl_eeprom
Found 1 device(s):
0: Generic RTL2832U OEM

Using device 0: Generic RTL2832U OEM
rtlsdr_read_reg failed with -7
rtlsdr_write_reg failed with -7
rtlsdr_read_reg failed with -7
rtlsdr_write_reg failed with -7
rtlsdr_read_reg failed with -7
rtlsdr_write_reg failed with -7
rtlsdr_read_reg failed with -7
rtlsdr_write_reg failed with -7
^C
root@Pi4:~ # rtl_eeprom
Found 1 device(s):
0: Generic RTL2832U OEM

Using device 0: Generic RTL2832U OEM
rtlsdr_write_reg failed with -7
Resetting device...
Found Fitipower FC0012 tuner

Current configuration:
__________________________________________
Vendor ID: 0x0bda
Product ID: 0x2838
Manufacturer: Realtek
Product: RTL2838UHIDIR
Serial number: 000001
Serial number enabled: yes
IR endpoint enabled: yes
Remote wakeup enabled: no
__________________________________________
root@Pi4:~ #

It makes no difference what port is being used, usb-2 nor usb-3.

Question: Is the new firmware not yet reliable or is there someone with a solution?

Many thanks!!

Elektrik
Posts: 6
Joined: Fri Jul 05, 2019 4:54 pm

Re: Raspberry Pi 4 RTL-SDR stick not working

Sat Jul 06, 2019 7:54 pm

Same here, TVHeadend reports failed scans. dmesg:

Code: Select all

pi@Server:~ $ dmesg | grep dvb
[    6.492776] usb 1-1.3: dvb_usb_v2: found a 'Realtek RTL2832U reference design' in warm state
[    6.584176] usb 1-1.3: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[    6.584215] dvbdev: DVB: registering new adapter (Realtek RTL2832U reference design)
[    6.705184] rc rc0: lirc_dev: driver dvb_usb_rtl28xxu registered at minor = 0, raw IR receiver, no transmitter
[    6.708638] usb 1-1.3: dvb_usb_v2: schedule remote query interval to 200 msecs
[    6.717125] usb 1-1.3: dvb_usb_v2: 'Realtek RTL2832U reference design' successfully initialized and connected
[    6.717365] usbcore: registered new interface driver dvb_usb_rtl28xxu
[   17.954995] Modules linked in: rfcomm bnep hci_uart btbcm serdev bluetooth ecdh_generic evdev r820t rtl2832 i2c_mux brcmfmac brcmutil vc4 sg v3d dvb_usb_rtl28xxu drm_kms_helper dvb_usb_v2 gpu_sched dvb_core snd_soc_core sha256_generic drm snd_compress snd_bcm2835(C) drm_panel_orientation_quirks snd_pcm_dmaengine cfg80211 snd_pcm snd_timer syscopyarea sysfillrect sysimgblt fb_sys_fops snd raspberrypi_hwmon hwmon rfkill bcm2835_codec(C) bcm2835_v4l2(C) v4l2_mem2mem videobuf2_dma_contig bcm2835_mmal_vchiq(C) v4l2_common videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) argon_mem uio_pdrv_genirq uio fixed i2c_dev ip_tables x_tables ipv6
[   17.971256] Modules linked in: rfcomm bnep hci_uart btbcm serdev bluetooth ecdh_generic evdev r820t rtl2832 i2c_mux brcmfmac brcmutil vc4 sg v3d dvb_usb_rtl28xxu drm_kms_helper dvb_usb_v2 gpu_sched dvb_core snd_soc_core sha256_generic drm snd_compress snd_bcm2835(C) drm_panel_orientation_quirks snd_pcm_dmaengine cfg80211 snd_pcm snd_timer syscopyarea sysfillrect sysimgblt fb_sys_fops snd raspberrypi_hwmon hwmon rfkill bcm2835_codec(C) bcm2835_v4l2(C) v4l2_mem2mem videobuf2_dma_contig bcm2835_mmal_vchiq(C) v4l2_common videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) argon_mem uio_pdrv_genirq uio fixed i2c_dev ip_tables x_tables ipv6
[   19.706625] Modules linked in: fuse rfcomm bnep hci_uart btbcm serdev bluetooth ecdh_generic evdev r820t rtl2832 i2c_mux brcmfmac brcmutil vc4 sg v3d dvb_usb_rtl28xxu drm_kms_helper dvb_usb_v2 gpu_sched dvb_core snd_soc_core sha256_generic drm snd_compress snd_bcm2835(C) drm_panel_orientation_quirks snd_pcm_dmaengine cfg80211 snd_pcm snd_timer syscopyarea sysfillrect sysimgblt fb_sys_fops snd raspberrypi_hwmon hwmon rfkill bcm2835_codec(C) bcm2835_v4l2(C) v4l2_mem2mem videobuf2_dma_contig bcm2835_mmal_vchiq(C) v4l2_common videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) argon_mem uio_pdrv_genirq uio fixed i2c_dev ip_tables x_tables ipv6
[   19.723030] Modules linked in: fuse rfcomm bnep hci_uart btbcm serdev bluetooth ecdh_generic evdev r820t rtl2832 i2c_mux brcmfmac brcmutil vc4 sg v3d dvb_usb_rtl28xxu drm_kms_helper dvb_usb_v2 gpu_sched dvb_core snd_soc_core sha256_generic drm snd_compress snd_bcm2835(C) drm_panel_orientation_quirks snd_pcm_dmaengine cfg80211 snd_pcm snd_timer syscopyarea sysfillrect sysimgblt fb_sys_fops snd raspberrypi_hwmon hwmon rfkill bcm2835_codec(C) bcm2835_v4l2(C) v4l2_mem2mem videobuf2_dma_contig bcm2835_mmal_vchiq(C) v4l2_common videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) argon_mem uio_pdrv_genirq uio fixed i2c_dev ip_tables x_tables ipv6
[   24.631827] usb 1-1.3: dvb_usb_v2: rc.query() failed=-110

trejan
Posts: 397
Joined: Tue Jul 02, 2019 2:28 pm

Re: Raspberry Pi 4 RTL-SDR stick not working

Sat Jul 06, 2019 8:06 pm

Previous thread. No workarounds yet. The new USB controller firmware with and without ASPM L1 doesn't fix it.

linux_author
Posts: 248
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico
Contact: Website

Re: Raspberry Pi 4 RTL-SDR stick not working

Mon Jul 08, 2019 12:07 pm

this for these reports; glad to know i'm not alone... it must be a hardware problem, and it makes me wonder if other USB devices are going to have issues... here's my report from another thread; posted it here to keep everything together:

https://www.raspberrypi.org/forums/view ... r#p1494627


jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2030
Joined: Thu Jul 11, 2013 2:37 pm

Re: Raspberry Pi 4 RTL-SDR stick not working

Mon Jul 08, 2019 3:34 pm

Rockets are loud.
https://astro-pi.org

tylerwatt12
Posts: 1
Joined: Fri Jul 12, 2019 1:29 pm

Re: Raspberry Pi 4 RTL-SDR stick not working

Fri Jul 12, 2019 1:31 pm

Looks like it's been resolved. My next question is, how to patch it?
Do I need to compile the kernel? or will a simple apt update/dist-upgrade work?

nailgg
Posts: 6
Joined: Mon Jan 18, 2016 3:08 pm

Re: Raspberry Pi 4 RTL-SDR stick not working

Sat Jul 13, 2019 1:07 pm

tylerwatt12 wrote:
Fri Jul 12, 2019 1:31 pm
Looks like it's been resolved. My next question is, how to patch it?
Do I need to compile the kernel? or will a simple apt update/dist-upgrade work?
Wondering the same. It's not yet merged into the stable release as far as I know, so dist-upgrade probably wouldn't fix it for now.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2030
Joined: Thu Jul 11, 2013 2:37 pm

Re: Raspberry Pi 4 RTL-SDR stick not working

Sat Jul 13, 2019 1:13 pm

It'll probably be in rpi-update firmware early next week. apt packages are getting updated frequently so it shouldn't be too long after that.
Rockets are loud.
https://astro-pi.org

buschauer
Posts: 1
Joined: Sat Feb 10, 2018 4:31 am

Re: Raspberry Pi 4 RTL-SDR stick not working

Sun Jul 14, 2019 7:03 pm

same problem here. waiting for an upgrade.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2030
Joined: Thu Jul 11, 2013 2:37 pm

Re: Raspberry Pi 4 RTL-SDR stick not working

Mon Jul 15, 2019 3:04 pm

The latest rpi-update firmware has a potential fix for this issue. Please test and report back.
Rockets are loud.
https://astro-pi.org

bram jacobse
Posts: 1
Joined: Tue Jul 16, 2019 7:52 am

Re: Raspberry Pi 4 RTL-SDR stick not working

Tue Jul 16, 2019 7:54 am

Working fine :-)

----------
Lost samples in the first 2 seconds after starting the test are common and not a problem!
Starting 30 second rtl_test, standby!

Found 1 device(s):
0: Realtek, RTL2832U, SN: 00001000
Using device 0: Generic RTL2832U
Detached kernel driver
Found Rafael Micro R820T 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
[R82XX] PLL not locked!
Sampling at 2400000 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
Detected Kernel usbfs mmap() bug, falling back to buffers in userspace
lost at least 108 bytes

Signal caught, exiting!
User cancel, exiting…
Samples per million lost (minimum): 0
Reattached kernel driver

Test finished!
More than 2 lost samples per million or other errors probably mean the receiver isn’t working correctly.
Try another power supply before condemning the receiver though!

Return to “Troubleshooting”