FlightAware Discussions

Rtl_test - lost at least nn bytes

After running PiAware dump978 for a few days, and experiencing things that did not make sense to me, I decided to rebuild everything from scratch. After installing software the needed software I ran rtl-test and got some lost samples back. The rtl-test ran for less then a minute and I’m not really sure how long it should run for…

pi@PiAware:~ $ sudo systemctl stop piaware dump1090-fa dump978-fa
pi@PiAware:~ $ rtl_test
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.

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 12 bytes						<<<<  worry?
lost at least 296 bytes						<<<<  worry?
^CSignal caught, exiting!

User cancel, exiting...
Samples per million lost (minimum): 1		<<<<  to me this means I can ignore the above
Reattached kernel driver

My current setup:

  • RPi2B
    • Buster with PiAware install (not SD Card image)
  • Raspberry Pi power supply 5.1V at 2.5A
    • I believe this is the official Raspberry Pi power supply
  • blue FA Pro Stick Plus
    • connected via USB 3.0 extension pigtails (6 inch)
  • orange FA Pro Stick
    • connected via USB 3.0 extension pigtails (6 inch)
  • FA 1090 MHz ADB-S antenna in attic
  • FA 978 MHz ADS-B antenna in bedroom window
    • waiting for me to finish testing before going in the attic
1 Like

Running two dongles on a pi 2 may be over the aggregate power limit for the USB ports, which is 600mA. This could cause one or both dongles to be unstable.

From the raspberry pi website:

For Raspberry Pi 2, the total power supplied to all USB ports in aggregate is 600mA by default, but can be increased to 1200mA using the max_usb_current config.txt entry.

From the Raspberry Pi 3 onwards, the total power supplied to all USB ports in aggregate is 1200mA.

You could try the config.txt entry they suggest, or alternately use a powered usb hub to supply additional power.

1 Like

I tried the powered USB 2.0 hub and still got the same lost at least nn bytes messages. I’ll try the max_usb_current tomorrow.

Try one dongle at a time. The USB may be over run.

  1. run two instances in parallel if you want to test a setup which has two dongles
  2. run it at the same sampling rate that will actually be used with the -s parameter - 2083333 or 2400000 for 978MHz and 1090MHz dongles respectively
  3. let it run for a couple of minutes; it’s “normal” for these dongles to occasionally drop small amounts of data, it’s only a problem if you’re seeing a lot of dropped data. note that you will lose mlat sync briefly every time some data is dropped, but if it’s infrequent then you’ll rapidly regain sync.
2 Likes

FYI - I started looking into this since I see very few GA/UAT planes. The FA PiAware device is located within a few miles of 3 GA airports. Normally I see 1 or 2 per hour. And only within 0 to 4 nm. Today is a snowy day so I don’t expect to see any.

Still running with a powered USB 2.0 hub. Both of the tests below where run at the same time.

for blue FA Pro Stick Plus:

pi@PiAware:~ $ sudo systemctl stop piaware dump1090-fa dump978-fa tar1090
pi@PiAware:~ $ rtl_test -d 00001090 -s 2400000
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 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
Failed to allocate zero-copy buffer for transfer 8
Falling back to buffers in userspace
lost at least 24 bytes
^CSignal caught, exiting!

User cancel, exiting...
Samples per million lost (minimum): 0
Reattached kernel driver
pi@PiAware:~ $ 

 

for orange FA Pro Stick:

pi@PiAware:~ $ rtl_test -d 00000978 -s 2083333
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 
Exact sample rate is: 2083333.135571 Hz
[R82XX] PLL not locked!
Sampling at 2083333 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 32 bytes
lost at least 192 bytes
^CSignal caught, exiting!

User cancel, exiting...
Samples per million lost (minimum): 0
Reattached kernel driver
pi@PiAware:~ $ 

Still running with a powered USB 2.0 hub. And here is a test with just one dongle (for orange FA Pro Stick):

pi@PiAware:~ $ sudo systemctl stop piaware dump1090-fa dump978-fa tar1090
pi@PiAware:~ $ rtl_test -d 00000978 -s 2083333
Found 1 device(s):
  0:  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 
Exact sample rate is: 2083333.135571 Hz
[R82XX] PLL not locked!
Sampling at 2083333 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 20 bytes

^CSignal caught, exiting!

User cancel, exiting...
Samples per million lost (minimum): 0
Reattached kernel driver
pi@PiAware:~ $ 

Looks fine.
Immediately on startup it’s normal to have some loss.
Optimally like in your case, no loss after that.