Issues with various smartphones/BLE HR monitors

Started by m0rci, July 30, 2021, 11:13:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

m0rci

I've been using OruxMaps for years.
I usually strap an old smartphone to my mountain bike with OM on it to act as a glorified cycle computer.
The issue I have now is that I'm moving from an Honor 7 (dead battery) to a Xiaomi A2 Lite and I cannot get any of my BLE HR monitors (I have two of them) to work with OM.
I have a few phones that I tested the monitors and OM with.

The phones are:
-Honor 7
-Xiaomi A2 Lite
-LG G7

The HR straps are (from their BT metadata):
-Cardiosport HRM (Manufacturer: Cardiosport, Model number: ZT26B);
-HRM_Sensor (Manufacturer: MYCJ).

The only combination that is stable is Cardiosport HRM and Honor G7. With all other combinations I have continuous disconnections (with the usual "retying in 30 secs" orange toasts).
The same combinations that do not work with OM, work with other HR monitoring applications.

It seems like OM is giving up the connection fairly too easy.

I'm willing to send whichever dump, log or anything that can help fixing this problem. The only other solution I have is to order all the available HR straps from Amazon and send them back until I find one that OM is happy with, but the current one out of six hit ratio is discouraging...

orux

The BT connection is managed by Android, not by the app.
The app sends the error with connection if receives that message from Android.
Not sure where is the problem, maybe a problem with power management.
Check here: https://dontkillmyapp.com/



orux

m0rci

#2
I found way to get all the HRMs to work with all phones, all the times.
Start OM then start the HRM.
In a few seconds you get the notification about the bluetooth disconnection, as usual.
Now the trick.
Keep OM running in the background and start another app that reads from the HRM (I'm using this one https://play.google.com/store/apps/details?id=com.bmi.hr_monitor but others work too) and connect to the HRM, wait until the heart rate is shown in the app.
Now switch back to OM and, voilĂ , now the HRM in OM works just fine.
Now you can keep the other app running in background or terminate it, it does not matter, from now on OM will work fine (until you stop & restart the HRM in OM).

To me, it looks like the other app simply "keeps the connection open" while OM would give up if no data is returned fast enough at the beginning of the connection phase. Maybe when you ask Android to manage the connection you can also specify an initial timeout or something similar. If you don't mind I'd suggest giving a look at the code used in OpenTraks, it's open source and just works.