How-to Serialize Dongles for ES1090 + UAT978

1 - How to Change Serial Number of Dongles

Basically it is done by following command:
rtl_eeprom -s [desired_serial_number]

1.1 - Prepare

sudo apt update
sudo apt install rtl-sdr

sudo systemctl stop piaware dump1090-fa dump978-fa

1.2 - Serialize dump1090-fa dongle
Serialization is done one dongle at a time.
Lets start with serializing dump1090-fa dongle.

Plugin the dump1090-fa dongle, and unplug all other dongles.
Give following command:

rtl_eeprom -s 00001090

The last line of output generated will be:
Write new configuration to device [y/n]?
Press y then press Enter key.

Put a sticker on dongle and write the serial number you have assigned

1.3 - Serialize dump978-fa dongle
Unplug dump1090-fa dongle, and plugin dump978-fa dongle, and give this command

rtl_eeprom -s 00000978

The last line of output generated will be:
Write new configuration to device [y/n]?
Press y then press Enter key.

Put a sticker on dongle and write the serial number you have assigned

1.4 - Un-plug, then re-plug both dongles, and REBOOT

1.5 - After reboot, issue following command to check that serial numbers have actually changed to desired values:

rtl_test -t

And that’s all :slight_smile:

------- ------ ----- ----- ----- -----
------- ------ ----- ----- ----- -----
------- ------ ----- ----- ----- -----

2 - BACKGROUND INFO

2.1 - Options to identify a dongle

There are two numbers by which dongle is identified by a decoder software:

2.1.1 - The device number
The device number is assigned by the computer. If there is only one dongle plugged-in, it is assigned device number 0. If two dongles are plugged-in, one is assigned device number 0 and the other device number 1. In case of two dongles, which one gets number 0 and which one get number 1 is randomly decided by the computer.

2.1.2 - The serial number
This is the number saved in memory (eeprom) of the dongle, and is NOT randomly decided by the computer. It is an eight-digit number. Generally factory default for serial numbers is 00000000. This number however can be changed by user and saved in dongle’s eeprom memory.

2.2 - Best way to identify a dongle

When using 2 dongles and 2 decoders (1090 & 978), the best way to identify dongles is to identify these by serial number. This considts of following two steps:

2. 2.1 - Change factory assigned default number
In both dongles, change 00000000, by two different 8-digit serial numers. For example, one dongle is given number 0000011 or 00000101, and the other 00000012 or 00000102.

NOTE:
(a) Please do NOT use serial numbers 00000000, 00000001, or 00000002, 00000003 etc, as it will conflict with device numbers 0, 1, 2, 3.

(b) Do not assign a two or three digit number like 14 or 112. Instead use its 8-digit version 00000014 or 00000112.

12 Likes

hello abcd567, your “How To’s” are great…i continue to suggest the FA put them in a special file so all know they exist (in something like FAQ only call it HowTo’s or similar)…well done…as usual

3 Likes

You mean 8-digit yes? :slight_smile:

One could always use 00000978 and 00001090 as serial numbers .

Nicely done guide.

I believe stopping some services is missing otherwise there will be USB claim errors:

sudo systemctl stop piaware dump1090-fa dump978-fa dump1090
4 Likes

.
Good catch. Although I wrote it in Feb 2018 thread, here I forgot it. Added it now. Thanks for pointing it out.

Smart idea. Easy to remeber.

4 Likes

I came here to suggest this. This is how I set up mine.

3 Likes

They don’t have to be numbers, at least for the std rtl-sdr.

Found 3 device(s):
0: Realtek, RTL2838UHIDIR, SN: stratux:1090
1: Realtek, RTL2838UFA, SN: 00000060
2: Realtek, RTL2838UFA, SN: 00000049

2 Likes

Bad News

The dump978-fa insists to use device 0, and totally ignores serial number of dongle.

It fails to start if dump1090-fa grabs device 0 as in this situation

