Mi band 3 accelerometer sensor ม ก ต ว

I found script, written in python, that allows computer with linux to connect to band. But its missing functionality that im looking for. I also managed to get HCI log from my phone.

It contains packegs send, while using Mi Fit app's function, that alllows to create live graph with accelerometer data. I used it twice, to check which packeges dubbles.

Due to my lack of knowlage on that field im stuck in that point.

Im aware thats not ideal place to ask, but I hope you can help me.

Link to .zip with app, log, and Wireshark filter.

drive.google.com/open

Library to work with Xiaomi MiBand HRX Edition Accelerometer Data. Intended for extraction of accelerometer data only, for experimentaions with ROS and gesture recognition. Check out the ROS interfacing example here.

I couldn't find a solution that worked with MiBand HRX edition. This repo is forked from creotiv/MiBand2 and modified to work with HRX bands.

The following commands were helpful in identification of services and characteristics specific to HRX bands. Xiaomi doesn't provide user descriptions for the services and characteristics, which makes it harder. There are plenty of reverse engineered solutions for MiBand2 & 3 which were extremely .

List services

gatttool -b <MAC-ADDRESS> -t random --primary

List characteristics

gatttool -b <MAC-ADDRESS> -t random --characteristics

BLE

  • Authentication is same as MiBand2
  • Services & Characteristics of interest
    • SERVICE_MIBAND1 : "0000fee1-0000-1000-8000-00805f9b34fb"
      • CHARACTERISTIC_SENSOR_CONTROL : "00000001-0000-3512-2118-0009af100700"
      • CHARACTERISTIC_SENSOR_MEASURE : "00000002-0000-3512-2118-0009af100700"
  • To receive accelerometer notification
    • Write without response 0x010119 to service gatttool -b <MAC-ADDRESS> -t random --characteristics 0 characeteristic gatttool -b <MAC-ADDRESS> -t random --characteristics 1
    • Write without response gatttool -b <MAC-ADDRESS> -t random --characteristics 2 to service gatttool -b <MAC-ADDRESS> -t random --characteristics 0 characeteristic gatttool -b <MAC-ADDRESS> -t random --characteristics 1
    • Write gatttool -b <MAC-ADDRESS> -t random --characteristics 5 to notification descriptor to enable notification

Processing Accelerometer Data

Parsing

Data received in packets of byte size

gatttool -b <MAC-ADDRESS> -t random --characteristics

6,

gatttool -b <MAC-ADDRESS> -t random --characteristics

7 or

gatttool -b <MAC-ADDRESS> -t random --characteristics

8.

Sample:

gatttool -b <MAC-ADDRESS> -t random --characteristics

9

0100 0500 8200 0b00 0400 8000 0b00 0300 8100 0b00 - signed x signed y signed z signed x signed y signed z signed x signed y signed z

Calculating Roll and Pitch

In the absence of linear acceleration, the accelerometer output is a measurement of the rotated gravitational field vector and can be used to determine the accelerometer pitch and roll orientation angles.

The Xiaomi Mi Band 3 is a wearable activity tracker produced by Xiaomi Inc. It was released on 31 May 2018. It has a capacitive OLED display. The tracker features heart rate monitoring, although it does not offer continuous heart rate display.