Help with new setup, RTL-SDR

Looking for some help with a new setup. It’s a pi3. I have an external powered USB hub and in the rasberry I am running AIS-catcher and flightaware.

I am receiving AIS data no problem. but ADS-B no luck. It appears to be running:

Just no data. I have even switched the receivers used for AIS, switched the ADS-B cable and antenna. I did install the RTL-SDR v4 drivers too.

how can I get some better telemetry into what’s going on and how should I troubleshoot?

thank you much

1 Like

What are outputs of following 2 commands?

sudo journalctl -u dump1090-fa -n 15

sudo journalctl -u piaware -n 15

 

1 Like

here you go. thank you for helping. much appreciated.

sdl@AIS-ADSB:~ $ sudo journalctl -u dump1090-fa -n 15
Aug 21 16:40:34 AIS-ADSB dump1090-fa[2576]: adaptive: changing gain from 32.8dB (step 17) to 33.8dB (step 18) because: probing dynamic range gain upper bound
Aug 21 16:40:34 AIS-ADSB dump1090-fa[2576]: rtlsdr: tuner gain set to 33.8 dB (gain step 18)
Aug 21 16:40:48 AIS-ADSB dump1090-fa[2576]: adaptive: available dynamic range (32.3dB) >= required dynamic range (30.0dB), continuing upward scan
Aug 21 16:40:48 AIS-ADSB dump1090-fa[2576]: adaptive: changing gain from 33.8dB (step 18) to 36.4dB (step 19) because: probing dynamic range gain upper bound
Aug 21 16:40:48 AIS-ADSB dump1090-fa[2576]: rtlsdr: tuner gain set to 36.4 dB (gain step 19)
Aug 21 16:40:58 AIS-ADSB dump1090-fa[2576]: adaptive: available dynamic range (29.4dB) < required dynamic range (30.0dB), switching to downward scan
Aug 21 16:40:58 AIS-ADSB dump1090-fa[2576]: adaptive: changing gain from 36.4dB (step 19) to 33.8dB (step 18) because: probing dynamic range gain lower bound
Aug 21 16:40:58 AIS-ADSB dump1090-fa[2576]: rtlsdr: tuner gain set to 33.8 dB (gain step 18)
Aug 21 16:41:08 AIS-ADSB dump1090-fa[2576]: adaptive: available dynamic range (29.8dB) < required dynamic range (30.0dB), continuing downwards scan
Aug 21 16:41:08 AIS-ADSB dump1090-fa[2576]: adaptive: changing gain from 33.8dB (step 18) to 32.8dB (step 17) because: probing dynamic range gain lower bound
Aug 21 16:41:08 AIS-ADSB dump1090-fa[2576]: rtlsdr: tuner gain set to 32.8 dB (gain step 17)
Aug 21 16:41:18 AIS-ADSB dump1090-fa[2576]: adaptive: available dynamic range (28.6dB) < required dynamic range (30.0dB), continuing downwards scan
Aug 21 16:41:18 AIS-ADSB dump1090-fa[2576]: adaptive: changing gain from 32.8dB (step 17) to 29.7dB (step 16) because: probing dynamic range gain lower bound
Aug 21 16:41:18 AIS-ADSB dump1090-fa[2576]: rtlsdr: tuner gain set to 29.7 dB (gain step 16)
Aug 21 16:41:28 AIS-ADSB dump1090-fa[2576]: adaptive: available dynamic range (33.8dB) >= required dynamic range (30.0dB), stopping downwards scan here
sdl@AIS-ADSB:~ $

