Auto Wifi Tether - Huawei Mate 10 Questions & Answers

Hi,
I recently switched from Samsung to Huawei Mate 10 Pro.
On my old phone with a help of Tasker I was able to automatically enable Wifi Tether when connected to a specific BT device. On Huawei I can no longer achieve this, Wifi tether task throws out the below error:
Code:
12.46.02/Mirror android.net.ConnectivityManager.setMobileDataEnabled: unavailable
12.46.02/Mirror android.net.ConnectivityManager.setRadio: unavailable
12.46.02/E current state: 1
12.46.02/E WiFi Tether: cur: false new: true
12.46.02/M lastWifiDisableAgoMS: 1515069962395
12.46.02/E check AP state
12.46.02/E AP state: 1
12.46.02/M lastWifiDisableAgoMS: 1515069962395
12.46.02/E current state: 3 12.46.02/E curval: 3
12.46.02/E WiFi: cur: true new: false
12.46.02/E wait for wifi state 1
12.46.02/E wait for 200ms
12.46.02/E wait finished
12.46.02/E wait for 200ms
12.46.02/E wait finished
12.46.02/E ap: false, got wanted state 1
12.46.02/E wait for 200ms
12.46.03/E wait finished
12.46.03/E WiFi Tether: setWifiEnabled()
12.46.03/E WiFi Tether: enable failed
12.46.03/E Action WiFi Tether failed.
12.46.03/E result: stop task (error)
12.46.03/E Error: 1
12.46.03/MacroEdit action finished exeID 1 action no 8 code 113 status: Err next 8
I am not sure whether this is an issue with Oreo or Huawei.
Do you guys have any suggestions how to fix the issue without rooting the device?
Regards
Mario

Hi Mano, I also switched from a Samsung to a Mate 10 Pro today and had same issue as you, it has nothing to do with brand, it is just Android version. I saw your topic when I was looking for a solution.
I got it working on my Mate 10 Pro, your post is one month old but if you didn't found the solution here it is:
https://play.google.com/store/apps/details?id=com.matejdro.taskertethercontrol&hl=en
This has also a tasker plugin which turns on/off tethering and it works on my Mate 10 Pro and my Android Car device.
Good luck.

Thank you! No I have not found a solution. I will test the plugin tomorrow.
Sent from my BLA-L29 using Tapatalk

Hi Mario, sorry calling you Mano before, I can't read on small screens I guess
Today I found out that Tasker getting killed after a while, to prevent that you have to go:
-Settings
-Apps & notifications
-Apps
-Tasker
-Battery
-Start
-Check <Automatic Start> <Secondary Start> <Run in Background> (uncheck the first option above)
It could be little different in your phone because I tried to translate from Dutch.
Also I am not sure if the tasks get executed with screen lock, I couldn’t fully test it, but if it is not working with screen lock we have to find another way around. But like I said, I am not sure maybe it does work, when I tested the phone was unlocked to see if the hotspot get turned on.

Thanks. I have tested this today and I can confirm it works. I wonder if having Tasker added to manual battery management would have any negative impact on the battery...
Sent from my BLA-L29 using Tapatalk

Basically it was running in background on your old Samsung, and new Android versions have “better” battery management, but this does ruin apps like Tasker. I am not sure how much it will effect on the battery but we can check that in battery status ofc.

Okay battery usage tested for 12 hours, my battery dropped to 48% and Tasker only used 0.03% of this with 0.29mAh usage. I have been driving a lot today, in/out the car short distances and every time Tasker with the plugin provided hotspot for my Android car radio.
Conclusion: Tasker usage is really low, so it wont hurt your battery usage much.

Related

[Q] Need help creating tasker profile to disable background data when signal is weak

