• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Restart wifi when disconnected

Vike91

Lurker
Hi folks!

My Wifi hotspot is problematic, and keeps dropping the connection off my tablet. The tablet does not reconnect if I don't restart the Wifi .

I'd like to set Tasker to automatically restart Wifi (set Wifi off, wait 10 seconds, and set Wifi on) when the connection is dropped. After this Tasker could wait until Wifi is connected again.

Is it possible to do this?

Thanks in advance
Vike91
 
Hi and welcome to this corner of the forum...

If I understand right, this Tasker profile is for your phone which is running as a WiFi hotspot, not for your tablet. The task should look like this:

1. Net > WiFi Tether > Set = Off
2. Task > Wait > Seconds = 10
3. Net > WiFi Tether > Set = On

As for the trigger, what you need is a way to detect if the internet connection is working. I'd have to look this one up but I believe there is a way of doing a kind of ping by using 'Browse URL' or 'HTTP Post'... If anyone wants to jump in and assist me there, that'd be great. Otherwise, I'll investigate more as soon as time permits.

If I didn't understand right, please let us know!
 
Hi! I mean that my Wi-Fi router is very problematic. I'm not tethering anything. Just trying to keep the Wi-Fi connection active even after it disconnects.

The tablet won't connect it again before I switch Wi-Fi off and back on.


So basically I'm seeking a way to automatically switch WiFi off, then wait for 5 seconds, then switch it back on.

I have no idea how to set Tasker to monitor WiFi status to activate it. The task should be run if the connection was disconnected because it is out of range.

Any ideas folks?
 
Hi folks!

My Wifi hotspot is problematic, and keeps dropping the connection off my tablet. The tablet does not reconnect if I don't restart the Wifi .

I'd like to set Tasker to automatically restart Wifi (set Wifi off, wait 10 seconds, and set Wifi on) when the connection is dropped. After this Tasker could wait until Wifi is connected again.

Is it possible to do this?

Thanks in advance
Vike91

Hi
This is the trick that always work for me as well. I tried fixing the issue in settings but it is of no use I use 3 android devices at a time tablet my two smart phones and I use wifi and when the internet disconnect all the three devices stop working and that I have to restart the wifi again to reconnect the wifi connection. :smokingsomb:
 
Problem solved. I just used the Wifi Connected state as triggering event, and checked the Invert box.

EDIT: Uh... The Not WiFi Connected state trigger is not working...
 
I have found that it is often necessary to restart Tasker after changing a profile. Sometimes it is necessary to power off/power on.

... Thom
 
All you need to do to make sure that the latest changes are saved is to press Back from Tasker's main screen to close it.

As for your issue, I don't know exactly why but I have a hunch that we should try to fix it with an exit task. I may be going for an overkill solution, though... I'm adding some toasts for debug purposes, you can remove them once you're happy.

Profile "WiFi Connected"
Context: State > Net > WiFi Connected > SSID = "YourProblematicSSID"

Task "WiFi Connected"
1. Alert > Flash > Text = "WiFi connected"

Exit Task "WiFi Lost"
1. Alert > Flash > Text = "WiFi lost. Now switching off"
2. Net > WiFi > Set = "Off"
3. Task > Wait > Seconds = 10
4. Net > WiFi > Set = "On"
5. Alert > Flash > Text = "WiFi switched back on. Check your connection"
 
Back
Top Bottom