PiAware 3.5 not reconnecting wireless after power failure

A storm blew though here this afternoon and we had a brief power outage. Everything appeared to come up OK. I had no problem connecting to the internet from other devices in the house after everything rebooted. But Piaware was unreachable from the local LAN. The Skyview screen would not connect. And after rebooting and checking the logs, it looks like the Pi was not connected to FA either. This is confirmed by the FA stats which shows no data for about an hour. The Pi appeared to be running though…red light on solid, green flashing occasional. It is highly likely that the Pi was up and running before my router and/or cable modem though. Rebooting the Pi fixed the problem today but only because I noticed there was a problem.

Does anyone use a network maintenance script to monitor the connection and restart networking if there is no connectivity? I’d like to ping the router and use systemctl to restart networking if there is no connectivity unless anyone has a better idea.

Is this something that should be a standard part of the Piaware image?


Yup, I used to use this method with it set to restart the network interface rather than reboot if it lost connectivity. I don’t need it any more because I don’t use wireless but it worked flawlessly.

Thanks Keithma. I guess we are thinking along the same lines. I ended up writing something similar except that it checks for the presence of an IP address on wlan0.
if ifconfig wlan0 | grep -q “inet addr:” ; then etc etc. If there is no IP address this will return false and I restart the network

I like your idea too.


The standard image relies on wpa_supplicant handling the reconnect etc; there should be no need for something separate.
I suspect something else going on like your AP bringing up the wireless network before it’s ready for DHCP.
Next time, grab the system logs and see what they say.

Yes, entirely possible it is an issue with the AP. It is just a consumer level box… Buffalo router with DD-WRT factory installed. My PiAware box is my only Pi that uses WiFi all the time. The others are cabled, or only run sporadicly.

btw. putting a ‘wpa_supplicant.conf’ file in root of bootdirectory with content like this often helps to reconfigure a pi to connect to wifi


another nice wifi instrument for the pi is

sudo apt-get install wavemon


my findings were that wifi-setup before first boot does 100% work with flightaware sd-card image. but if i setup a sd-card on my own using the raspbian images sometimes it works and sometimes not. while this part ‘ctrl_interface=/var/run/wpa_supplicant’ helps a lot …