The battery life on my 3D is far worse than my 4G, which had the extended battery (obviously). But until an extended battery is available for the 3D, I will have to deal. In order to make the battery last longer, I'd like to automatically disable background data (or auto sync) when the signal is less than 2 bars for a few minutes. Can any of you help me with this?
I've created a profile that will disable auto sync when signal is "2" or less. But I'd like to enhance it by saying it has to remain less than "2" for 3-5 minutes, so it isn't constantly enabling/disabling auto sync when I go through tunnels, etc.
Thanks in advance!
Dave
Power saver feature that is built in does that.
Oops, reading comp fail. I thought you said battery. Sorry.
-----
3vo. That is all that needs be said.
user7618 said:
Power saver feature that is built in does that.
Oops, reading comp fail. I thought you said battery. Sorry.
-----
3vo. That is all that needs be said.
Click to expand...
Click to collapse
Yeah, it does it when the battery reaches 15%. I want it to do this at any battery level, but only when the signal is weak.
Dave
I've made some progress with this. It's not perfect, but I think it will work.
First, create a task called "weak signal"
Check state, signal level is 0-1
Set variable %WEAKSIGNAL to 1
Wait 3 minutes
If %WEAKSIGNAL = 1
Disable auto sync (I wish this could be background data, but I don't see an option)
Then create a second task called "normal signal"
Check state, signal level is 3-8 (left a gap to prevent flapping)
Set variable %WEAKSIGNAL to 0
wait 15 seconds
If %WEAKSIGNAL = 0
Enable auto sync
I'll test this for a few days and see if it improves things. Coincidentally, I've been in areas with weak signals each day since I got the 3D. As a result, I'm lucky if the battery lasts 8 hours. I know disabling always-on data will fix this, but I don't like that the weather and everything stops syncing. Hopefully this will be a happy medium.
Dave
The tasker script seems to be working perfectly! It has definitely improved my battery life in weak signal areas, and I haven't noticed any ill effects.
Dave
dodgeboy said:
I've made some progress with this. It's not perfect, but I think it will work.
First, create a task called "weak signal"
Check state, signal level is 0-1
Set variable %WEAKSIGNAL to 1
Wait 3 minutes
If %WEAKSIGNAL = 1
Disable auto sync (I wish this could be background data, but I don't see an option)
Then create a second task called "normal signal"
Check state, signal level is 3-8 (left a gap to prevent flapping)
Set variable %WEAKSIGNAL to 0
wait 15 seconds
If %WEAKSIGNAL = 0
Enable auto sync
I'll test this for a few days and see if it improves things. Coincidentally, I've been in areas with weak signals each day since I got the 3D. As a result, I'm lucky if the battery lasts 8 hours. I know disabling always-on data will fix this, but I don't like that the weather and everything stops syncing. Hopefully this will be a happy medium.
Dave
Click to expand...
Click to collapse
Only problme I see with this is that it will kick in if you have a weak signal but still are connected to a wifi hotspot.
Could someone explain how to do this ? how to add this task? So i could save the battery when signal is low . Thanks
I am also having pretty horrific battery life, only 6 hours where my 4G use to last 36... So I thought I'd take this idea and make my own little modifications to it.
First I thought I would explain to those not familiar with Tasker. It is an app that allows you to setup your phone to automatically do "tasks" based on contexts. These contexts can be things like whether your connected to wifi, what time of the day it is, how good your signal strength is, anything your phone can "sense." And tasks are basically anything your phone can do, like turn on and off settings or launch applications.
Market Link: https://market.android.com/details?id=net.dinglisch.android.taskerm
Dev Website: http://tasker.dinglisch.net/
Now for my take on dodgeboy's 'profile'.
Code:
Context 1: Signal Strength, from 0 to 2
Context 2: Wifi Connected, Invert (Not connected to wifi)
Enter Task 1: Wait 1 min
Enter Task 2: Auto-Sync Off
Enter Task 3: Notify,[Title] Low Signal, [Text] Auto Sync Off, Permanent (I wanted a notification that auto sync was off)
Exit Task 1: Wait 15 sec
Exit Task 2: Auto-Sync On
Exit Task 3: Notify Cancel (Clears that Permanent notification)
Here is a link to my exported profile. Just put it on your phone's sd card. Once tasker is open, hit menu, profile data, import one profile.
http://db.tt/gb9w8O4
Let me know what you think. Haven't tested it beyond testing it at my desk by "death gripping" the phone.
ok, so there is some issue with my profile. Occasionally it will not perform the exit tasks, so the notification stays up and the auto-sync remains off. Not sure why it sometimes works and sometimes doesn't..? Maybe I'll try a 2 profile setup like the OP using a variable. Will post back if I get around to making a new profile(s), or if I figure out what is wrong with my current profile.
Thmstec said:
ok, so there is some issue with my profile. Occasionally it will not perform the exit tasks, so the notification stays up and the auto-sync remains off. Not sure why it sometimes works and sometimes doesn't..? Maybe I'll try a 2 profile setup like the OP using a variable. Will post back if I get around to making a new profile(s), or if I figure out what is wrong with my current profile.
Click to expand...
Click to collapse
Are you waiting for it to go through the wait period? The way I wrote it, it needs to stay in one state for a period of time before it changes whether or not the auto sync is enabled. If you want it to happen immediately, just write it without the variable and wait sections.
The reason I want it to wait is because when you enable auto sync, it seems to perform at least a partial sync immediately. I don't want this script to make the battery worse, because it is constantly syncing as it comes in an out of signal range.
Thanks for all the comments, very helpful !!! It is noticeable the battery saving

Tasker profile becomes inactive after phone is idle for 10 minutes

Hi all,
I have an AT&T Samsung Note 3 SM-N900A running Android 4.3 (baseband version N900AUCUBMJ5, kernel v3.4.0-1625098). I rooted it using Kingo, installed Tasker (with Secure Settings plugin), and created 2 profiles: one with a 'Home' location context, and one with a 'Work' location context. In the 'Location Edit' map screen for each, I set a pinned location w/ a radius of 200m. I also de-select 'GPS' (leaving only 'NET'), since I don't want GPS enabled all the time (to extend battery life). I confirm that these work when I'm actively using the phone.. the profile becomes active when I'm at the specified location (as expected). I know it's active because it's displayed in the Notification Panel (and it's also shown in green in the Tasker profiles list).
The issue I'm having is that after ~10 minutes of idle time (i.e. when the display is off and I'm not using the phone), I find that the profile is no longer active when I turn the display back on and start using the phone again. I confirmed that this *doesn't* happen after 1 minute, 2 minutes, nor 5 minutes… only > 10. I also confirmed that it happens for both profiles consistently. However, as soon as I start Tasker again from the Apps Drawer (or from Recent Apps screen), the profile is immediately activated again, and my Enter task is re-run.
I enabled the run log in Tasker prefs, but it basically shows a clean activation of the profile (with no warnings or anything that looks weird to me).
I know there's a 10-minute timeout in the Display Off Monitoring prefs, but that doesn't seem to be related to my issue. I tried reducing the All Checks Seconds from 600 to 90, rebooted the phone, and it still took ~10 minutes before the profile would become inactive after the phone being idle.
Any thoughts as to what the culprit might be? Are there any system logs I can look at that might shed some light here? I'm new to Android, and this seemed like the place to ask..
Thanks.
Ok, not solved..
Alright, bumping this, as the problem is back again after some time.
Has anyone ever seen Tasker exhibit the behavior I described? Again, I start the phone and Tasker profile is active, let the phone go idle for >10 minutes, the profile is no longer active and I need to restart Tasker manually to make it active again.
Still trying to figure out what logs are best to look at..

