Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor doesn't work with my Samsung A5 and Mi Band 3 #62

Open
flogith opened this issue Jul 8, 2019 · 16 comments
Open

Sensor doesn't work with my Samsung A5 and Mi Band 3 #62

flogith opened this issue Jul 8, 2019 · 16 comments

Comments

@flogith
Copy link

flogith commented Jul 8, 2019

Hello, I just found this nice app, but sensors doesn't work on my Samsung A5 2016.
The internal samsung step counters and my mi band 3 heart rate sensor are detected through the app, but I have no BPM or RPM:
Thanks for your support!

@cleveHEX
Copy link
Contributor

Mi Band 3 is not compatible heart rate sensor, it uses it's own proprietary protocol.

@vanous
Copy link

vanous commented Aug 23, 2019

I don't use the official MiFit app, but from what i heard, they (now) have the possibility to switch to "visible mode", as mentioned here: https://github.com/Freeyourgadget/Gadgetbridge/issues/1606

@cleveHEX
Copy link
Contributor

There should be no problem, if it uses GATT. If this was true, I would not be so confident about Xiaomi backporting it to MB 3. Currently only solution there would be using gadgetbridge's API to access the data (but I am not sure if it has one), it would serve as a decent HAL.

@vanous
Copy link

vanous commented Aug 27, 2019

Gadgetbridge added support to enable the sensor via BLE, same can be done via the MiFit. In AAT, the sensor is listed as supported, then as connected, but no data arrives.

I have now tested this in anther app and it works. I have Amazefit Bip.

I can see the sensor in BLE Explorer, although I am not sure it I should be able to see the data there.

characteristic UUID: 00002a39-0000-1000-8000-00805f9b34fb service UUID: 0000180d-0000-1000-8000-00805f9b34fb value: 0 = 0 = ��

I haven't tried master, if you made some changes...

@arsab
Copy link
Contributor

arsab commented Aug 27, 2019

While reporting GATT Service and Characteristics Unfortunatly Amazefit Bip do not support the standard reporting:
Gadgetbridge (should) have special design to deal with it, you need to clarify.
You can verify with Nordic Semiconductor "nRF connect" and "nRF Toolbox" the non standard format or other tools...
https://github.com/NordicSemiconductor

@desperadoduck
Copy link

Just FYI: I can see my heart rate in the nRF Connect for Moblie app (current version from playstore). I use a Mi band 4 and activated the sensor via GadgetBridge. So it seems to be possible to interpret the data from the device.

@desperadoduck
Copy link

Oops sorry, it was the nrf toolbox I started... Still, it seems to work.

@vanous
Copy link

vanous commented Aug 27, 2019

Cool. I actually think I can see it in BLE explorer, I will try to decode it. This is the characteristics:
characteristic UUID: 00002a37-0000-1000-8000-00805f9b34fb service UUID: 0000180d-0000-1000-8000-00805f9b34fb value: 44 = 17408 = �D

@desperadoduck
Copy link

@vanous:
👍 The NRF Toolbox seems to be opensourced (https://github.com/NordicSemiconductor/Android-nRF-Toolbox), so you can also take look at what they are doing to decode the data, if you like.

@vanous
Copy link

vanous commented Aug 27, 2019

Cool. So this confirms:

heartrate service:
static final UUID SERVICE_UUID = UUID.fromString("0000180D-0000-1000-8000-00805f9b34fb"); // Heart Rate service

the measurement characteristics:
private static final UUID MEASUREMENT_CHARACTERISTIC_UUID = UUID.fromString("00002A37-0000-1000-8000-00805f9b34fb");

@vanous
Copy link

vanous commented Aug 27, 2019

@desperadoduck it is just a hex value which is displayed in BLE Explorer so yes, i can see the HR data changing live in BLE Explorer and also in NRF Toolbox, in HRM screen and also on Template screen. Btw. you do not need Gadgetbridge running anymore, it just enables it and it can disconnect, the sensor remains available (and might be drawing more battery too).

@arsab
Copy link
Contributor

arsab commented Aug 28, 2019

That is one of challenge: in the past I tried to get HR into Runtastic or Strava.
At that time could do it by activating the sensor with "Mi Heart Rate" but needed to have it running in background continuously......
Better to:
==> Decode How the activation can happen. and maintained
==> Understand the format of reporting.
==> Then you can propose the code to collect.

Also be careful that HR on "Mi.." are not very accurate while moving.

@vanous
Copy link

vanous commented Aug 28, 2019

That is one of challenge: in the past I tried to get HR into Runtastic or Strava.
At that time could do it by activating the sensor with "Mi Heart Rate" but needed to have it running in background continuously......

I might be wrong and I do not use MiFit but rather Gadgetbridge, but i presume that they cannot disable this if you disconnect spontaneously, unless there is some delay in the band to periodically receive this packet. But in my testing (about 30 minutes activity), i had GB disconnected and HR kept arriving.

Better to:
==> Decode How the activation can happen. and maintained

This is already done, in GB. But this should not belong to AAT imho.

==> Understand the format of reporting.
==> Then you can propose the code to collect.

This is i think not as complex as it acts as standard sensor.

Also be careful that HR on "Mi.." are not very accurate while moving.

Agree, everybody must decide what to invest into...

@arsab
Copy link
Contributor

arsab commented Aug 28, 2019

Got it I assume you are referring to following change in Gadgetbridge:
Freeyourgadget/Gadgetbridge@243eec0

It might be interesting to get visibility on other hw capabilities ;-)

@vanous
Copy link

vanous commented Aug 28, 2019

Got it I assume you are referring to following change in Gadgetbridge:
Freeyourgadget/Gadgetbridge@243eec0

yes

It might be interesting to get visibility on other hw capabilities ;-)

this is depending on the watch really... the command just enables this functionality...

@anonimno1
Copy link

Hi all,

I am using AAT 1.18 on latest build of LineageOS 16 for OnePlus 3t.
I turned the heart rate sensor on my Amazfit Bip using Gadgetbridge 0.43.1 and AAT is receiving data :)!
But the date is only visible on the graph screen of Cockpit A, it is not shown on the main screen of Cockpit A. On the main screen only -- is shown, although the data is shown on the graph and logged in the gpx file.
Any idea what is happening here?

Regards
K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants