1. Download our Official Android App: Forums for Android!

Support wifi toggle with weak signal

Discussion in 'Android Apps & Games' started by nyydynasty, Dec 31, 2014.

  1. nyydynasty

    nyydynasty Android Expert
    Thread Starter
    Rank:
    None
    Points:
    103
    Posts:
    956
    Joined:
    Sep 13, 2010

    Sep 13, 2010
    956
    173
    103
    Male
    IT Manager
    NY
    i'm trying to setup a tasker profile that will turn off and turn back on wifi while connected to my home wifi network. I have two AP's setup in my house and all the wireless devices we have will not switch to the stronger AP unless the previous signal drops and then it will reconnect to the stronger signal. So if I can get it to toggle the wifi switch on the device when, for instance, the wifi signal drops below 2 bars, then it will always connect to the stronger signal.

    The reason I'm trying to do this is also because there are a couple of rooms in the house where you'll be connected to the weaker AP, even though another AP is stronger/closer. Unless you manually toggle wifi, the device is very slow to load data.

    thanks

     

    Advertisement

  2. nyydynasty

    nyydynasty Android Expert
    Thread Starter
    Rank:
    None
    Points:
    103
    Posts:
    956
    Joined:
    Sep 13, 2010

    Sep 13, 2010
    956
    173
    103
    Male
    IT Manager
    NY
    never mind ... i found a work around after searching google for a while. If anyone is interested in doing the same, this is how i got it to work:

    Profile 1:Context 1 - WiFi Connected (to Home WiFi)
    Profile 1:Context2 - Time, repeat every X minutes (you choose this value, minimum allowed is 2 minutes)
    Profile 1:Task 1 - Var Set (NAME:%WiFiInfo TO : WIFII)
    Profile 1:Task 2 - Var Split (NAME:%WiFiInfo SPLITTER: Sig
    Profile 1:Task 3 - Var Section (NAME: %WiFiInfo2 FROM:1 LENGTH:2 STORE:%WIFISIG)

    Profile 2:Context 1 - Var Set (NAME:%WIFISIG)
    Profile 2:Task 1 -IF %WIFISIG < X (you choose the signal strength you want, I chose 2)...toggle wifi within the IF statement
     
    #2 nyydynasty, Jan 4, 2015
    Last edited: Jan 6, 2015
    codesplice likes this.
  3. codesplice

    codesplice Elite Recognized Moderator
    Moderator
    Rank:
     #14
    Points:
    1,563
    Posts:
    8,804
    Joined:
    Oct 29, 2013

    Oct 29, 2013
    8,804
    10,192
    1,563
    Male
    SysAdmin
    Huntsville, AL
    Very clever! I remember doing something similar to switch to cellular data if wifi signal got too weak. Thanks for sharing your solution. :)
     
  4. caked

    caked Lurker
    Rank:
    None
    Points:
    16
    Posts:
    1
    Joined:
    Feb 24, 2015

    Feb 24, 2015
    1
    3
    16
    Instead of parsing the wifi info every few minutes, you can use an Intent Received profile. Go to "Event" / "System" / "Intent Received" and use the android.net.wifi.RSSI_CHANGED action.

    Then, on every signal quality change, Tasker sets the local variable %newrssi to the current signal strength in dBm. If that value is below a certain threshold (e.g., -75), execute your wifi-switching task in Profile 2:Task 1, and you're done… ;)
     
    nyydynasty, Thom and codesplice like this.
  5. codesplice

    codesplice Elite Recognized Moderator
    Moderator
    Rank:
     #14
    Points:
    1,563
    Posts:
    8,804
    Joined:
    Oct 29, 2013

    Oct 29, 2013
    8,804
    10,192
    1,563
    Male
    SysAdmin
    Huntsville, AL
    Nice! Listening for that intent should be much more battery-friendly than constantly waking the device so Tasker can check. Thanks!!
     
  6. nyydynasty

    nyydynasty Android Expert
    Thread Starter
    Rank:
    None
    Points:
    103
    Posts:
    956
    Joined:
    Sep 13, 2010

    Sep 13, 2010
    956
    173
    103
    Male
    IT Manager
    NY
    thanks for that suggestion, caked. I'll give it a try.
     
  7. nyydynasty

    nyydynasty Android Expert
    Thread Starter
    Rank:
    None
    Points:
    103
    Posts:
    956
    Joined:
    Sep 13, 2010

    Sep 13, 2010
    956
    173
    103
    Male
    IT Manager
    NY
    I think its working but I was curious to display %newrssi but it doesn't work. When I choose the notify or alert option, it displays "%newrssi" and not the actual value. What am I doing wrong?
     

Share This Page

Loading...