Omega2 cannot reconnect to wifi automatically



  • I've tethered my Omega2 to a roving hotspot: usually it's available but sometimes it won't be (typically overnight, up to 16 hours).
    It connects just fine on boot if the hotspot is available, and if it's gone for only a few minutes and then comes back it has no problem reconnecting.
    But if it boots up while the hotspot is unavailable, or if it goes away for several hours, then it simply never reconnects automatically when it returns. I have to run wifimanager to force it to reconnect.
    Any thoughts on why this might be and how to fix it?



  • Look at https://community.onion.io/topic/1260/omega2-wifi-shut-down-apcli-link-down/7

    You could modify my script to run in cron and check if it's connected to any AP and if not, restart wifimanager. Should help in your case.

    Cron version would look like this:

    #!/bin/sh
    
    AP=$(iwconfig apcli0| awk '/Access Point: .*/ {print $5}')
    
    if [ "$AP" = "Not-Associated" ] ; then
            logger -t wifi-watch "WiFi not assosiated, restarting wifimanager";
            ifconfig apcli0 up
            wifimanager
    fi
    


  • Good idea, thanks!
    I was hoping for a root cause and solution but it doesn't really matter, so long as it's working. Threw this into a 10 second repeat and now it's working fine.



  • Root cause is: netifd does support iface events UP and DOWN but does not support something like "up failure" (I mean, there is no event fired after iface connection failed, only for UP and DOWN). Afaik.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.