You can help this project by taking a look at the list of tasks and issues
Node.js: set DEBUG env. variable: DEBUG = MiBand
Browser: open dev. console and run localStorage.debug = 'MiBand'
, then refresh the page
- Leo Soares wrote a nice article here: Mi Band 2, Part 1: Authentication. He also provided a Python example.
- Andrey Nikishaev described some basic BLE priciples and a good way of intercepting original Mi Fit App communication on Android. Check out his Python library implementation.
- Some protocol implementation details can be found in Freeyourgadget project.
List all visible BLE devices to find out the MAC address:
sudo hcitool lescan
To list all descriptors of a device:
sudo gatttool -b YOUR_MAC -I -t random
> connect
> char-desc
Sometimes, BLE stack might fail, and the reset is needed:
sudo hciconfig hci0 reset