rtl_test: rtlsdr_demod_write_reg failed with -4

5,349 views
Skip to first unread message

Alain De Carolis

unread,
Jun 28, 2012, 10:13:34 PM6/28/12
to ultra-c...@googlegroups.com
Hello all,

believe it or not, my Hama Nano works perfectly on OSX 10.7 but doesn't work on Linux Ubuntu 12.04.

When on Linux the only thing that works is the tuner test (rtl_test -t). When trying to fetch actual data I get error -4 (see below).
The machine is an Asus eee PC 900 and gnu-radio has been installed with the automatic script. I tried compiling manually rtl-sdr but came to the same results.

I believe there must be something wrong with my PC... but what could it be? Has anybody else experienced the same problem?

Thanks

Alain



alain@alain-900:~/rtl-sdr/src$ ./rtl_test -t
Found 1 device(s):
  0:  Generic RTL2832U (e.g. hama nano)

Using device 0: Generic RTL2832U (e.g. hama nano)
Found Elonics E4000 tuner
Supported gain values (18): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0 43.0 45.0 47.0 49.0
Benchmarking E4000 PLL...
[E4K] PLL not locked for 51000000 Hz!
[E4K] PLL not locked for 2175000000 Hz!
[E4K] PLL not locked for 1088000000 Hz!
[E4K] PLL not locked for 1225000000 Hz!
E4K range: 52 to 2174 MHz
E4K L-band gap: 1088 to 1225 MHz

alain@alain-900:~/rtl-sdr/src$ ./rtl_test
Found 1 device(s):
  0:  Generic RTL2832U (e.g. hama nano)

Using device 0: Generic RTL2832U (e.g. hama nano)
Found Elonics E4000 tuner
Supported gain values (18): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0 43.0 45.0 47.0 49.0
Reading samples in async mode...
lost at least 64 bytes

Library error 0, exiting...
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_write_reg failed with -4

Adam Nielsen

unread,
Jun 29, 2012, 12:28:23 AM6/29/12
to ultra-c...@googlegroups.com
> I believe there must be something wrong with my PC... but what could it
> be? Has anybody else experienced the same problem?

Does dmesg say anything relevant? Have you tried different USB ports?
Have you tried running as root, in case it's a permissions thing?

Cheers,
Adam.

Alain De Carolis

unread,
Jun 29, 2012, 12:41:50 AM6/29/12
to ultra-c...@googlegroups.com
Yes I tried as root. Not a problem of permissions. I tried using each of the 3 different ports available in the laptop... No differences.
Dmesg, however, shows something definitely interesting:

[12038.333925] usb 1-2: usbfs: usb_submit_urb returned -121
[12038.335066] usb 1-2: usbfs: usb_submit_urb returned -121
[12038.335879] usb 1-2: usbfs: usb_submit_urb returned -121
[12038.336506] hub 1-0:1.0: port 2 disabled by hub (EMI?), re-enabling...
[12038.336518] usb 1-2: USB disconnect, device number 6
[12038.580039] usb 1-2: new full-speed USB device number 7 using uhci_hcd

According to various searched the problem might be related to the Linux Kernel... This is what I am running now:

alain@alain-900:~$ uname -a
Linux alain-900 3.2.0-23-generic-pae #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012 i686 i686 i386 GNU/Linux

will have to try something older than 3.2.0

thanks for the input!

Alain

Sexton Sexton

unread,
Jul 12, 2012, 9:04:11 AM7/12/12
to ultra-c...@googlegroups.com
Did you solve it? Mine works on two laptops but on the raspberry pi all i get is the same read/write errors.Tried debian and fedora same result.

Paulino Kenji Sato

unread,
Jul 12, 2012, 4:12:25 PM7/12/12
to ultra-c...@googlegroups.com
Hello,
I don't have Ubuntu here, but, decided to test on Debian Testing
(after upgrade).
lib rtlsdr recompiled after upgrade.

$ cat /etc/debian_version
wheezy/sid

$ uname -a
Linux desknote-a929 3.2.0-3-686-pae #1 SMP Thu Jun 28 08:56:46 UTC
2012 i686 GNU/Linux

$ dpkg -l libusb*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii libusb-0.1-4:i 2:0.1.12-20 userspace USB programming library
ii libusb-1.0-0:i 2:1.0.11-1 userspace USB programming library
ii libusb-1.0-0-d 2:1.0.11-1 userspace USB programming library developmen
ii libusb-dev 2:0.1.12-20 userspace USB programming library developmen
ii libusbmuxd1 1.0.7-2 USB multiplexor daemon for iPhone and iPod T

