SDRTrunk SDRTrunk errors using 4x RTL-SDR receivers on Linux

Status
Not open for further replies.

N3BGA

Member
Premium Subscriber
Joined
Oct 29, 2014
Messages
27
Location
Newburg, PA
I'm trying to monitor a few P25 systems with channels that are not closely spaced, requiring multiple RTL-SDR receivers to cover. I've found that when the 4th receiver is used (not a specific receiver, just the 4th simultaneous one to be brought up), I get USB errors such as:

23:20:44.861 ERROR i.g.d.s.t.u.USBTransferProcessor - [R820T 1001] - USB I/O ERROR while submitting transfer buffers [283MB/393MB 72%]
23:20:44.861 WARN i.g.d.s.t.u.USBTransferProcessor - [R820T 1001] - restart attempt [3] failed - retrying [283MB/393MB 72%]
23:20:44.872 WARN i.g.d.s.t.u.USBTransferProcessor - [R820T 1001] - maximum restart attempts [3] exceeded for tuner - stopping [296MB/393MB 75%]
23:20:44.873 INFO i.g.d.source.tuner.Tuner - [RTL2832 SDR/R820T 1001] tuner is now disabled for error [USB ERROR] [296MB/393MB 75%]

(This was when running sdrtrunk commit e26698d0d881ad9712ac62570e793a8d291fc313, similar errors occurred in releases from earlier in the year).

I've tried spreading the receivers across different USB ports and buses, but it did not seem to make a difference.

I would assume there is some resource that is being exhausted. I'm looking for suggestions on how to troubleshoot, or information on what limitation I am running into.

Thanks!
 

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
Might be a max on the particular USB chip. It might be time to get an add-in PCIe card.
 

relicwr

Member
Premium Subscriber
Joined
Feb 20, 2006
Messages
417
How are you running the sticks? Directly to the board? Do you have extension cables? belvdr is right on recommending something, possibly with extra power (a card with a SATA/Molex power connection on the card).
 

N3BGA

Member
Premium Subscriber
Joined
Oct 29, 2014
Messages
27
Location
Newburg, PA
I have tried with one of the sticks connected to a PCIe USB card, with no apparent difference. The system has some first generation USB 3.0 ports that can act oddly, but since the sticks are 2.x, I don't think that is the issue. May still be worth getting another PCIe/USB card just in case.

I have the sticks connected using 1 meter USB 2.x extension cables for better strain relief, etc. No hubs are used in the connections.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
There is a kernel parameter you have to set to increase (or remove) the limit on memory available for USB devices.

The parameter is:
Code:
/sys/module/usbcore/parameters/usbfs_memory_mb

Default is 16
Either set it to 0 or increase it to something large such as 1024.
Has to be done every time you reboot.
 
Last edited:

N3BGA

Member
Premium Subscriber
Joined
Oct 29, 2014
Messages
27
Location
Newburg, PA
@boatbod - The kernel parameter solved my problem, thank you!


Temporary solution (does not survive reboot):
Code:
# echo 1024 > /sys/module/usbcore/parameters/usbfs_memory_mb


Permanent solution (for Fedora 31):
  1. Edit /etc/sysconfig/grub. Append "usbcore.usbfs_memory_mb=1024" to the GRUB_CMDLINE_LINUX variable.
  2. # grub2-mkconfig -o /boot/grub2/grub.cfg
  3. # reboot
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
@boatbod - The kernel parameter solved my problem, thank you!


Temporary solution (does not survive reboot):
Code:
# echo 1024 > /sys/module/usbcore/parameters/usbfs_memory_mb


Permanent solution (for Fedora 31):
  1. Edit /etc/sysconfig/grub. Append "usbcore.usbfs_memory_mb=1024" to the GRUB_CMDLINE_LINUX variable.
  2. # grub2-mkconfig -o /boot/grub2/grub.cfg
  3. # reboot
There may be an equivalent method for tweaking grub under Debian/Ubuntu/Raspbian but I don't think /etc/sysconfig/grub exists so this is not going to work as posted. I made a small shell script which I call from /etc/rc.local
Code:
#!/bin/sh
PCM_ID="/sys/module/usbcore/parameters/usbfs_memory_mb"
BUFSIZE="1024"

# Adjust usbfs memory
if [ -f $PCM_ID ]; then
        echo $BUFSIZE > $PCM_ID
fi
 

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
There may be an equivalent method for tweaking grub under Debian/Ubuntu/Raspbian but I don't think /etc/sysconfig/grub exists so this is not going to work as posted. I made a small shell script which I call from /etc/rc.local
Code:
#!/bin/sh
PCM_ID="/sys/module/usbcore/parameters/usbfs_memory_mb"
BUFSIZE="1024"

# Adjust usbfs memory
if [ -f $PCM_ID ]; then
        echo $BUFSIZE > $PCM_ID
fi
Generally, the Debian-like series use /etc/default/grub. Frankly, I like the script method above, as it's less maintenance in my head and I don't have to rebuild the grub config any time I want to make a change..
 
Status
Not open for further replies.
Top