Fault with RPI2

Hi all, I am having trouble with a rpi2 based feeder. For more than a year it has been super reliable but power was recently removed to relocate it to roof. Now have to hire a rigger to access roof due to height safety.

Piaware SD card 3.5.3, access via ssh.

Symptoms:

Feeder checks in every few minutes

Only 2 green squares on stats page, MLAT square is red, data statistics all cross hatched/blank

Top shows piaware console running, but no dump1090

2 previous apps named Direwolf (ham radio iGate) and RTLFM show running

No local map at port 8080

Possible causal factors:

Pi power was cut without sd command

FA dongle was moved from previous usb port

Another rtlsdr that was being used for Direwolf/RTLFM has been removed

Tests conducted:

Rtl test -p = found 1 rtlsdr usb interface error - 6 fail to open device 0

Systemctl1 status piaware = uploader active (green)

Piaware status = master process running, nothing else

Multiple reboots, no change

Theories:

Non decorus power cut has broken something

Removing 1 rtlsdr and/or moving the FA dongle to a different usb port is the cause

Direwolf and/or RTLFM are claiming the FA dongle first

Summary:

I haven’t updated piaware because it was running so well, but prepared to risk it now

No physical access to pi so would like to try all software remedies first before paying for a rigger to attend.

Bearing in mind how old my piaware is, need to carefully consider upgrade path?

Any advice appreciated please. Thanks.

G

There is your problem!

If you uninstall or disable Direwolf and RTLFM, then retest. One thing is sure, if piaware hasn’t mounted the RTL, you won’t decode anything.

Well this is expected if you don’t stop dump1090-fa.

sudo systemctl stop piaware dump1090-fa
sudo pkill -9 dump1090-fa

Then you can re-run the rtl_test.

Also you obviously need to remove/stop RTLFM/direwolf.

Thanks, but Direwolf and rtl_fm keep restarting after about 40 secs. Have tried:

Sudo Stop rtl_fm
Kill pid
Kill -9 pid
Kill -kill pid
Kill -s sigkill pid
Pkill rtl_fm
K key in top
Sudo apt-get -purge rtl_fm
Sudo apt-get remove
Sudo apt-get autoremove

Last 3 All result in unable to locate package.

The rtl_fm is not an independent package. It is provided by package rtl-sdr

sudo killall rtl_fm
sudo apt purge rtl-sdr

https://manpages.debian.org/testing/rtl-sdr/rtl_fm.1.en.html

sudo killall direwolf
sudo apt purge direwolf

.

Thanks we are making progress…

Rtlfm and direwolf no longer show in top

Fa v is now 3.8.0

Lsusb finds dongle ok

Rtl test -p = command not found

Piaware status = only master process running, dump1090 not producing data on 30005

Top doesnt show dump1090 running

Dump1090-fa = lots of scrolling data but still no data stats and mlat square still red.

Well, there’s your problem; that’s the issue that you need to fix. Uninstalling rtl-sdr presumably just makes it so that it’s still restarting in a loop, but immediately breaking. You need to fix the restart loop. A well-behaved install would be installing a systemd service or similar to manage restarts, but I have no idea if this is a well-behaved install; it could equally well be a cronjob or something horrible.

It may possibly be a cron job, or a start script triggered by a line in /etc/rc.local

@VK2GEL
What is output of following commands?

sudo systemctl status rtl_fm

sudo systemctl status direwolf

sudo find / -name rtl_fm

sudo find / -name direwolf

cat /etc/rc.local
1 Like

Thanks we are making progress…

Rtlfm and direwolf no longer show in top

Fa v is now 3.8.0

Lsusb finds dongle ok

Rtl test -p = command not found

Piaware status = only master process running, dump1090 not producing data on 30005

Top doesnt show dump1090 running

Dump1090-fa = lots of scrolling data but still no data stats and mlat square still red.

What is output of command dump1090-fa?

I get this:

pi@piaware:~ $ dump1090-fa 

Mon Jan 13 09:19:12 2020 UTC  dump1090-fa 3.8.0 starting up.
rtlsdr: using device #0: Generic RTL2832U OEM (Realtek, RTL2838UHIDIR, SN 00000101)
usb_claim_interface error -6
rtlsdr: error opening the RTLSDR device: Device or resource busy

Dump1090-fa command = lots of high speed scrolling lines, looks like aircraft data like groundspeed, etc etc.

Reboot and check the piaware status or local webinterface for dump1090-fa.

If it’s not working, please show the output for this after the reboot:

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

Rebooted

Local map problem fetching data from dump1090

Status, only master process running, Dump1090 not producing data on 30005

Tried journal command = invalid option.

Copy-paste full output of this command:
sudo systemctl status dump1090-fa

How do I copy from terminal and paste here please. Using Teamviewer and iPad.

Use a proper PC …

Or just google it, i have no clue how you copy paste in teamviewer on an ipad.

I’m curious which version you are working with, it’s right at the beginning of the help:

dump1090-fa --help

pi@piaware:~$ sudo systemctl status dump1090-fa
â—Ź dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization)
Loaded: loaded (/lib/systemd/system/dump1090-fa.service; enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2020-01-13 10 :29:34 UTC; 18s ago
Docs: PiAware - ADS-B and MLAT Receiver - FlightAware
Process: 3441 ExecStart=/usr/share/dump1090-fa/start-dump1090-fa --write-json %t/dump1090-fa --quiet (code=exited, status=1/FAILURE)
Main PID: 3441 (code=exited, status=1/FAILURE)

Jan 13 10:29:34 piaware systemd[1]: Unit dump1090-fa.service entered failed…e.
Hint: Some lines were ellipsized, use -l to show in full.
pi@piaware:~$ 0.3 0.3 1:14.41 dbus-daemon
-bash: 0.3: command not found
pi@piaware:~$ 5689 piaware 20 0 22920 9420 5460 S 0.3 1.0 6:48.8 1 piaware
-bash: 5689: command not found
pi@piaware:~$ 26467 root 20 0 0 0 0 S 0.3 0.0 0:00.1 0 kworker/u8:1
-bash: 26467: command not found
pi@piaware:~$ top - 00:47:54 up 2 days, 17:38, 2 users, load^C

Version is 380.

cat /etc/rc.local

After issueing above command, do you see any line(s) at bottom (above last line exit 0), similar to the one pointed out by the red arrow in this screenshot?

No.

pi@piaware:~$ cat /etc/rc.local
#!/bin/sh -e

rc.local

This script is executed at the end of each multiuser runlevel.

Make sure that the script will “exit 0” on success or any other

value on error.

In order to enable or disable this script just change the execution

bits.

By default this script does nothing.

exit 0
pi@piaware:~$

Can you try this command again?

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

The status output @abcd567 is so fond of, in contrary to the journalctl command, often tells you absolutely nothing.