ADS-B needs to be rebooted


#1

At first when I had this all set up it stayed on all the time. When I leave for any length of time it seems to shut itself off and needs to be rebooted. After the reboot it works fine. The PSpi is hooked via WIFI to the router.


#2

I seem to have this same problem. I have notice it just drops off. I have to climb in the attic and unplug the RPi and reboot it and it starts working again. Any scripts to auto reboot if it is not sending data? You can see where mine is dropping off. ---->https://flightaware.com/adsb/stats/user/iflyabeech


#3

I had similar issues at first. Is the dongle directly attached to the Pi? There was a power issue that appeared to go away after moving the dongle to a powered hub. OTH it may be something completely different.


#4

Thanks guys. I have the WIFI dongle plugged directly into the RPi. I bought a powered hub but wasn’t able to get it to work with the RPi.


#5

My dongle is plugged directly into the hub as is the radio.


#6

Why the power cycle? Use PUTTY to log In to the RPi and do a reboot that way – I use “sudo init 0” to execute a reboot…

-don


#7

The radio antenna and the WIFI dongle are now working off the powered USB hub. You just have to reboot each time. I tried “sudo init 0” for the reboot but it wouldn’t restart after shutdown.


#8

I had a similar problem with my first configuration. I finally said &*(#% with it and rebuilt a new image, which ended the problem. I surmise I misconfigured something on the install.


#9

I was unable to login via putty


#10

SSH (ie using putty) or VNC will not work if the network interface locks up. This is the problem that I was having so I did the following.

  1. Reboot the raspberry pi if it is unable to connect with the router. See:
    weworkweplay.com/play/rebooting- … tion-wifi/

  2. Use the watchdog to reboot the raspberry pi if it locks up for any other reason:
    adafruit.com/blog/2013/01/1 … pberry_pi/

These two steps should eliminate the need from ever having to go physically reset the raspberry pi.

One last safeguard you could do is add a cron job to reboot the raspberry pi once a day, however that should not be needed if the steps above are taken. The main benefit it has though, is that you can set up the cron job to reboot during a known lull in activity and reduce the likelihood of having the device lock up during a period of peak activity.


#11

#1 looks like what I am looking for, but I have no idea how to save that script to the file. How do I create the checkwifi.sh file and insert this script?

edit… I figured out to type sudo nano checkwifi.sh after changing to the required directory using a cd command…


#12

All great info. Thanks.


#13

Below is a script that will reboot your WiFi connection if you loose connectivity. We’ll add it to the optional steps page for now and automatically include it in a future PiAware version thereafter.

To do this, type:


sudo nano /etc/rc.local


Use the arrow keys to add the following line directly above exit 0


/root/network_monitor.sh &


Press control + o to write the file and then enter to save. Press control + x to exit. Then type:


sudo nano /root/network_monitor.sh


Add the all of the following lines to your newly opened file:



#!/bin/bash

while true ; do
   if ifconfig wlan0 | grep -q "inet addr:" ; then
      sleep 60
   else
      echo "Network connection down! Attempting reconnection."
      ifup --force wlan0
      sleep 10
   fi
done


Press control + o to write the file and then enter to save. Press control + x to exit. Then type:


sudo chmod +x /root/network_monitor.sh


The script will now start on reboot. Until then, start your auto-reconnect script to run in the background by typing:


sudo /root/network_monitor.sh &


#14

Ok my problem is similar, I lose the local webpage and the feed to FA, I can still SSH to raspi and sudo reboot… And then everything works fine…
So I would not think that it is wifi or else I couldn’t ssh to reboot.


#15

I found an error… in the last two instructions you mistyped a “-” while you had us name the file with a “_”


#16

Good catch and thanks for pointing this out. The instructions have been updated.