I use 2 methods: ping my webserver run ifconfig to check for existence of apclio and local IP address from result of both I could tell if I needed to call wifimanager to restart. Since b17* it's been stable enough to reconnect itself so I no longer use this and I cache data until I am able to connect again using urllib2.