WORKAROUND of no-push-notification in deep sleep

I'VE FOUND A WORKAROUND of this no-push-notif during deep sleep problem.
Earlier, I tried holding partial wakelock so the device never sleep, this of course works alright, but drains battery very rapidly (5% / 30mins).
This is NOT ACCEPTABLE.
So, I tried something else :
automatically waking up the device regularly every 30mins, with the help of Tasker (which doesn't turn on the screen at all).
The result is :
7 hours after screen off and a good night sleep, in the morning I sent myself a BBMsg and it arrived perfectly in about 5 secs.
Battery consumption is totally acceptable : only 4% drop during 7 hours (dual sim ON, data ON).
That's days ago, and still works perfectly until now, I'm happy with it, so I'd like to share the AWESOMENESS.
I'm not sure about push notif from Google servers via GCM, I don't use any app which takes advantage of GCM, I only use BBM which uses its own servers.
In this case, you should first try adjusting heartbeat interval using PushNotificationFixer (which can't help me since it only resends heartbeat to Google server).
Tasker setup :
1. create new profile : Time
* uncheck both start & end time (so it starts and ends from midnight to midnight)
* check Repeat : every 6 minutes (during deep sleep, this 6 mins expands 5x to 30 mins)
2. add new task :
what you do in this task doesn't really matter, the point is to do something in a regular interval (I only use Alert Morse, so I know that the profile is still running)
GODSPEED !!!!
PS. :
if you're not familiar with Tasker, after installation you have to :
1. allow it as admin (system Settings > Device Administrators)
2. turn on its service (system Settings > Accessibility)
3. put it on auto-start list

Phone Profiles Plus

Hi all,
I just wanted to share an app I've been using for quite a while and I think it's great and might be useful for some.
It's called Phone Profiles Plus, it allows you to set sound profiles based on time of day, location, connected devices, connected to WiFi or Bluetooth and also when connected to a charger, you can also have it launch apps based on what it's connected to.
Example 1: When I got to the gym and connect my Bluetooth headphones, it will automatically launch 2 apps for me, Google Play Music and my workout app (but doesn't close them when disconnected, unless I didn't figure how)
Example 2: When I connect my phone anytime between 11pm and 8am to the charger, it will set all sounds to silent and then revert back to the previous profile once I take the phone of the charger.
Example 3: If I go the the movies (I usually go to the same 2 theaters) my phone will automatically change to vibrate based on the location.
Anyway I thought I would just share.
Phone Profiles Plus at Google Play Store
Yes, it's great but unfortunately has no good help file. For example I totally cannot figure out what 'shared profile' is. And why bluetooth is constantly switching on when nothing is triggering it and there is absolutely nothing on the log file.
I just installed this app and it seems awesome. I, too, am having some small configuration issues and was looking for a subreddit, user forum, wiki, or some other place where users could help each other. Does anyone know if this exists?
I'm using the app without events until I get the profiles working like I need. I want all notifications off at night (Sleep profile) except for my ringer and alarm. I enabled the "Unlink Ringer and Notification Volumes", set notification volume to 0, Ringer to 1, but I can still hear all of my notifications. Am I missing some other setting somewhere?
Thanks for any light anyone can shed on this!
I would try to set the system sounds to 0, silent sound notifications, 1 ringtones, but silent sound and ring only for those who have a ringing tone assigned, the alarm clock works, and other announcements are quiet. It works fine for me.
This app is surely great, I have one problem: my home and my work places are very close to each other and there is only one mobile cell that covers both my home and my work. There are around 10 totally different cells for home and 10 other cells for work but this only one common cell that is in use in both home and work areas is spoiling the whole profile change process because my profiles are changing based on mobile cells. It would be very easy if my GPS sensor was enabled at all times but it is not and don’t want to be enabled constantly. Any advice of how to solve this problem without GPS enabled will be greatly appreciated! My phone is Samsung Galaxy S9+ and it is rooted with Magisk.
I like this app, but I am having similar issues here. Bluetooth activates/deactivates unexpectedly. Events sometime trigger unexpectedly. Can't find support.
RDLaw said:
I just installed this app and it seems awesome. I, too, am having some small configuration issues and was looking for a subreddit, user forum, wiki, or some other place where users could help each other. Does anyone know if this exists?
I'm using the app without events until I get the profiles working like I need. I want all notifications off at night (Sleep profile) except for my ringer and alarm. I enabled the "Unlink Ringer and Notification Volumes", set notification volume to 0, Ringer to 1, but I can still hear all of my notifications. Am I missing some other setting somewhere?
Thanks for any light anyone can shed on this!
Click to expand...
Click to collapse
I'm using this app too and potentially it should be great, however I cant get events working as they should. Finding some sort of support would be handy.
Westindieman said:
I'm using this app too and potentially it should be great, however I cant get events working as they should. Finding some sort of support would be handy.
Click to expand...
Click to collapse
What issues are you having with getting your events to work? Are they activated? Did you set priorities for them?
Sent from my SM-N960W using XDA-Developers Legacy app
Cyclops1055 said:
What issues are you having with getting your events to work? Are they activated? Did you set priorities for them?
Sent from my SM-N960W using XDA-Developers Legacy app
Click to expand...
Click to collapse
Thanks for your response. My events sometimes don't activate and you are correct, it could be to do with the priorities which I didn't pay too much attention to before. I thought as long as the active parameters were met the event would activate the profile. For example I initially had my home profile activated by the area then I tried mobile cell censor, I also set this to be active between 7AM and 2300. I had a 'night' event from 2300 till 7AM which only seemed to activate when I restarted events. I had a work event which should have activated on the area where I work but wasn't. Even when I tried manual activation it wasnt changing. Yesterday I cancelled the time activation on the 'at home' event and left the times on the 'night' event and gave a higher priority to the 'night' event and this seemed to work last night, but I have previously had things working for one activation before then it doesn't again, so we will see. Also I have switched to 'order events by priority' rather than start order, so will see how that works over the next day or so when I am back at work.
Im using a Oneplus Six
Regards
Westindieman said:
Thanks for your response. My events sometimes don't activate and you are correct, it could be to do with the priorities which I didn't pay too much attention to before. I thought as long as the active parameters were met the event would activate the profile. For example I initially had my home profile activated by the area then I tried mobile cell censor, I also set this to be active between 7AM and 2300. I had a 'night' event from 2300 till 7AM which only seemed to activate when I restarted events. I had a work event which should have activated on the area where I work but wasn't. Even when I tried manual activation it wasnt changing. Yesterday I cancelled the time activation on the 'at home' event and left the times on the 'night' event and gave a higher priority to the 'night' event and this seemed to work last night, but I have previously had things working for one activation before then it doesn't again, so we will see. Also I have switched to 'order events by priority' rather than start order, so will see how that works over the next day or so when I am back at work.
Im using a Oneplus Six
Regards
Click to expand...
Click to collapse
I found using the priorities helps a lot with event, here's some examples of events that I have setup and their priorities.
Event name: Work (activated by time: Mon to Fri, 8am to 6pm) / Priority: P6
Event name: Car (activated by Bluetooth connection to my car) / Priority: P8
Event name: Bedtime (activated by time and if phone is charging: 7 days, 11pm to 7am and phone must be also be charging to launch event / Priority: P7
So here is where setting Priorities is important:
Let's say it's 11:30pm and I'm home and put my phone on the charger, my Bedtime event will activate which switches my Profile to the DND that I set up.
But if it's 11:30pm and I go into my car and connect my phone to Android Auto (USB cable) or to the car charger, my Car event will launch and not my Bedtime event.
My Car event is set to P8 and Bedtime is set to P7, so the Car event takes priority over the Bedtime event.
I've been using Phone Profiles Plus for a few years now and have about 10 events setup.
If you have questions, I'll be glad to try and help, I learned how to use it by trial and error.
Cyclops1055 said:
I found using the priorities helps a lot with event, here's some examples of events that I have setup and their priorities.
Event name: Work (activated by time: Mon to Fri, 8am to 6pm) / Priority: P6
Event name: Car (activated by Bluetooth connection to my car) / Priority: P8
Event name: Bedtime (activated by time and if phone is charging: 7 days, 11pm to 7am and phone must be also be charging to launch event / Priority: P7
So here is where setting Priorities is important:
Let's say it's 11:30pm and I'm home and put my phone on the charger, my Bedtime event will activate which switches my Profile to the DND that I set up.
But if it's 11:30pm and I go into my car and connect my phone to Android Auto (USB cable) or to the car charger, my Car event will launch and not my Bedtime event.
My Car event is set to P8 and Bedtime is set to P7, so the Car event takes priority over the Bedtime event.
I've been using Phone Profiles Plus for a few years now and have about 10 events setup.
If you have questions, I'll be glad to try and help, I learned how to use it by trial and error.
Click to expand...
Click to collapse
Thanks for your help. What I have done seems to have things working now though there can be a delay of about 20 minutes at times before a profile is switched, have you found that to be the case too?
What switch do you use for your 'order events by...'? Does this matter?
I did delete the car profile as it wasn't activating at all now but I'm going to create it again and try it now other things seem to be working.
Thanks
Westindieman said:
Thanks for your help. What I have done seems to have things working now though there can be a delay of about 20 minutes at times before a profile is switched, have you found that to be the case too?
What switch do you use for your 'order events by...'? Does this matter?
I did delete the car profile as it wasn't activating at all now but I'm going to create it again and try it now other things seem to be working.
Thanks
Click to expand...
Click to collapse
I've never had a 20 minute delay or any delays with my events activating. What do you mean by: What switch do you use for your 'order events by...'? Does this matter?
I am using redmi note 7 now, I used the app b4 on redmi Note 4 and it was perfect, when I changed to note 7, I took the saved profiles with me and granted every possible permission to it, however when I change profiles and there is a brightness change within the new assigned profile, the screen dims to the lowest brightness after few seconds of activating the profile... Everything else works perfect.. Only the brightness issue.. Any help?
Hi,
I started using Phone Profiles Plus as a replacement of Llama. Unfortunately it doesn't detect connected cell unless I press RE-SCAN button. Is it related to specific phone model (I have Xiaomi Mi Max 3)?
VIP or Starred contacts
I've been using this app for quite a while now and I have a good setup that's been working great. However there is one thing I can't for the life of me figure out. I have certain numbers (VIP or starred contacts) to allow to sound even when it's on silent (zero volume).
Any ideas on how to make that work?
Thanks!
Edit : So finally figured this app out and dang, I must say it's pretty darn good! This and Audio Profiles (found on the Play Store - not free) are the only two Profile Apps that I have found that work w/ A11 that lets you control the screen brightness & sound levels. But this app here, PhoneProfilesPlus, let's you control much much much more than that and is more configurable than Audio Profiles but is more confusing to set up, however. But once you do figure it out it's totally worth it as it does work better than AudioProfiles (for me at least).
The only feature that I wish I could find or make happen is that when I manually switch profiles that I can choose a beep to sound when I do the switching. I see that I can make it beep when it changes Events, but how can I make it beep when I manually switch profiles? (I left a suggestion on Github).
Gotta say it's pretty crazy that more profile apps such as these don't exist.. PhoneWeaver was the bomb way back in the day
Btw, you gotta find it here now : https://apt.izzysoft.de/fdroid/index/apk/sk.henrichg.phoneprofilesplus

WiFi Drop Out Problems

Hi All I have the Mate 20 Pro and absolutely loving it apart from the below problem.
WiFi keeps dropping out. It's definitely nothing to do with the wireless router as all other devices working perfectly and my previous SAMSUNG S7 never had any issues they only started when I got this new phone.
Unfortunately its causing serious issues for me as I can't get data connection downstairs and rely on WiFi.
I've read others have problems and apparently Hawai cut corners with the WiFi and put a poor quality device inside?
Is there anything that can be done or is this definitely a hardware problem and something I just have to live with I. E. Not being able to use it on WiFi?
It shows full bars on the WiFi status symbol top left but will connect one minute and the next minute can't even load a new page, Facebook comments, or will just pause and start spinning on a video.
Bump!! Same problems! My Galaxy S7 and S8 always worked flawless with notifications and internet connection switching between wifi and 4G. Mate 20 pro drops out. Now also remembering my old Ascend Mate 7 did the same. Huawei problem, but is there a solution?
I have tried various settings in the wireless and developer settings no luck. I cant seem to find the usual android settings to keep wifi on always...
Did you guys check under Settings/Battery/More battery Settings if "Stay connected when device sleeps" is ON?
Pretty stupid to hide it there (Samsung had it in the right place under WiFi settings) but whatever.
My Wifi NEVER disconnects at home or work and I DO get emails even if the app is set to pull every 30 min (so it wakes up properly and pulls data). Plus unlike my old S7Edge, WiFi reported power drain is always below 1%...so negligible.
I've noticed Youtube keeps losing connection when using Chromecast
Ipse_Tase said:
Did you guys check under Settings/Battery/More battery Settings if "Stay connected when device sleeps" is ON?
Pretty stupid to hide it there (Samsung had it in the right place under WiFi settings) but whatever.
Click to expand...
Click to collapse
That setting is on yes. Thanks for your reply

Categories

Resources