sdl@AIS-ADSB:~ $ sudo journalctl -u piaware -n 15
Aug 21 16:40:05 AIS-ADSB piaware[665]: mlat-client(727): Reconnecting in 30.0 seconds
Aug 21 16:40:05 AIS-ADSB piaware[665]: mlat-client(727): Beast-format results connection with 127.0.0.1:30104: connection lost
Aug 21 16:40:06 AIS-ADSB piaware[665]: lost connection to dump1090-fa via faup1090
Aug 21 16:40:06 AIS-ADSB piaware[665]: faup1090 exited normally
Aug 21 16:40:06 AIS-ADSB piaware[665]: reconnecting to dump1090-fa
Aug 21 16:40:07 AIS-ADSB sudo[2585]: piaware : PWD=/ ; USER=root ; COMMAND=/bin/netstat --program --tcp --wide --all --numeric
Aug 21 16:40:07 AIS-ADSB sudo[2585]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=999)
Aug 21 16:40:07 AIS-ADSB sudo[2585]: pam_unix(sudo:session): session closed for user root
Aug 21 16:40:07 AIS-ADSB piaware[665]: ADS-B data program ‘dump1090-fa’ is listening on port 30005, so far so good
Aug 21 16:40:07 AIS-ADSB piaware[665]: Starting faup1090: /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 32.700 --lon >
Aug 21 16:40:07 AIS-ADSB piaware[665]: Started faup1090 (pid 2587) to connect to dump1090-fa
Aug 21 16:40:35 AIS-ADSB piaware[665]: mlat-client(727): Input connected to localhost:30005
Aug 21 16:40:35 AIS-ADSB piaware[665]: mlat-client(727): Input format changed to BEAST, 12MHz clock
Aug 21 16:40:35 AIS-ADSB piaware[665]: mlat-client(727): Beast-format results connection with ::1:30104: connection established
Aug 21 16:41:44 AIS-ADSB piaware[665]: 0 msgs recv’d from dump1090-fa (0 in last 5m); 0 msgs sent to FlightAware
lines 1-15/15

1 Like

Check if your dongle is producing data.

First install netcat

sudo apt install netcat-traditional

Next issue following command:

nc localhost 30005

If it is producing data, following command will result in continous flow of data, otherwise there will be no output

Break the flow by pressing Ctrl and C keys togather

1 Like

Nothing is coming out.

I have two rtl-sdr units here. both can receive AIS just fine. antenna is tuned for ADS-B too.

thank you for helping me.

1 Like

is this data or did I hit a key and not know it?

sdl@AIS-ADSB:~ $ sudo nc localhost 30005
11113C▒▒L▒▒▒1#K▒-▒-O1

1 Like

Do you get continous scrolling data till you press Ctrl & C Keys, or just a single line as you have posted?

For your guidance, on my Pi working perfectly OK, following are the results:

(1) When I issue command, the continous scrolling data it starts like this

 

(2) When I press Ctrl & C Keys, it stops like this:

1 Like

definitely not that. just a little blurb now and then

I stopped and restarted after my last reply and this is all I have:

sdl@AIS-ADSB:~ $ sudo nc localhost 30005
▒▒▒▒▒▒1▒1111113▒$h▒HØ/a▒E{ޚ▒PuTTY11111111113▒▒▒

“Putty” is kind of odd

1 Like

Either the drivers for RTL-SDR V4 are not properly installed
OR the antenna connector is not making connection to the dongle.
May be your antenna’s SMA-Male is RP (Reverse Polarity) Type. This type does not have a center pin, which causes broken connection

SMA vs RP-SMA

SMA vs RP-SMA

 

SMA-Male (has center pin)

SMA-male connector-330x330-px

 

3 Likes

bingo! I removed the drivers and reinstalled them, then had to reinstall 1090-fa but it’s working now. thank you so much!

2 Likes

Ok…little more issue but almost there. I notice that if I reboot, it dies. I have to run the script below and not reboot for it to run again. any ideas what the problem could be?

thank you much

sudo apt purge ^librtlsdr sudo rm -rvf /usr/lib/librtlsdr* /usr/include/rtl-sdr* /usr/local/lib/librtlsdr* /usr/local/include/rtl-sdr* /usr/local/include/rtl_* /usr/local/bin/rtl_*

sudo apt-get install libusb-1.0-0-dev git cmake pkg-config
git clone GitHub - rtlsdrblog/rtl-sdr-blog: Modified Osmocom drivers with enhancements for RTL-SDR Blog V3 and V4 units.
cd rtl-sdr-blog
mkdir build
cd build
cmake …/ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo cp …/rtl-sdr.rules /etc/udev/rules.d/
sudo ldconfig
echo ‘blacklist dvb_usb_rtl28xxu’ | sudo tee --append /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf

wget https://www.flightaware.com/adsb/piaware/files/packages/pool/piaware/f/flightaware-apt-repository/flightaware-apt-repository_1.2_all.deb
sudo dpkg -i flightaware-apt-repository_1.2_all.deb
sudo apt install piaware

sudo apt install dump1090-fa
sudo apt install dump978-fa

1 Like

sounds like a bad sd-card that isn’t taking writes properly.

Or you haven’t specified the serials correctly?

What’s your config for 1090 / 978 / AIS?
The appropriate serial set for all 3?

journalctl -u dump1090-fa

After the reboot, check the log for dump978-fa / ais / dump1090-fa services. (journalctl -u)

1 Like

I have AIS catcher running in a tmux session, not as a service. it’s setup to run device index 1, and it runs fine even after reboot. flightaware is using rtl-sdr with 0, although I just added the serial number (000002) to the dump1090-fa config. still no dice after reboot until I run the script above. then it suddenly comes alive.

before reboot

journalctl -u dump1090-fa

Aug 21 18:51:29 AIS-ADSB systemd[1]: dump1090-fa.service: Consumed 1min 54.483s CPU time.
Aug 21 18:52:17 AIS-ADSB systemd[1]: Started dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization).
Aug 21 18:52:18 AIS-ADSB dump1090-fa[1485]: Wed Aug 21 18:52:17 2024 PDT dump1090-fa 9.0 starting up.
Aug 21 18:52:18 AIS-ADSB dump1090-fa[1485]: rtlsdr: using device #0: Generic RTL2832U OEM (RTLSDRBlog, Blog V4, SN 00000002)
Aug 21 18:52:18 AIS-ADSB dump1090-fa[1485]: Found Rafael Micro R828D tuner
Aug 21 18:52:18 AIS-ADSB dump1090-fa[1485]: RTL-SDR Blog V4 Detected
Aug 21 18:52:19 AIS-ADSB dump1090-fa[1485]: rtlsdr: tuner gain set to about 58.6 dB (gain step 29) (tuner AGC enabled)
Aug 21 18:52:19 AIS-ADSB dump1090-fa[1485]: adaptive: using 50% duty cycle
Aug 21 18:52:19 AIS-ADSB dump1090-fa[1485]: adaptive: enabled adaptive gain control with gain limits 0.0dB (step 0) … 58.6dB (step 29)
Aug 21 18:52:19 AIS-ADSB dump1090-fa[1485]: adaptive: enabled dynamic range control, target dynamic range 30.0dB
Aug 21 18:52:29 AIS-ADSB dump1090-fa[1485]: adaptive: reached upper gain limit, halting dynamic range scan here
lines 892-933/933 (END)

