3

I have viewed many unofficial MiBand SDKs in Github. (e.g. https://github.com/Freeyourgadget/Gadgetbridge) None includes detect when button touching, but I have viewed apps to detect this feature. For example Mi Band 2 Func Button.

Also I have tried sniffing bluetooth data traces, but just show data because mobile device is not rooted and I haven't rooted. Is there any way I can detect the touch of a miband button? Thanks a lot!

pablogupi
  • 774
  • 11
  • 27
  • did you try checking for key type input events? see https://developer.android.com/guide/topics/ui/ui-events.html – petey Feb 15 '17 at 17:15

1 Answers1

0

You can listen if there is any touches event on the Mi Band device.

Assuming that the app authenticated...

Start notification to UUID_CHARACTERISTIC_DEVICEEVENT characteristic (In my case it's "00000010-0000-3512-2118-0009af100700")

and you shall receive '\x04' if the device touched.

Amalina Aziz
  • 204
  • 2
  • 18
  • Hi Amalina, What do I need to write on this characteristic in order to enable the notifications? I tried to write '\x01\x00' but I didn't get any notification. And do you know if it works with miband 3 and 4 too? – Pedro Leite Jun 05 '20 at 14:32