Rtlsdr-device-index not working

I have two RTL SDR receivers on a raspi 3B. The Flightaware Pro + ends up as device 1 due to the hardware configuration. (Device 0 is setup to be a VHF Airband reciever).

I’ve set the advance configuration for rtlsdr-device-index as 1 and it shows up in the /etc/piaware.conf file (copied below), yet the message rate is very low indicating the wrong receiver has been selected. I’ve confirmed that by running rtl_test -d 1 and the test runs, and running for -d 0 there is a conflict indicating that piaware is still grabbing the 0 receiver.

The unit is at a remote location, and swapping the dongle positions is not an easy option.

What am I missing?

Thanks
Chuck

pi@Flattop:~ $ rtl_test -d 0
Found 2 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
1: Realtek, RTL2832U, SN: 00001000

Using device 0: Generic RTL2832U OEM
usb_claim_interface error -6
Failed to open rtlsdr device #0.

pi@Flattop:~ $ rtl_test -d 1
Found 2 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
1: Realtek, RTL2832U, SN: 00001000

Using device 1: Generic RTL2832U
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
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…
^CSignal caught, exiting!

/etc/piaware.config

This file configures piaware and related software.

You can edit it directly or use piaware-config from the command line

to view and change settings.

If /boot/piaware-config.txt also exists, then settings present in

that file will override settings in this file.

allow-auto-updates no # updated by fa_piaware_config
allow-manual-updates yes # updated by fa_piaware_config
receiver-type rtlsdr # updated by fa_piaware_config
rtlsdr-device-index 1 # updated by fa_piaware_config
allow-modeac yes # updated by fa_piaware_config

Set the advance configuration for rtlsdr-device-index as 0 instead of 1

sudo piaware-config rtlsdr-device-index 0

sudo systemctl restart piaware

@n0nhj

One alternative is to change rtlsdr-device-index in configuration, as shown in my post above.

Another alternative is to change serial number of ProStick from 00001000 to 00000001, and Generic dongle from 00000001 to 00000000.

Dongle Displayed As Default Serial Modified Serial
Generic RTL2838UHIDIR 00000001 00000000
ProStick RTL2832U 00001000 00000001

How to Change Serial Number of Dongle

.

1 Like

Have already done that, and it doesn’t appear to be picked up. if you look at what I posted above the config file already contains the device index 1 (which is the dongle it needs to use). I did try 0 during the course of trouble shooting, and there was no change.

.

Try changing Serial number of dongles to 00000000 and 00000001 as suggested in my last post above.

Have tried changing the serial number as suggested and no change. Also tried reversing them and keeping index 0 and still not working. Can stop the dump1090-fa process, and start the broadcast which will pickup the correct dongle, but then dump1090-fa will not run.

Solved - found /etc/default/dump1090-fa Changing device index here solved the problem.

# dump1090-fa configuration
# This is read by the systemd service file as an environment file,
# and evaluated by some scripts as a POSIX shell fragment.

# If you are using a PiAware sdcard image, this config file is regenerated
# on boot based on the contents of piaware-config.txt; any changes made to this
# file will be lost.

RECEIVER_OPTIONS="--device-index 1 --gain -10 --ppm 0 --net-bo-port 30005"
DECODER_OPTIONS="--max-range 360"
NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1000 --net-ro-interval 1 --net-ri-port 0 --net-ro-port 30002 -$
JSON_OPTIONS="--json-location-accuracy 1"

What is your install? Is it:

  1. Piaware SD Card image written to your microSD Card
    OR
  2. Raspbian (Jessie/Stretch) image written to your microSD card, then you installed Piaware and dump1090-fa by package install.
    OR
  3. Something else

.

Please note that the device-index can be set by command (sudo piaware-config rtlsdr-device-index) ONLY in Piaware SD Card image.

.

For Raspbian (Jessie/Stretch) image with dump1090-fa and Piaware add-on package install, you have to edit file /etc/default/dump1090-fa and enter the value (0 or 1) of --device-index in it, AS SHOWN BELOW:

sudo nano /etc/default/dump1090-fa

In the file opened, scroll down to the line starting with RECEIVER_OPTIONS, and change --device index 0 to --device-index 1
.
RECEIVER_OPTIONS="--device-index 0 --gain -10 --lat 43.xxxx --lon -79.xxxx --ppm 0 --net-bo-port 30005"
DECODER_OPTIONS="--max-range 360"
NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1000 --net-ro-interval 1 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005"
JSON_OPTIONS="--json-location-accuracy 1"

.

Save file and restart dump1090-fa

sudo systemctl restart dump1090-fa

.