Restart WiFi if connected but internet not reachable

549 views
Skip to first unread message

Fabio Albieri

unread,
Oct 20, 2011, 5:29:25 PM10/20/11
to Tasker
Hi,

I'm fighting with a couple of bad (trough vital) WiFi networks.
Issue is, sometimes WiFi connects succesfully, but no data really
flows, internet is unreachable, etc.
In these conditions, Android eats a lot of battery trying to auto
sync, and so do 3rd party apps.

My solution is to stop and restart WiFi (or disconnect/reconnect from
WiFi network). This way, the same network starts to work.

I'm trying to make Tasker
- if WiFi is connected to a specific SSID, check every 5 minutes if
internet is reachable
- if not, stop and restart WiFi.

Unfortunately, I keep having problems with tasks never ending, and
none is working.

May I ask you how would you achieve this result ?

Pent

unread,
Oct 21, 2011, 3:10:15 AM10/21/11
to Tasker
> I'm trying to make Tasker
> - if WiFi is connected to a specific SSID, check every 5 minutes if
> internet is reachable
> - if not, stop and restart WiFi.

Wifi Connected: SSID
Time: Every 5 Mins
Perform Task: CheckWifi

Task: Check Wifi
HTTP Get (known website, not asker.dinglisch.net please :-)), Continue
On Error
If %HTTPR != 200
Wifi Off
Wait 10 Seconds
Wifi On


(untested)
Pent

Oon-Ee Ng

unread,
Oct 21, 2011, 5:25:15 AM10/21/11
to tas...@googlegroups.com

Better one, which was recommended to me on this list.

HTTP Get www.google.com/doesnotexist.html, continue on error
IF %HTTPR != 404


Wifi Off
Wait 10 Seconds
Wifi On

The added benefit is that it doesn't turn wifi off and on if you're at
a location (for example Mcdonalds free wifi) with a login page. I use
this to automatically bring up the browser so I can login.

Anthony DeRobertis

unread,
Oct 21, 2011, 12:15:56 PM10/21/11
to tas...@googlegroups.com
Wonder if Google checks their error logs. Probably. Leave it connected all day, and you've sent 288 errors to them. Its conceivable that were you do to this for a long enough (a month would be nearly nine thousand), you'd actually get their attention.

That makes this a not-so-good way to check if your connection is working.

BossMan

unread,
Oct 21, 2011, 12:40:06 PM10/21/11
to tas...@googlegroups.com
With hundreds of millions (at least) queries performed each day, I'm more than sure there's nothing to worry about... :)

And even if - what would they do? Block your ip? Knowing that you're a devoted android user, possible spending money in the market, clicking adverts and so on? :)

BR,
A.

Anthony DeRobertis

unread,
Oct 21, 2011, 12:55:12 PM10/21/11
to tas...@googlegroups.com
The normal usage doesn't generate errors, meaning errors can be used to track down things that are broken.

The worst that'd probably happen is you'd be flagged as a bot, leading to CAPTCHA requests whenever you try to search.

A few people doing this won't really matter; they can easily just ignore the made-up URLs that the few people use. But that's the type of thing that causes issues if it becomes widespread.

Personally, I try and avoid that. Especially since in this case, the OP should know about any possible authentication portals (and be able to handle that), since its two particular networks.

(I seem to remember a while back Yahoo actually was seeing a fair bit of bandwidth use from 'ping www.yahoo.com', in the many megebits range, but I can't Google up a source, so, I may be remembering wrong.)

Fabio Albieri

unread,
Oct 21, 2011, 1:13:05 PM10/21/11
to Tasker
Thank you all guys !
Great help indeed. I'll try this soon

On 21 Ott, 18:55, Anthony DeRobertis <derob...@gmail.com> wrote:
> The normal usage doesn't generate errors, meaning errors can be used to
> track down things that are broken.
>
> The worst that'd probably happen is you'd be flagged as a bot, leading to
> CAPTCHA requests whenever you try to search.
>
> A few people doing this won't really matter; they can easily just ignore the
> made-up URLs that the few people use. But that's the type of thing that
> causes issues if it becomes widespread.
>
> Personally, I try and avoid that. Especially since in this case, the OP
> should know about any possible authentication portals (and be able to handle
> that), since its two particular networks.
>
> (I seem to remember a while back Yahoo actually was seeing a fair bit of
> bandwidth use from 'pingwww.yahoo.com', in the many megebits range, but I

Tillsats

unread,
Mar 11, 2012, 6:16:58 AM3/11/12
to tas...@googlegroups.com
I have set up this task, however, I cannot find continue task on error? When HTTP Get fails the task abort. So where do I find that setting for not aborting on error?

Thanks
/P

Tillsats

unread,
Mar 11, 2012, 8:07:49 AM3/11/12
to tas...@googlegroups.com
Nevermind I unchecked/checked some stuff in preferences, (unchecked beginners mode amongst other...) and now I have the checkbox. Task works as well!

Great!

Thanks for an amazing application.
/P
Reply all
Reply to author
Forward
0 new messages