Bluetooth Link Supervision Timeout Issue

Post your questions and help other users.

Moderator: Martin

vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Re: Bluetooth Link Supervision Timeout Issue

Post by vertigo » 04 Oct 2019 18:51

Thanks. I wondered about the activity recognition function, but wasn't sure about battery drain or accuracy (and yeah, very creepy, one of the many reasons I don't like Google). I think I tried it out before but don't remember what my findings were, though clearly for some reason I ended up not using it. I guess I'll have to give it another go. Actually, now that I think about it, I'm pretty sure I decided to use the BT device disconnected instead because that would happen when shutting the car off, whereas using activity would trigger every time I stop at a light/sign/etc. That would not only cause many, many more triggers, but adding a delay to see if I start moving again would make it take too long. Still, it could be useful for the connection process, but I'd have to set it to trigger when I start driving, adding a delay. This really would be all much easier if there could be a trigger for BT device available or, perhaps better/more battery-friendly, a BT availability change event (so instead of having to constantly check if a specific device is available, it could be notified when there's a change in available devices then scan to see if a specific one is there).

As for requesting the bluetooth available condition (and trigger, if possible), what's the best way to do that? I tried mentioning @Martin but that doesn't seem to work here, and I doubt he follows every thread.

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

Re: Bluetooth Link Supervision Timeout Issue

Post by Desmanto » 04 Oct 2019 19:09

The detection is baked into the play services, so to disable it would means to abandon the whole Google core services. The battery drain is almost unnoticeable. The detection use a very low power sensor which is always on. Most current phone already have the DSP to work independently from the CPU. DSP use way lower power than CPU and usually used to process these kind of sensor value.

You can try to log the user activity trigger for a day, let's say periodically every minute. You can see what is your activity during that day and see if it is very close.

The car stop, will only trigger the flow to check the bluetooth. So if it is still connected, then no need to trigger your main flow. Once you stop completely, your car bluetooth is off, then it will return false and you can continue to your main flow.

To request new feature, just post at the feature request subforum, mention how do you want the trigger and what is the main purpose. You can link this thread too as the example.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Re: Bluetooth Link Supervision Timeout Issue

Post by vertigo » 04 Oct 2019 19:38

Thanks, I'll be sure to post there, along with some other things I've come across the past day while playing around.

As for the car stopping, the problem is there's usually a few seconds or more between coming to a stop and shutting the car off, so it would have to keep checking every few seconds until either the disconnect occurs or the car starts moving again. Just seems like an awful lot of checking, but if I find the current 5 second delay is too much, I might give it a try to see if it can shave that down. While I sometimes am in a hurry and get out of the car quite quickly after shutting it off, I think 5 seconds would be short enough to prevent me from being so fast as to still manage to forget it. I guess time will tell...

Post Reply