Mi Band Heartrate (with VRC implementation via OSC - Proof of Concept)
Enable and monitor heartrate with Mi Band device on Windows 10.
Supported devices
- Mi Band 2
- Mi Band 3
- Mi Band 4
- Mi Band 5 (Tested)
Requirements
- .NET Framework 4.8 (download)
- Windows 10 1703+ (Creators Update)
- Bluetooth adapter supporting Bluetooth 4.0/4.2 BLE
Usage
- Download and unzip the latest build from release section
For Mi Band 2 or Mi Band 3
-
Un-pair your Mi Band 2/3 from any devices
-
Connect and pair your Mi Band 2/3 to your computer via Windows Settings>Bluetooth
-
Launch
MiBand-Heartrate.exe
-
Click on
Connect
button and select your device from device list and set model onMi Band 2
orMi Band 3
then click onConnect
-
Once your device is successfully connected and authenticated, click on
Start
button
For Mi Band 4/5
-
Get your authentication key of your device, visit (freemyband.com) for more information
-
Connect and pair you Mi Band 4 to your computer
-
Launch
MiBand-Heartrate.exe
-
Click on
Connect
button and select your device from device list and set model onMi Band 4
then click onConnect
-
A new window should appear, enter your authentication key then click on
Ok
-
Once your device is successfully connected and authenticated, click on
Start
button
Options
-
Export data in CSV file : Log your heartrate data into a CSV file with date, time and heartrate value
-
Write realtime date in text file : Continuously write heartrate value inside a text file
-
Continuous mode : Mi Band heartrate sensor can work in two different mode, one-shot and continuous. One-shot mode take 5 to 10 sec. to retrieve a heartrate value then stop. Continuous mode update heartrate value every 2 to 5 sec.
Build requirements
- Windows SDK
- Visual Studio 2019
Build
-
Clone git repository
-
Open
MiBand-Heartrate.sln
with Visual Studio -
Right-click on MiBand-Heartrate-2 solution and select generate
Useful links
- https://github.com/Eryux/miband-heartrate (Base implementation)
- https://github.com/creotiv/MiBand2
- Microsoft GATT Documentation
- Mi Band 2 Authentication by leojrfs, python
- How I hacked my Xiaomi MiBand 2 fitness tracker — a step-by-step Linux guide by Andrey Nikishaev
License
MIT License