I am running a couple RPi powering infoscreens in a building where everyone and their cat made their own undocumented "improvements" to the network configuration (and I am undertooled, undermotivated and possibly underskilled to solve such problems so working networkside is not an option to me)

The result is that there are many networks, some hidden some not, that are accessed through many access points spread through the building (so each AP runs the same 4 WLANs, 2 hidden, 2 visible, all WPA-PSK protected).

The screens are supposed to run on one of the hidden networks (and they worked till someone chose to "streamline" the network without the competences or skills or even the forethought to take pictures of what he was changing. Yes I hope this will have you guys both cringing and chuckling. It's a normal day in IT, right?).

So, the problem is that often times, while all 4 networks are always accessible through the APs, the network the infoscreens are supposed to run on have no internet access (i.e. they fail a simple wget sluggy.com).

I do not want to run those screens on public network because is a fragile and PITA workaround (and because OF COURSE somebody had to block SSH over it.).

What I would need, is to get the Pi to access each wpa_supplicant.conf in turn, maybe weighted by priority, check if they have a full internet connection, possibly ping one of my (thankfully static-IP and stable) servers to tell me what network they are on so that I can admin them.

I have looked around a lot and was able to find ways to test if there is internet connection (by pinging google's DNS, might change to a wget) and ifdown/ifup wlan0. BUT - all the RPi does so far is to connect again to the network with strongest signal OR with higher priority, which of course are either:

  • the one they are supposed to connect to via Priority that Heaven knows when will work again, so it'll connect to AP and have no internet.

  • the one I put first in the file and it will ALWAYS choose that when no priority indication is given, as signal strenght for all networks is the same.

What I would like the RPi to do, is to pick a network among those in wpa_supplicant.conf. try to connect. try to check if internet is up. if not, disconnect and pick a DIFFERENT WiFi among the configured ones. Even when internet OK, check every minute if Internet still OK. If not, cycle network. Repeat till one works or till thermodynamic death of universe.

I was unable to set wpa_roam in such a way to cycle through them. Maybe there are some options in wpa_supplicant but so far I couldn't find them. It's strange, as I would consider such features to be a big part of IoT network robustness.

Any help? thanks

  • 2
    I appreciate your attempt to entertain, but you'll probably get better replies if you edit this down to just the necessary information presented in many fewer words.
    – Brick
    Nov 23, 2017 at 15:43
  • This would be so much easier to solve by making sure there's a single network for the infoscreens which always has Internet access. Nov 24, 2017 at 12:37

1 Answer 1


One way to achieve better network selection is to upgrade to network-manager to manage network interfaces (sudo apt install network-manager).

Once you have installed network manager and created one or more connections you can add a connectivity check, so that network manager will try all the enabled connections and select one that succeeds with internet connectivity.

Details on connectivity checks here: https://wiki.archlinux.org/index.php/NetworkManager#Checking_connectivity

  • have perused the docs and this seems the way to go. thanks
    – RedSash
    Dec 1, 2017 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.