$ lspci -nnk | grep -i usb -A 2
00:08.0 USB controller [0c03]: VIA Technologies, Inc. VT82xxxxx UHCI
USB 1.1 Controller [1106:3038] (rev 50)
Subsystem: Elitegroup Computer Systems Device [1019:0f09]
Kernel driver in use: uhci_hcd
00:08.1 USB controller [0c03]: VIA Technologies, Inc. VT82xxxxx UHCI
USB 1.1 Controller [1106:3038] (rev 50)
Subsystem: Elitegroup Computer Systems Device [1019:0f09]
Kernel driver in use: uhci_hcd
00:08.2 USB controller [0c03]: VIA Technologies, Inc. USB 2.0
[1106:3104] (rev 51)
Subsystem: Elitegroup Computer Systems Device [1019:0f09]
Kernel driver in use: ehci_hcd

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0bda:2832 Realtek Semiconductor Corp. RTL2832U DVB-T

$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 6
model name : mobile AMD Athlon(tm) XP 1500+
stepping : 2
cpu MHz : 1327.605
cache size : 256 KB

$ free -m
total used free shared buffers cached
Mem: 494 288 205 0 12 216
-/+ buffers/cache: 58 435
Swap: 556 0 556

$ rtl_test -t
Found 1 device(s):
0: Generic RTL2832U (e.g. hama nano)

Using device 0: Generic RTL2832U (e.g. hama nano)
Found Elonics E4000 tuner
Supported gain values (18): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0
21.5 24.0 29.0 34.0 42.0 43.0 45.0 47.0 49.0
Benchmarking E4000 PLL...
[E4K] PLL not locked for 51000000 Hz!
[E4K] PLL not locked for 2188000000 Hz!
[E4K] PLL not locked for 1094000000 Hz!
[E4K] PLL not locked for 1255000000 Hz!
E4K range: 52 to 2187 MHz
E4K L-band gap: 1094 to 1255 MHz


$ time rtl_test
Found 1 device(s):
0: Generic RTL2832U (e.g. hama nano)

Using device 0: Generic RTL2832U (e.g. hama nano)
Found Elonics E4000 tuner
Supported gain values (18): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0
21.5 24.0 29.0 34.0 42.0 43.0 45.0 47.0 49.0
Reading samples in async mode...
^CSignal caught, exiting!

User cancel, exiting...

real 3m54.475s
user 0m4.736s
sys 0m4.252s


No erros.

rtlsdr lib is not original. With Leif Asbrink (Linrad) patch.

Test is done on old machine, cpu don have power to demodulate WFM.

Cheers,
Paulino

Alain De Carolis

unread,
Jul 12, 2012, 6:38:15 PM7/12/12
to ultra-c...@googlegroups.com
Hi,

I solved the problem forcing the update of libusb to the very last build available for ubuntu (2:1.0.12-1).
The eee900 now works fine, however it has not enough processing power to handle 1Msps. I still cannot manage to set a lower rate via ExtIO, but I will address tht problem in a separate thread...

Alain

pe2bz

unread,
Aug 27, 2012, 9:18:41 AM8/27/12
to ultra-c...@googlegroups.com
Hi,

I did run into the same problems today with the Raspberry Pi and the read write errors.

I've got it solved. For me, the power output to the rtl-sdr was way to low (I used a cheap usb to micro usb cable)
I had only 3,3 - 3,9 Volt on the USB output and that made the rtl-sdr connect and disconnect. Now I used a thicker cable and I have 4.97 Volt and all runs great now.

Hope this solves it for you too !

Regards,
Ben

Op donderdag 12 juli 2012 15:04:11 UTC+2 schreef Sexton Sexton het volgende:

Storer, Darren

unread,
Aug 27, 2012, 3:34:13 PM8/27/12
to ultra-c...@googlegroups.com
Hi Alain,

the Hama Nano is working well here under Ubuntu 11.04. I forced the system to load an older version of Ubuntu after the advice of Chris, G8HCB.

73 de Darren
G7LWT


--
You received this message because you are subscribed to the Google Groups "Ultra Cheap SDR" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ultra-cheap-sdr/-/vEAQoHfPnssJ.
To post to this group, send email to ultra-c...@googlegroups.com.
To unsubscribe from this group, send email to ultra-cheap-s...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ultra-cheap-sdr?hl=en.

Reply all
Reply to author
Forward
0 new messages