LineageOS 15.1 wifi on while airplane mode

66 views
Skip to first unread message

Michal Baranec

unread,
Jun 2, 2018, 3:21:56 PM6/2/18
to Tasker
Hello, exist some easy way in Tasker, how to trigger wifi on while airplane mode is active?
Still getting error to trigger wifi with tasker and airplane on.

LineageOS 15.1, OnePlus 3T, latest tasker version

Thanks.

Michal

Robert Ryan

unread,
Jun 2, 2018, 4:18:43 PM6/2/18
to tas...@googlegroups.com
This should work:


Profile: Airplane Mode (26)
State: Variable Value %AIR ~ on

Enter: Anon (32)
A1: WiFi
Set: On


Michal Baranec

unread,
Jun 2, 2018, 5:06:08 PM6/2/18
to Tasker
I already tried, but not works.
Seems that wifi control is not allowed for tasker during airplane mode? in Android 8.1?
or missed something?

thx
Michal

Michal Baranec

unread,
Jun 2, 2018, 5:13:28 PM6/2/18
to Tasker
I tried just create simple condition, if Airplane mode is active, then put Wifi ON sometimes. With Oreo this trigger not works.

That mentioned A1 and Anon(32) is something special in Tasker?

thx
Michal

Robert Ryan

unread,
Jun 2, 2018, 5:29:39 PM6/2/18
to tas...@googlegroups.com

It works on my Galaxy S9 with Oreo 8.0.0. I'll go through it line by line:

    Profile: Airplane Mode (26)

This is the name I gave to the profile. The number is arbitrary and assigned by Tasker.

        State: Variable Value  %AIR ~ on

The built-in global variable %AIR contains the state of airplane mode. The profile is active when %AIR contains on.
       
    Enter: Anon (32)

Anon is the placeholder name assigned by tasker because I didn't name the enter task.

    A1: WiFi
        Set: On

When the profile activates, turn wifi on.

Michal Baranec

unread,
Jun 3, 2018, 1:34:50 AM6/3/18
to Tasker
I did almost same, and getting error for wifi set on trigger.

I am checking also variable %AIR, if ~on, set wifi on.
Due to some restriction, not works. when airplane mode is off, then wifi is triggered successfully,so I asume that airplane mode is blocking somehow action "wifi set on" on LineageOS 15.1 (android 8.1)?

Michal Baranec

unread,
Jun 3, 2018, 4:24:54 PM6/3/18
to Tasker
this is mentioned error

22.23.47/M lastWifiDisableAgoMS: 1528057427380
22.23.47/E check AP state
22.23.47/E AP state: 1
22.23.47/M lastWifiDisableAgoMS: 1528057427381
22.23.47/E current state: 1
22.23.47/E curval: 1
22.23.47/E WiFi: cur: false new: true
22.23.47/E WiFi: setWifiEnabled()
22.23.47/E WiFi: enable failed
22.23.47/M setKeepWifiOn: E/doWifiStatus1
22.23.47/E result: stop task (error)
22.23.47/E Error: 1
22.23.47/MacroEdit action finished exeID 8 action no 1 code 425 status: Err next 1

Michal Baranec

unread,
Jun 3, 2018, 4:42:01 PM6/3/18
to Tasker
my workaround solution is secure setting "run command" --> svc wifi enable/disable as root.
Reply all
Reply to author
Forward
0 new messages