Would anyone know how a RaspberryPi could fallback on AP mode if the configured wifi was unavailable?
At the moment the behaviour of emonSD is (if configured to connect to a wifi network) to just keep trying to connect to that network it’s been configured for. I think if multiple SSIDs are added to the wpa_supplicant.conf that it’d try them too, not sure.
I’d like to config the rPi such that if the wifi isn’t available anymore, it’d go back into AP mode and broadcast it’s ‘emonPi’ SSID so it can be reconfigured. Thinking a cron job…
It’s so I can have a device I can move around more easily, show it off
The script checks if ethernet is connected or if the pi is already connected as a client. If neither are true it checks if there is a wifi configuration in wpa_supplicant, if thats empty it then starts an access point.
You might be able to change that logic around a bit and run from a cronjob to get the result that you’re after …