What is it

Connect2Wifi is a Task that will enable wifi and give feedback of the status.
It will not force any connections, the connection are taken care of by Android. (If you only want to connect to specified Wifi/SSID you can use the plugin of the SSID Selector)
This means if the network is password protected, the connection needs to be made manually once.
It does following this:

  • checks if Parameter 1 is set and sets it to *CONNECTION* if it isn't set

*CONNECTION* will match any wifi connection and if you give a specific network name it will only match that

  • loop 1:
    • enable wifi
    • wait 10 seconds
      • loop 2:
      • check if Wifi info contains Parameter 1, stops Task and returns true when it is
      • waits 5 seconds and checks again if it isn't
      • repeats 9 more times
    • turns wifi off
    • waits 3 seconds
    • repeats this 3 more times
  • check if Wifi info contains Parameter 1, stops Task and returns true when it is
  • stops Task and returns false if it isn't and puts a notification in the notification bar

the loops are in place because I experienced connection issues and disabling and then enabling wifi "fixed" this..

How can this be usefull

I use this for my nightly backup Profiles to make sure I'm connected to my network, no use in looking for my servers when I'm not connected or connected to a different network than my own.

How to use it

  • in a Task add an Action - Task - Perform Task
  • select Connect2Wifi
  • set Priority higher than the Task you are putting this action in to make sure Connect2Wifi completes before the calling Task
  • fill in Parameter 1 (%par1), choose your network name or leave empty to match any wifi connection

prefix and suffix the Parameter with *

  • fill in a Return Value Variable (for example %connected) to store the result
  • in the calling Task you can then check if %connected is true or false indicating network connection or not


Parameter 1: *my_ssid*
this will mean Connect2Wifi will turn on wifi and during the loop it will check if the connection info contains *my_ssid*.
If it doesn't it will turn off wifi and on again and start over.
If it's connected to another network, it will also turn off wifi as the Parameter doesn't match.


  • 25-02-2012
    • initial release

Forum post
please report any issues here


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License