journalctl -u dump978-fa
Aug 22 15:24:15 AIS-ADSB systemd[1]: dump978-fa.service: Scheduled restart job, restart counter is at 2460.
Aug 22 15:24:15 AIS-ADSB systemd[1]: Stopped dump978-fa.service - dump978 ADS-B UAT receiver.
Aug 22 15:24:15 AIS-ADSB systemd[1]: Started dump978-fa.service - dump978 ADS-B UAT receiver.
Aug 22 15:24:15 AIS-ADSB dump978-fa[7334]: raw-port: listening for connections on 0.0.0.0:30978
Aug 22 15:24:15 AIS-ADSB dump978-fa[7334]: raw-port: listening for connections on [::]:30978
Aug 22 15:24:15 AIS-ADSB dump978-fa[7334]: json-port: listening for connections on 0.0.0.0:30979
Aug 22 15:24:15 AIS-ADSB dump978-fa[7334]: json-port: listening for connections on [::]:30979
Aug 22 15:24:15 AIS-ADSB dump978-fa[7334]: Configuration error: No matching SoapySDR device found (cause: SoapySDR::Device::make() no match)
Aug 22 15:24:15 AIS-ADSB systemd[1]: dump978-fa.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 22 15:24:15 AIS-ADSB systemd[1]: dump978-fa.service: Failed with result ‘exit-code’.

Not sure where SoapySDR is coming from. it’s a RTL-SDR.

in /etc/default/dump978.conf I have: (not sure it’s the correct path for this file to be):

dump978-fa configuration

This is sourced by /usr/share/dump978-fa/start-dump978-fa as a

shellscript 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.

dump978-fa won’t automatically start unless ENABLED=yes

ENABLED=yes

RECEIVER_OPTIONS=“–sdr driver=rtlsdr --format CS8”
DECODER_OPTIONS=“”
NET_OPTIONS=“–raw-port 30978 --json-port 30979”
DUMP978_DEVICE_TYPE=“–sdr driver=rtlsdr,serial=00000002”

—after reboot—

AIS still working fine on RTL-SDR device 1.

journalctl -u dump1090-fa:

