Wi-Fi, geolocation, sleep mode.

125 views
Skip to first unread message

Ivan Petrov

unread,
Aug 16, 2023, 9:11:41 AM8/16/23
to Automate
Hello. Sometimes when scanning wifi and geolocation, I do not receive data. This mainly happens after a long stay of the phone at rest, in the morning. The automate is allowed to work in the background, activity control - no restrictions. I use the keep awake block, studied FAQ and dontkillmyapp.com, rebooted the phones, but I can not get stable work. If I just put in the cycle to scan Wi-Fi every 15 minutes - it works. Xiaomi with android 6 and 11. How to fix it?
https://llamalab.com/automate/community/flows/45970
08-16 00:58:41.843 I 62452@2: Flow beginning
08-16 00:58:41.857 I 62452@38: SMS received
08-16 08:18:07.580 I 62452@39: Expression true?
08-16 08:18:07.583 I 62452@178: Fork
08-16 08:18:07.607 I 62452@177: Delay
08-16 08:18:07.624 I 62453@170: Device keep awake
08-16 08:18:07.637 I 62453@135: Wi-Fi set state
08-16 08:18:07.649 I 62453@121: Wi-Fi network scan
08-16 08:18:08.169 I 62453@180: Fiber stop
08-16 08:18:08.170 I 62452@177: Stopped by block
08-16 08:18:08.186 U 62453@185: NoWiFi
08-16 08:18:08.187 I 62453@182: Fork
08-16 08:18:08.210 I 62453@181: Delay
08-16 08:18:08.220 I 62454@186: Device keep awake
08-16 08:18:08.225 I 62454@175: Location provider enabled?
08-16 08:18:08.226 I 62454@172: Location get
08-16 08:18:08.228 D 62454@172: LocationGet Using location manager: provider=HIGH_ACCURACY, knownLocation=Location[gps **,******,**,****** acc=10 et=+2d17h23m24s397ms alt=188.0 vel=0.24 bear=309.1 {Bundle[mParcelledData.dataSize=40]}], maxFixAge=0
08-16 08:23:10.209 I 62453@183: Fiber stop
08-16 08:23:10.209 I 62454@172: Stopped by block
08-16 08:23:10.228 I 62453@176: Battery level?
08-16 08:23:10.232 U 62453@173: ,TIME=08:23:10 16/08/23,BATTERY=82%
08-16 08:23:10.233 I 62453@171: Flow start
08-16 08:23:10.255 I 62453@0: Stopped at end
08-16 08:23:10.278 I 62455@2: Flow beginning
08-16 08:23:10.279 I 62455@38: SMS received
08-16 08:34:31.634 I 62455@39: Expression true?
08-16 08:34:31.635 I 62455@178: Fork
08-16 08:34:31.658 I 62455@177: Delay
08-16 08:34:31.668 I 62456@170: Device keep awake
08-16 08:34:31.674 I 62456@135: Wi-Fi set state
08-16 08:34:31.676 I 62456@121: Wi-Fi network scan
08-16 08:39:32.910 I 62455@179: Fiber stop
08-16 08:39:32.910 I 62456@121: Stopped by block
08-16 08:39:32.937 I 62455@182: Fork
08-16 08:39:32.958 I 62455@181: Delay
08-16 08:39:32.969 I 62457@186: Device keep awake
08-16 08:39:32.972 I 62457@175: Location provider enabled?
08-16 08:39:32.973 I 62457@172: Location get
08-16 08:39:32.975 D 62457@172: LocationGet Using location manager: provider=HIGH_ACCURACY, knownLocation=Location[gps **,******,**,****** acc=10 et=+2d17h23m24s397ms alt=188.0 vel=0.24 bear=309.1 {Bundle[mParcelledData.dataSize=40]}], maxFixAge=0
08-16 08:44:34.062 I 62455@183: Fiber stop
08-16 08:44:34.063 I 62457@172: Stopped by block
08-16 08:44:34.082 I 62455@176: Battery level?
08-16 08:44:34.083 U 62455@173: ,TIME=08:44:34 16/08/23,BATTERY=82%
08-16 08:44:34.084 I 62455@171: Flow start
08-16 08:44:34.091 I 62455@0: Stopped at end
08-16 08:44:34.109 I 62458@2: Flow beginning
08-16 08:44:34.110 I 62458@38: SMS received

Ivan Petrov

unread,
Aug 18, 2023, 7:57:15 AM8/18/23
to Automate
Can I somehow force the phone to go into power saving mode so as not to wait so long when testing the application? Or how to understand how long such a regime occurs?
Another question: can you somehow look at the scan log in the system, understand why there is no data?
It is important for me to understand what is happening and fix it. The link above is a test piece of my application. The whole application is much larger and more confusing at first glance and has been refined by me for several years. I've been working on it too long to just give it up. Help is needed.
среда, 16 августа 2023 г. в 16:11:41 UTC+3, Ivan Petrov:

Henrik "The Developer" Lindqvist

unread,
Aug 18, 2023, 3:38:52 PM8/18/23
to Automate
Maybe because you go inside, then Location get uaing GPS/High accuracy may not longer receive any updates since the device cant see any GPS satellites.

Иван Петров

unread,
Aug 18, 2023, 3:53:30 PM8/18/23
to Automate
This phones has A-GPS, in this place it receives GNSS well, sees a lot of satellites, I look through the "GPS Test" application. Wifi at the time of scanning is also available. Wi-Fi scan sometimes does not work in a multi-storey building - and there about 20 access points are visible in a laptop.
пятница, 18 августа 2023 г. в 22:38:52 UTC+3, Henrik "The Developer" Lindqvist:
Message has been deleted

Ivan Petrov

unread,
Aug 20, 2023, 3:15:37 AM8/20/23
to Automate for Android
I noticed that when using the backlight, the scan is successful. But I still have 2 questions: 1) Does the "High performance" setting of Wi-Fi, keep awake block affect the quality of the scan? For example, if the access point is at the edge of the detection zone, is the phone more likely to detect it with the "high performance" setting than with the "scan only" setting?
2) Is it possible to somehow programmatically force the phone to sleep so as not to wait every morning for the test?

пятница, 18 августа 2023 г. в 22:38:52 UTC+3, Henrik "The Developer" Lindqvist:
Maybe because you go inside, then Location get uaing GPS/High accuracy may not longer receive any updates since the device cant see any GPS satellites.
Reply all
Reply to author
Forward
0 new messages