rtl_test -t
Found 2 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00001090
  1:  Realtek, RTL2832UFA, SN: 00000978

.
It start only if dump1090-fa does NOT use device 0 as in this situation:

rtl_test -t
Found 2 device(s):
  0:  Realtek, RTL2832UFA, SN: 00000978
  1:  Realtek, RTL2838UHIDIR, SN: 00001090

I tried to add --device-index 00000978 in file /etc/default/dump978-fa, but it rejected --device-index as an invalid argument.

That’s not the correct syntax.
This is:

RECEIVER_OPTIONS="--sdr driver=rtlsdr,serial=00003000 --sdr-gain 49 --format CS8"

This for AGC:

RECEIVER_OPTIONS="--sdr driver=rtlsdr,serial=00003000 --sdr-auto-gain --format CS8"
1 Like

Thanks, will try it now.
From where you found this? I tried dump978-fa --help, and it did NOT show anything about serial=

It is in the github build notes for dump078-fa

3 Likes

That wrongly states --sdr-device instead of --sdr

But yeah that and discussion with obj in the other thread you created abcd567 :slight_smile:

1 Like

I know.

I am hoping to get my airspy to work with dump978-fa in the next few days. The rtl-sdr dongle works well.

My Odroid XU4 is working again and I have an Ordoid N2 due any day.

1 Like

@wiedehopf
@jonhawkes2030

The first post was TL;DR.
Also it also did NOT contain modifications of /etc/default/dump1090-fa and /etc/default/dump978-fa.

In view of above, I have modified it completely to make it easy to follow.

2 Likes

I believe I’m having a similar issue. I serialized the dongles but when I issue the rtl_test -t command I get the following output.

Sometimes 1090 skyview shows flights and 978 doesn’t. Sometimes 978 skyview shows flights and 1090 doesn’t. Sometimes neither work.

Does anyone have a suggestion about how to fix this? I suspect the issues I’m having are due to the usb_claim error?

Found 2 device(s):
0: Realtek, RTL2832U, SN: 00001090
1: Realtek, RTL2832U, SN: 00000978

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

I also checked the /etc/default/dump978-fa and /etc/default/dump1090-fa files and both reference the device indexes that match the serial numbers I set on the dongles.

cat /etc/default/dump978-fa
ENABLED=yes
RECEIVER_OPTIONS=“–sdr driver=rtlsdr,serial=00000978 --raw-port 30978 --json-port 30979”

cat /etc/default/dump1090-fa
ENABLED=yes
DECODER_OPTIONS=“–max-range 360”
NET_OPTIONS=“–net --net-heartbeat 60 --net-ro-size 1000 --net-ro-interval 1 --net-http-port 0 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104”
JSON_OPTIONS=“–json-location-accuracy 2”
RECEIVER_OPTIONS=“–net-bo-port 30005 --fix --device-index 00001090 --gain -10 --ppm 0”

1 Like

@tg0758

1. As the dongle are in use by dump978 and dump1090, the test will show usb_claim error. You have to first stop the dumps before testing the dongles

sudo systemctl stop piaware
sudo systemctl stop dump978-fa
sudo systemctl stop dump1090-fa

After test, do not forget to reboot Pi to restart everything shutdown during the test.

2. You can test selectively using device number

  • To test device 0:
    rtl_test -t -d 0

  • To test device 1:
    rtl_test -t -d 1