Aug 22 15:38:35 AIS-ADSB systemd[1]: Started dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization).
Aug 22 15:38:36 AIS-ADSB dump1090-fa[566]: Thu Aug 22 15:38:36 2024 PDT dump1090-fa 9.0 starting up.
Aug 22 15:38:36 AIS-ADSB dump1090-fa[566]: rtlsdr: using device #0: Generic RTL2832U OEM (RTLSDRBlog, Blog V4, SN 00000002)
Aug 22 15:38:37 AIS-ADSB dump1090-fa[566]: Found Rafael Micro R828D tuner
Aug 22 15:38:37 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to about 58.6 dB (gain step 29) (tuner AGC enabled)
Aug 22 15:38:37 AIS-ADSB dump1090-fa[566]: [R82XX] PLL not locked!
Aug 22 15:38:37 AIS-ADSB dump1090-fa[566]: [R82XX] PLL not locked!
Aug 22 15:38:37 AIS-ADSB dump1090-fa[566]: adaptive: using 50% duty cycle
Aug 22 15:38:37 AIS-ADSB dump1090-fa[566]: adaptive: enabled adaptive gain control with gain limits 0.0dB (step 0) … 58.6dB (step 29)
Aug 22 15:38:37 AIS-ADSB dump1090-fa[566]: adaptive: enabled dynamic range control, target dynamic range 30.0dB
Aug 22 15:38:37 AIS-ADSB dump1090-fa[566]: Allocating 4 zero-copy buffers
Aug 22 15:38:47 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (7.4dB) < required dynamic range (30.0dB), switching to downward scan
Aug 22 15:38:47 AIS-ADSB dump1090-fa[566]: adaptive: changing gain from 58.6dB (step 29) to 49.6dB (step 28) because: probing dynamic range gain lower bound
Aug 22 15:38:47 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to 49.6 dB (gain step 28)
Aug 22 15:38:57 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (16.3dB) < required dynamic range (30.0dB), continuing downwards scan
Aug 22 15:38:57 AIS-ADSB dump1090-fa[566]: adaptive: changing gain from 49.6dB (step 28) to 48.0dB (step 27) because: probing dynamic range gain lower bound
Aug 22 15:38:57 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to 48.0 dB (gain step 27)
Aug 22 15:39:22 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (20.3dB) < required dynamic range (30.0dB), continuing downwards scan
Aug 22 15:39:22 AIS-ADSB dump1090-fa[566]: adaptive: changing gain from 48.0dB (step 27) to 44.5dB (step 26) because: probing dynamic range gain lower bound
Aug 22 15:39:22 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to 44.5 dB (gain step 26)
Aug 22 15:39:32 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (22.2dB) < required dynamic range (30.0dB), continuing downwards scan
Aug 22 15:39:32 AIS-ADSB dump1090-fa[566]: adaptive: changing gain from 44.5dB (step 26) to 43.9dB (step 25) because: probing dynamic range gain lower bound
Aug 22 15:39:32 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to 43.9 dB (gain step 25)
Aug 22 15:39:42 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (21.0dB) < required dynamic range (30.0dB), continuing downwards scan
Aug 22 15:39:42 AIS-ADSB dump1090-fa[566]: adaptive: changing gain from 43.9dB (step 25) to 43.4dB (step 24) because: probing dynamic range gain lower bound
Aug 22 15:39:42 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to 43.4 dB (gain step 24)
Aug 22 15:39:52 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (21.9dB) < required dynamic range (30.0dB), continuing downwards scan
Aug 22 15:39:52 AIS-ADSB dump1090-fa[566]: adaptive: changing gain from 43.4dB (step 24) to 42.1dB (step 23) because: probing dynamic range gain lower bound
Aug 22 15:39:52 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to 42.1 dB (gain step 23)
Aug 22 15:40:02 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (23.6dB) < required dynamic range (30.0dB), continuing downwards scan
Aug 22 15:40:02 AIS-ADSB dump1090-fa[566]: adaptive: changing gain from 42.1dB (step 23) to 40.2dB (step 22) because: probing dynamic range gain lower bound
Aug 22 15:40:02 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to 40.2 dB (gain step 22)
Aug 22 15:40:12 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (27.0dB) < required dynamic range (30.0dB), continuing downwards scan
Aug 22 15:40:12 AIS-ADSB dump1090-fa[566]: adaptive: changing gain from 40.2dB (step 22) to 38.6dB (step 21) because: probing dynamic range gain lower bound
Aug 22 15:40:12 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to 38.6 dB (gain step 21)
Aug 22 15:40:22 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (28.6dB) < required dynamic range (30.0dB), continuing downwards scan
Aug 22 15:40:22 AIS-ADSB dump1090-fa[566]: adaptive: changing gain from 38.6dB (step 21) to 37.2dB (step 20) because: probing dynamic range gain lower bound
Aug 22 15:40:22 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to 37.2 dB (gain step 20)
Aug 22 15:40:32 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (30.1dB) >= required dynamic range (30.0dB), stopping downwards scan here
Aug 22 15:40:34 AIS-ADSB dump1090-fa[566]: adaptive: available dynamic range (29.5dB) + half gain step down (0.4dB) < required dynamic range (30.0dB), starting downwa>
Aug 22 15:40:34 AIS-ADSB dump1090-fa[566]: adaptive: changing gain from 37.2dB (step 20) to 36.4dB (step 19) because: dynamic range fell below target value
Aug 22 15:40:34 AIS-ADSB dump1090-fa[566]: rtlsdr: tuner gain set to 36.4 dB (gain step 19)
lines 60-101/101 (END)

