FlightAware Discussions

Pi zero W intermittent transmit

#1

So I have a pi zero W that I loaded with raspbian and then installed the piaware packages to. It will connect to flightaware but will only be up for a few seconds then be down for a few minutes. This had been going on since setup. It will also trigger the automatic 12 hr downtime warning once every other day. At which point I reboot and it continues to work for a few seconds then down for a few minutes. Anyone have any ideas on how to get this to be more reliable?

TITLE - List of Hardware
Ras Pi 0 W
DC Power adaptor 5V
microSD card, Class 10, 32Gb
Nooelec SDR
cheap antenna that came with SDR
whatever cabling came with SDR
0 Likes

#2

Most of these issues turn out to be a power supply problem. Try a different one and a different cable as well.
Maybe try a USB phone charger?

(might also be the OTG USB cable being not too good at supplying the dongle with power, i suppose you could try connecting the dongle to an USB hub and the hub to the OTG cable)

0 Likes

#3

^ Is my current setup. I have used a Samsung USB fast charge cable and USB to wall adapter in the past and still had this issue.

0 Likes

#4

When you have the issue can you still reach the local SkyView?

You’ll probably have to take a look at the logs.
In case you don’t have a monitor you will need this:
For Beginners - How-to SSH to RPi - Setup Putty in Windows

0 Likes

#5

I have a monitor, ssh, and vnc. It will try to load sky view on the website but just sits there with the spinny wheel.

Where are the logs located? Is there a way to look at sky view from the host or only on the website?

0 Likes

#6

On the local commandline you can check these commands:

sudo journalctl -eu dump1090-fa
sudo journalctl -eu piaware

Probably one of the logs will say: Receiver may have wedged.

Which usually means the dongle isn’t getting enough power.

You can also try disconnecting the monitor as the HDMI output will be using extra power.

0 Likes

#7

First log is completely filled with “no data received from the sdr for a long time”

Running second log command now.

0 Likes

#8

Yeah that’s typical for power supply problems, maybe your micro-USB cable or the OTG USB-cable aren’t capable.
I would recommend either the Canakit power supply or “Official Raspberry Pi 3B+ power supply”
They provide 5.2 V instead of 5 V and often solve those problems.

If you want a bandaid that will automatically restart dump1090-fa you can try the following script:

#!/bin/bash
exec &>>/tmp/wedge                                                                                                                     
sleep 20

journalctl -b -0 -f -n0 | grep 'No data received from the SDR for a long time' --line-buffered | { 
        while read line
        do
                date
                systemctl kill -s 9 dump1090-fa
                sleep .3
                systemctl restart dump1090-fa
        done
}

First you open a new textfile with an editor, paste the above script, save and exit

nano /home/pi/wedge.sh

COPY/PASTE
CTRL-O
press enter
CTRL-X

sudo crontab -e

Add the following line

@reboot              /bin/bash /home/pi/wedge.sh

save and exit.

After the next reboot dump1090-fa will be automatically killed and restarted after wedging.

0 Likes

#9

Can’t figure out how to do a code box on mobile…

‘’'Linux raspberrypi 4.14.98+ #1200 Tue Feb 12 20:11:02 GMT 2019 armv6l

The programs included with the Debian GNU/Linux system are free soft
ware;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Mar 28 09:58:00 2019 from 192.168.1.11
pi@raspberrypi:~ $ sudo journalctl -eu piaware
Apr 14 07:16:46 raspberrypi piaware[435]: piaware received a message
Apr 14 07:17:15 raspberrypi piaware[435]: 6 msgs recv’d from dump109
Apr 14 07:17:39 raspberrypi piaware[435]: Connecting to FlightAware
Apr 14 07:17:39 raspberrypi piaware[435]: Connection with adept serv
Apr 14 07:17:39 raspberrypi piaware[435]: TLS handshake with adept s
Apr 14 07:17:39 raspberrypi piaware[435]: FlightAware server certifi
Apr 14 07:17:39 raspberrypi piaware[435]: encrypted session establis
Apr 14 07:17:39 raspberrypi sudo[770]: piaware : TTY=unknown ; PWD=
Apr 14 07:17:39 raspberrypi sudo[770]: pam_unix(sudo:session): sessi
Apr 14 07:17:39 raspberrypi sudo[770]: pam_unix(sudo:session): sessi
Apr 14 07:17:41 raspberrypi piaware[435]: adept reported location: 4
Apr 14 07:17:41 raspberrypi piaware[435]: logged in to FlightAware a
Apr 14 07:17:41 raspberrypi piaware[435]: my feeder ID is 1fa43df8-2
Apr 14 07:17:41 raspberrypi piaware[435]: site statistics URL: https
Apr 14 07:18:10 raspberrypi piaware[435]: piaware has successfully s
Apr 14 07:22:15 raspberrypi piaware[435]: 70 msgs recv’d from dump10
Apr 14 07:27:15 raspberrypi piaware[435]: 175 msgs recv’d from dump1
Apr 14 07:32:15 raspberrypi piaware[435]: 289 msgs recv’d from dump1
Apr 14 07:37:15 raspberrypi piaware[435]: 393 msgs recv’d from dump1
Apr 14 07:42:15 raspberrypi piaware[435]: 413 msgs recv’d from dump1
Apr 14 07:47:15 raspberrypi piaware[435]: 413 msgs recv’d from dump1
Apr 14 07:52:15 raspberrypi piaware[435]: 413 msgs recv’d from dump1
Apr 14 07:57:15 raspberrypi piaware[435]: 413 msgs recv’d from dump1
Apr 14 08:02:15 raspberrypi piaware[435]: 413 msgs recv’d from dump1
Apr 14 08:07:15 raspberrypi piaware[435]: 413 msgs recv’d from dump1
Apr 14 08:12:15 raspberrypi piaware[435]: 413 msgs recv’d from dump1
Apr 14 08:17:15 raspberrypi piaware[435]: 413 msgs recv’d from dump1
Apr 14 08:22:15 raspberrypi piaware[435]: 413 msgs recv’d from dump1
Apr 14 08:27:15 raspberrypi piaware[435]: 413 msgs recv’d from dump1’’’

0 Likes

#10

Three backticks above, three below the code
```
pi@piaware: ~$ sudo reboot
```

The backtick button is just below digit 1 button. It appears after you press the symbol button twice

0 Likes

#11

I pushed the wrong button. Thanks!

0 Likes

#12

Those are single quotation marks but those with direction, not even simple single quotation marks :slight_smile:

Depending on localisation/language on a mobile phone there will be different symbols on the keyboard.
Anyway make sure you didn’t miss my post above yours just in case you want to use that workaround.

0 Likes

#13

I saw that but with the nature of computers as soon as i started complaining about it not working its working now…

0 Likes