Check Wifi tethering (Hotspot) status? Need to Enable wifi when turning off tethering?

1,121 views
Skip to first unread message

Anders

unread,
Aug 22, 2013, 2:12:50 AM8/22/13
to tas...@googlegroups.com
I want to use tasker to automatically enable Wifi again when I turn off Wifi tethering (Enabling Wifi tethering disables Wifi).
But there doesn't seem to be a variable to check if tethering status and therefore there is no straight way to accomplish this simple task.

I would be very grateful this could be implemented. Thanks

Matt R

unread,
Aug 22, 2013, 3:21:36 AM8/22/13
to tas...@googlegroups.com
The easiest solution is to make a Tasker task that toggles both at the same time and make a shortcut to that task and use that exclusively. I can think of other options of increasing difficulty/complexity if that is unsatisfactory.

Matt

Message has been deleted

Mike Mc.

unread,
Oct 10, 2015, 11:22:55 PM10/10/15
to Tasker
I know the OP probably won't read this since it's from 2 years ago, but if you're enabling the tether/hotspot with Tasker, I just discovered the Exit Task ability which makes re-enabling wifi an easy thing to accomplish. I have Tasker on my phone turn on the tether when it connects to my car stereo's bluetooth, but for some reason WiFi doesn't come back on automatically like it does when you touch the shortcut for hotspot to turn it on and off. I was struggling to figure out a way to do this since I didn't know there were Entry and Exit tasks. It's also interesting that it has assumed exit tasks, like my task to enable hotspot also disables it when I disconnect from the bluetooth stereo, which is cool but it doesn't show that as an exit task. I should probably read about assumed exit tasks I guess, if that's even a thing.

Tasker is great, even if it is kind of clunky and weirdly laid out. I am still a newb with it, but it has helped me greatly with my Carputer setup. Here is what I'm doing if anyone cares:

I want to keep my Galaxy S6 in my pocket when I drive to and from work. People get tickets for even holding their phones while driving, so I don't want to be tempted to even hold it, not like I'm super paranoid but really I shouldn't need to touch it during the drive.
I got a Nexus 7 on eBay, along with a power 400w power inverter with 4 USB ports. I plan on setting up a laptop under the passenger seat for some Windows-only Subaru WRX tuning software (to flash the ECU, for instance), and my laptop requires 170W power brick so I wanted a 400W inverter. It fit nicely behind the Nexus in the void left from removing the head-unit.
I also got a single-din mounting pod that goes on top of the dash in place of the stock clock/airbag indicator, so I relocated the stereo up there. The double-din opening fits a Nexus 7 quite well, though I had to hack up the plastic of my car a bit to make room for the charging cable. I didn't want to use wireless charging since it's slower and I need to optimize charging since it might only be charging for 1 hour a day and not much at all on the weekends.
I was going to use analog audio cable from Nexus to head-unit, but the one I had wouldn't work very well (only left channel even though it was plugged in all the way), so I want to use bluetooth to play audio from it to my stereo. I'll also be using the S6 to be a hands-free phone with the stereo since it has that feature. Turns out, this does in fact work even with the cheap Alpine. I set bluetooth on the phone to be for calls but not media, while the Nexus is set to just media. I also needed the phone to connect first or else it would get confused and nothing would connect to the head-unit.

Here is what happens when I get in my car (I've only set it up for 1 day so there is tweaking and learning to do still):

Turn key to at least ACC -> Nexus 7 comes on and won't turn off while charging (Developer Settings -> Always on while charging)
Alpine head-unit comes on, S6 connects to it automatically via BT for calls/hands-free.
Tasker kicks off the first task for the S6, which is to turn on the tether when BT is connected to "Alpine CD Receiver"
Tasker also was kicking off the first task on the Nexus 7, which is to turn on wifi. Why? Because the Nexus stopped connected to my wifi hotspot for some reason (it used to initially but now won't for some stupid reason. Maybe a bug with Android 6.0 marshmallow), so I make Tasker turn off wifi when done and turn on when it gets power. This makes it connect to the wifi hotspot successfully - there is no task to connect to it, it just does it once wifi is turned on.
Tasker continues with tasks on the Nexus 7 once it enters the state of "connected to S6 hotspot", like turns on bluetooth so it connects to the Alpine for media audio only AFTER the S6 has connected to it.
It then launches this volume control app whose name escapes me, so that the volume gets louder as I drive faster. This app has its own profiles and such, and claims to launch automatically etc., however it never turns speed controlled volume on so I am doing this manually still. I love the idea of not having to touch the volume on my Alpine at all, especially in my noisy WRX.
Tasker turns on Car Mode and goes home, which takes me to Car Home Ultra.
Then finally it performs the media key operation of "play" to resume playing whatever audio app I was last using (usually Google Play music or Pandora. I haven't been using MP3s of my own anymore but might do that to save on data usage. I'm thinking of using a 2TB hard drive in the laptop and mounting a path to that on my Nexus 7 or using something like Plex that Android could easily play songs from).

When I turn off the car, the S6 turns off the wifi hotspot since it doesn't have the BT connection to Alpine (an automatic exit task done by Tasker, which seems kind of odd to me). I haven't tested my exit task yet to turn wifi back on, but I put a 5 second wait then turn on WiFi. Going to go test it right now, fingers crossed.
The Nexus isn't charging, so it performs some tasks, like Greenify all apps, Greenify-force Torque, turn off bluetooth and wifi (to save power and also to get wifi to connect properly when I get in the car. I might do airplane mode with Secure Settings or something to save even more power). It does automatic exit tasks like exits car mode. I probably should really read up about automatic exit tasks, but so far they have been useful.

So far I'm loving it. I really enjoy messing around with Android, Windows, and cars. I used to have a 2004 WRX and sold it, so I was happy to get a 2006 WRX. I have flashed the ECU already to get another 3 or 4 PSI from the turbo. Just a stage 1 config so far, but will eventually get stage 2 rockin'. I have a spreadsheet of wanted mods and upgrades, which just keeps growing and growing. Wifey isn't too happy about mods and stuff, so I have to spend money on less fun stuff like home improvement and new windshield for our Ford Fusion, etc. 

Anyway, sorry for the long post!

John Paz

unread,
Jan 24, 2018, 11:32:13 PM1/24/18
to Tasker
Good on ya mate! Sounds like a super sweet setup. Thanks for sharing--another three years later ;-) 
Reply all
Reply to author
Forward
0 new messages