Wlan ein/ausschalten funktioniert nicht

Post your questions and help other users.

Moderator: Martin

Post Reply
blink3n
Posts: 4
Joined: 30 Apr 2019 07:35

Wlan ein/ausschalten funktioniert nicht

Post by blink3n » 01 May 2019 05:56

Ich habe ein Pixel3 mit Android9 mit aktuellen Updates von April. In meinem Flow möchte ich am Abend Bluetooth und Wlan ausschalten, jedoch funktioniert nur das Ein/Ausschalten von Bluetooth.

User avatar
Desmanto
Posts: 1981
Joined: 21 Jul 2017 17:50

Re: Wlan ein/ausschalten funktioniert nicht

Post by Desmanto » 01 May 2019 15:58

What is the error log when you try to turn off the wifi? Try to check Automagic permission again in the app info. Sometimes, OTA update can reset some app permission. Make sure you have allow all, including modify system setting.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

blink3n
Posts: 4
Joined: 30 Apr 2019 07:35

Re: Wlan ein/ausschalten funktioniert nicht

Post by blink3n » 02 May 2019 04:56

Here ist the log:

02.05.2019 06:44:46.116 Loading flows
02.05.2019 06:44:46.117 1.37.0 Loading data
02.05.2019 06:44:46.117 XML version = 1.37.0
02.05.2019 06:44:46.124 Trigger 'Zeit: Mo,Di,Mi,Do,Fr 06:05' register next execution at Fr., 3. Mai 2019, 06:05:00
02.05.2019 06:44:46.124 Trigger 'Zeit: So 21:00' register next execution at So., 5. Mai 2019, 21:00:00
02.05.2019 06:44:46.125 Trigger 'Zeit: jeden Tag 23:45' register next execution at Do., 2. Mai 2019, 23:45:00
02.05.2019 06:44:46.127 Flows successfully loaded
02.05.2019 06:44:46.127 Loading widgets
02.05.2019 06:44:46.128 1.37.0 Loading data
02.05.2019 06:44:46.128 XML version = 1.37.0
02.05.2019 06:44:46.128 Widgets successfully loaded
02.05.2019 06:44:46.131 Android Wear is not installed
02.05.2019 06:48:08.877 [Funk aus] Starting to execute flow 'Funk aus' with Context{global{},local{flow_name=Funk aus,trigger=Manual,triggertime=1556772488875}}
02.05.2019 06:48:08.877 [Funk aus] Start executing action 'WLAN ein-/ausschalten: Aus'
02.05.2019 06:48:08.880 [Funk aus] Action 'WLAN ein-/ausschalten: Aus' enable = false
02.05.2019 06:48:08.904 [Funk aus] End executing action 'WLAN ein-/ausschalten: Aus'
02.05.2019 06:48:08.905 [Funk aus] Flow continues executing with the next step.
02.05.2019 06:48:08.905 [Funk aus] Start executing action 'Bluetooth ein-/ausschalten: Aus'
02.05.2019 06:48:09.416 [Funk aus] End executing action 'Bluetooth ein-/ausschalten: Aus'
02.05.2019 06:48:09.451 [Funk aus] Flow ended.
02.05.2019 06:48:26.377 [Funk ein] Starting to execute flow 'Funk ein' with Context{global{},local{flow_name=Funk ein,trigger=Manual,triggertime=1556772506375}}
02.05.2019 06:48:26.378 [Funk ein] Start executing action 'Bluetooth ein-/ausschalten: Ein'
02.05.2019 06:48:29.406 [Funk ein] End executing action 'Bluetooth ein-/ausschalten: Ein'
02.05.2019 06:48:29.440 [Funk ein] Flow continues executing with the next step.
02.05.2019 06:48:29.440 [Funk ein] Start executing action 'WLAN ein-/ausschalten: Ein'
02.05.2019 06:48:29.442 [Funk ein] Action 'WLAN ein-/ausschalten: Ein' enable = true
02.05.2019 06:48:29.462 [Funk ein] End executing action 'WLAN ein-/ausschalten: Ein'
02.05.2019 06:48:29.463 [Funk ein] Flow ended.