and 978 dump:

Aug 22 15:40:55 AIS-ADSB systemd[1]: dump978-fa.service: Failed with result ‘exit-code’.
Aug 22 15:41:25 AIS-ADSB systemd[1]: dump978-fa.service: Scheduled restart job, restart counter is at 5.
Aug 22 15:41:25 AIS-ADSB systemd[1]: Stopped dump978-fa.service - dump978 ADS-B UAT receiver.
Aug 22 15:41:25 AIS-ADSB systemd[1]: Started dump978-fa.service - dump978 ADS-B UAT receiver.
Aug 22 15:41:25 AIS-ADSB dump978-fa[769]: raw-port: listening for connections on 0.0.0.0:30978
Aug 22 15:41:25 AIS-ADSB dump978-fa[769]: raw-port: listening for connections on [::]:30978
Aug 22 15:41:25 AIS-ADSB dump978-fa[769]: json-port: listening for connections on 0.0.0.0:30979
Aug 22 15:41:25 AIS-ADSB dump978-fa[769]: json-port: listening for connections on [::]:30979
Aug 22 15:41:25 AIS-ADSB dump978-fa[769]: Configuration error: No matching SoapySDR device found (cause: SoapySDR::Device::make() no match)
Aug 22 15:41:25 AIS-ADSB systemd[1]: dump978-fa.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 22 15:41:25 AIS-ADSB systemd[1]: dump978-fa.service: Failed with result ‘exit-code’.
lines 60-101/101 (END)

Are you using a piaware SDcard image from Flightaware, or RaspberryPiOS image from RaspberryPi org /Raspberrypi imager?

If you are using piaware SDcard image, then changes made to file /etc/default/dump1090-fa will be lost at reboot.

1 Like

It’s a rasberry pi OS image and then I ran that script to get it installed. The piaware sd image didn’t work so good for me. it might have been the drivers.

I’m wondering if after reboot the drivers are not sticking. they are from here: RTL-SDR Blog V4 Users Guide

So first of all, running 978 as well would need a 3rd SDR.

There is no good reason for the drivers to work and then stop working on reboot unless you’re installing something else that pulls in the driver package.
You could try:

Alternative Debian Package Installation Method:
https://github.com/rtlsdrblog/rtl-sdr-blog

see if that sticks better.

thank you for that. I ran thru it with the other drivers, rebooted and look at that it came right up!

I was hoping I could run both off a single dongle. no worries will get another. thank you very much!

If you are going to run three dongles on a single pi, keep in mind that those are powered via the USB bus - and the USB bus has a limited power budget. You may find that you run into lots of weird problems unless you have an absolutely rock-solid power supply for the Pi.

Plugging them into a powered USB hub can help, but those can vary in quality and how they manage bandwidth. I tried one when I was originally setting up my system and found that even with just one 1090 dongle my MLAT would come and go randomly.

Just something to think about…

2 Likes

thank you for that. I’m already having MLAT go down after a few min. I thought it was drivers. it is plugged into a powered hub. I just ordered a 60W hub. Rather keep it minimal as it’s going to be installed in a remote site with tight space. But if I need to break it out I will.

3rd RTL-SDR just arrived. dump978-fa installed. It’s trying to use the wrong SDR. where is the config file?

thanks much

found the config. wow amazing how much more air traffic it sees. I can’t wait to get this up on the hill with LOS coverage all over san diego county

THANK YOU for all the help you provided me.

1 Like