`

3. You can test selectively using serial number

  • To test device serial 00000978 :
    rtl_test -t -d 00000978

  • To test device seial number 00001090:
    rtl_test -t -d 00001090

Do a reboot and then check the log when the problem occurs:

sudo journalctl -eu dump1090-fa 
sudo journalctl -eu dump978-fa

If you are using the piaware sd-card image, did you set the serial numbers via piaware-config?

Using two dongles requires a good power supply, probably one of the specialized ones that use 5.2 V instead of 5 V to offset some losses in the input of the RPi.

I stopped the services and ran the test. Is this an issue? No E4000 tuner found, aborting.

I was able to run the command using device number and serial number. See output below.

rtl_test -t -d 00000978
Found 2 device(s):
0: Realtek, RTL2832U, SN: 00001090
1: Realtek, RTL2832U, SN: 00000978
Using device 1: 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 2048000 S/s.
No E4000 tuner found, aborting.
Reattached kernel driver

rtl_test -t -d 00001090
Found 2 device(s):
0: Realtek, RTL2832U, SN: 00001090
1: Realtek, RTL2832U, SN: 00000978
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 2048000 S/s.
No E4000 tuner found, aborting.
Reattached kernel driver

It seems happy at the moment. Have 1090 traffic showing up. No 978 traffic this morning but 978 does seem to be up.

I did see some weirdness on the 978 output. Do you see any issues in the output below?

As far as the piaware sd-card image- i downloaded the 3.7.01 and followed the quickstart post. piaware config below. It does look like the serial numbers got set by fa piware config automatically.

I’ll check into the power supply.

sudo journalctl -eu dump1090-fa
– Logs begin at Thu 2016-11-03 17:16:42 UTC, end at Mon 2019-04-15 11:33:30 UTC. –
Apr 15 11:26:53 piaware systemd[1]: Started dump1090 ADS-B receiver (FlightAware customization).
Apr 15 11:26:53 piaware dump1090-fa[406]: Mon Apr 15 11:26:53 2019 UTC dump1090-fa 3.7.0.1 starting up.
Apr 15 11:26:53 piaware dump1090-fa[406]: rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832U, SN 00001090)
Apr 15 11:26:53 piaware dump1090-fa[406]: Detached kernel driver
Apr 15 11:26:54 piaware dump1090-fa[406]: Found Rafael Micro R820T tuner
Apr 15 11:26:54 piaware dump1090-fa[406]: rtlsdr: enabling tuner AGC

sudo journalctl -eu dump978-fa
Apr 15 11:26:54 piaware dump978-fa[409]: Detached kernel driver
Apr 15 11:26:54 piaware dump978-fa[409]: Found Rafael Micro R820T tuner
Apr 15 11:26:54 piaware dump978-fa[409]: Reattached kernel driver
Apr 15 11:26:55 piaware dump978-fa[409]: Detached kernel driver
Apr 15 11:26:55 piaware dump978-fa[409]: Found Rafael Micro R820T tuner
Apr 15 11:26:55 piaware dump978-fa[409]: Exact sample rate is: 2083333.135571 Hz
Apr 15 11:26:55 piaware dump978-fa[409]: [R82XX] PLL not locked!
Apr 15 11:26:55 piaware dump978-fa[409]: SoapySDR: using maximum manual gain 49.6 dB
Apr 15 11:26:55 piaware dump978-fa[409]: SoapySDR: INFO: Using format CS8.
Apr 15 11:26:55 piaware dump978-fa[409]: [::]:30978: accepted a connection from [::1]:50296
Apr 15 11:26:57 piaware dump978-fa[409]: [::]:30978: accepted a connection from [::1]:50300
Apr 15 11:28:16 piaware dump978-fa[409]: Sample source reports error: TIMEOUT
Apr 15 11:28:16 piaware dump978-fa[409]: Reattached kernel driver
Apr 15 11:28:16 piaware systemd[1]: dump978-fa.service: Main process exited, code=exited, status=1/FAILURE
Apr 15 11:28:16 piaware systemd[1]: dump978-fa.service: Unit entered failed state.
Apr 15 11:28:16 piaware systemd[1]: dump978-fa.service: Failed with result ‘exit-code’.
Apr 15 11:28:47 piaware systemd[1]: dump978-fa.service: Service hold-off time over, scheduling restart.
Apr 15 11:28:47 piaware systemd[1]: Stopped dump978 ADS-B UAT receiver.
Apr 15 11:28:47 piaware systemd[1]: Started dump978 ADS-B UAT receiver.
Apr 15 11:28:47 piaware dump978-fa[1296]: raw-port: listening for connections on 0.0.0.0:30978
Apr 15 11:28:47 piaware dump978-fa[1296]: raw-port: listening for connections on [::]:30978
Apr 15 11:28:47 piaware dump978-fa[1296]: json-port: listening for connections on 0.0.0.0:30979
Apr 15 11:28:47 piaware dump978-fa[1296]: json-port: listening for connections on [::]:30979
Apr 15 11:28:47 piaware dump978-fa[1296]: usb_claim_interface error -6
Apr 15 11:28:47 piaware dump978-fa[1296]: Detached kernel driver
Apr 15 11:28:48 piaware dump978-fa[1296]: Found Rafael Micro R820T tuner
Apr 15 11:28:48 piaware dump978-fa[1296]: Reattached kernel driver
Apr 15 11:28:48 piaware dump978-fa[1296]: Detached kernel driver
Apr 15 11:28:48 piaware dump978-fa[1296]: Found Rafael Micro R820T tuner
Apr 15 11:28:49 piaware dump978-fa[1296]: Exact sample rate is: 2083333.135571 Hz
Apr 15 11:28:49 piaware dump978-fa[1296]: [R82XX] PLL not locked!
Apr 15 11:28:49 piaware dump978-fa[1296]: SoapySDR: using maximum manual gain 49.6 dB
Apr 15 11:28:49 piaware dump978-fa[1296]: SoapySDR: INFO: Using format CS8.
Apr 15 11:29:16 piaware dump978-fa[1296]: [::]:30978: accepted a connection from [::1]:50310
Apr 15 11:29:18 piaware dump978-fa[1296]: [::]:30978: accepted a connection from [::1]:50312

cat piaware-config.txt

1090MHZ RECEIVER CONFIGURATION

rtlsdr-gain max

OTHER CONFIGURATION

Should automatic system updates (initiated by FlightAware) be allowed?

allow-auto-updates yes

Should manual system updates (initiated by you from the website control

panel) be allowed?

allow-manual-updates yes

Should PiAware enable multilateration where possible?

You may need to disable this if multilateration overloads your receiver.

allow-mlat yes

Should PiAware enable reception of Mode A/C messages when requested?

You may need to disable this if processing Mode A/C overloads your receiver.

allow-modeac yes

Additional settings can be added below.

feeder-id XXXXX # updated by fa_piaware_config
uat-receiver-type sdr # updated by fa_piaware_config
rtlsdr-device-index 00001090 # updated by fa_piaware_config
uat-sdr-device driver=rtlsdr,serial=00000978 # updated by fa_piaware_config

dump1090 has been running for 24hrs however dump978 restarts regularly. It’s been running for about an hour since the service last restarted. Here is the output. Any ideas?

sudo journalctl -eu dump978-fa

Apr 16 03:42:01 piaware systemd[1]: Started dump978 ADS-B UAT receiver.

Apr 16 03:42:01 piaware dump978-fa[8080]: raw-port: listening for connections on 0.0.0.0:30978

Apr 16 03:42:01 piaware dump978-fa[8080]: raw-port: listening for connections on [::]:30978

Apr 16 03:42:01 piaware dump978-fa[8080]: json-port: listening for connections on 0.0.0.0:30979

Apr 16 03:42:01 piaware dump978-fa[8080]: json-port: listening for connections on [::]:30979

Apr 16 03:42:01 piaware dump978-fa[8080]: usb_claim_interface error -6

Apr 16 03:42:01 piaware dump978-fa[8080]: Detached kernel driver

Apr 16 03:42:01 piaware dump978-fa[8080]: Found Rafael Micro R820T tuner

Apr 16 03:42:02 piaware dump978-fa[8080]: Reattached kernel driver

Apr 16 03:42:02 piaware dump978-fa[8080]: Detached kernel driver

Apr 16 03:42:02 piaware dump978-fa[8080]: Found Rafael Micro R820T tuner

Apr 16 03:42:02 piaware dump978-fa[8080]: Exact sample rate is: 2083333.135571 Hz

Apr 16 03:42:03 piaware dump978-fa[8080]: [R82XX] PLL not locked!

Apr 16 03:42:03 piaware dump978-fa[8080]: SoapySDR: using maximum manual gain 49.6 dB

Apr 16 03:42:03 piaware dump978-fa[8080]: SoapySDR: INFO: Using format CS8.

Apr 16 03:42:10 piaware dump978-fa[8080]: [::]:30978: accepted a connection from [::1]:50324

Apr 16 03:42:31 piaware dump978-fa[8080]: [::]:30978: accepted a connection from [::1]:50326

Apr 16 10:16:58 piaware dump978-fa[8080]: [::1]:50324: connection closed

Apr 16 10:16:59 piaware dump978-fa[8080]: Caught signal 15, exiting

Apr 16 10:16:59 piaware systemd[1]: Stopping dump978 ADS-B UAT receiver…

Apr 16 10:17:01 piaware dump978-fa[8080]: Reattached kernel driver

Apr 16 10:17:01 piaware systemd[1]: dump978-fa.service: Main process exited, code=exited, status=1/FAILURE

Apr 16 10:17:01 piaware systemd[1]: Stopped dump978 ADS-B UAT receiver.

Apr 16 10:17:01 piaware systemd[1]: dump978-fa.service: Unit entered failed state.

Apr 16 10:17:01 piaware systemd[1]: dump978-fa.service: Failed with result ‘exit-code’.

Apr 16 10:17:01 piaware systemd[1]: Started dump978 ADS-B UAT receiver.

Apr 16 10:17:01 piaware dump978-fa[10757]: raw-port: listening for connections on 0.0.0.0:30978

Apr 16 10:17:01 piaware dump978-fa[10757]: raw-port: listening for connections on [::]:30978

Apr 16 10:17:01 piaware dump978-fa[10757]: json-port: listening for connections on 0.0.0.0:30979

Apr 16 10:17:01 piaware dump978-fa[10757]: json-port: listening for connections on [::]:30979

Apr 16 10:17:01 piaware dump978-fa[10757]: usb_claim_interface error -6

Apr 16 10:17:01 piaware dump978-fa[10757]: Detached kernel driver

Apr 16 10:17:01 piaware dump978-fa[10757]: Found Rafael Micro R820T tuner

Apr 16 10:17:02 piaware dump978-fa[10757]: Reattached kernel driver

Apr 16 10:17:02 piaware dump978-fa[10757]: Detached kernel driver

Apr 16 10:17:02 piaware dump978-fa[10757]: Found Rafael Micro R820T tuner

Apr 16 10:17:02 piaware dump978-fa[10757]: Exact sample rate is: 2083333.135571 Hz

Apr 16 10:17:03 piaware dump978-fa[10757]: [R82XX] PLL not locked!

Apr 16 10:17:03 piaware dump978-fa[10757]: SoapySDR: using maximum manual gain 49.6 dB

Apr 16 10:17:03 piaware dump978-fa[10757]: SoapySDR: INFO: Using format CS8.

Apr 16 10:17:10 piaware dump978-fa[10757]: [::]:30978: accepted a connection from [::1]:50328

Apr 16 10:17:31 piaware dump978-fa[10757]: [::]:30978: accepted a connection from [::1]:50330

That’s piaware restarting it because you are receiving nothing i believe.

You can check:

sudo journalctl -eu piaware

If you want to post the log here use following command (removes location/ feeder id)

sudo journalctl -u piaware | grep -v 'reported location\|--lat\|feeder ID'

Also when you post logs, put a line like this:
```
before and after so it gets a nice box.

sudo journalctl --no-pager -u dump1090-fa