blink3n
Posts: 4
Joined: 30 Apr 2019 07:35

Re: Wlan ein/ausschalten funktioniert nicht

Post by blink3n » 02 May 2019 07:19

Ok, now it does work ... somehow
Update: it only works, if the airplane mode is not active. If I enable it, wifi will not be turned on by Automagic. Why is this? Are there technical restrictions, when airplane mode is on? Bluetooth can be de-/actived.Btw my phone is not rooted. But when airplane mode is on I can de-/activate manually wifi.

User avatar
Desmanto
Posts: 1981
Joined: 21 Jul 2017 17:50

Re: Wlan ein/ausschalten funktioniert nicht

Post by Desmanto » 02 May 2019 10:02

Maybe new restriction, but need to find it out first. AFAIK, the radio turned off when enabling airplane mode is defined in this system setting key (Use action set system setting)
[global] airplane_mode_radios : cell,bluetooth,wifi,nfc,wimax

While after in airplane mode, the radio that can be toggle is defined in this key
[global] airplane_mode_toggleable_radios : bluetooth,wifi,nfc

Both are default value at my phone. If you have wifi in the value above, Automagic should be able to enable the wifi in airplane mode. But maybe there is new key-value that restrict this.

I am using RN5 RR 7.0.2 Pie 9.0 Android security 5 April 2019 patch. Enable airplane mode, then use Automagic Set Wifi State: On, the wifi is enabled properly. Maybe the toggle is bugged out. Try to restart the phone and try it again in airplane mode.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

blink3n
Posts: 4
Joined: 30 Apr 2019 07:35

Re: Wlan ein/ausschalten funktioniert nicht

Post by blink3n » 02 May 2019 15:08

Ok, I got exactly these values for the given global setting
[global] airplane_mode_toggleable_radios : bluetooth,wifi,nfc

I have Android 9 Build PQ2A.1900405.003, Kernel 4.9.124-g86541ee-ab5292322, Security Patch 5 April 2019.

Will try to restart the phone and try again ...

Update: did not help ...

User avatar
Desmanto
Posts: 1981
Joined: 21 Jul 2017 17:50

Re: Wlan ein/ausschalten funktioniert nicht

Post by Desmanto » 02 May 2019 17:05

Hmmm, that seems to be some restriction or bug in the latest patch. Maybe you should enable Debug log in Automagic setting and run the flow again when in airplane mode, send the log to Martin.

For now, the workaround only to turn off airplane mode, but that is ugly workaround. Other method is try to use Control UI instead, but yeah, UI distraction and only when screen on.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

User avatar
Martin
Posts: 4352
Joined: 09 Nov 2012 14:23

Re: Wlan ein/ausschalten funktioniert nicht

Post by Martin » 03 May 2019 19:11

It seems that Android 9 introduced new limitations that prevents apps from turning WiFi on when airplane mode is active. The system log of Android shows the text "setWifiEnabled in Airplane mode: only Settings can enable wifi". Automagic already contains a workaround for rooted devices. Unfortunately I did not yet find a workaround for devices without root and I doubt that one exists (except by simulating clicks).

Regards,
Martin

User avatar
Desmanto
Posts: 1981
Joined: 21 Jul 2017 17:50

Re: Wlan ein/ausschalten funktioniert nicht

Post by Desmanto » 04 May 2019 01:22

@blink3n : Oh, I forgot to mention that I have root, so maybe that's the reason it is working at mine. So it seems the workaround are your last choice, either turn off airplane mode or using Control UI to the wifi setting to toggle it.

There is [global] wifi_on in system setting, but the OS doesn't honor the changes made to this key. So we can't use that too.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

Post Reply