Deleting the wiki page 'Huami Server Pairing' cannot be undone. Continue?
New devices and older devices with updated firmware require server based pairing. This means, that you absolutely must use the original MiFit/Amazfit/Zepp app to make the initial pairing, retrieve the pairing key and then use this key to pair with Gadgetbridge. Currently, Mi Band 5, Mi Band 4, Amazfit Bip Lite and Amazfit GTR are known to be the first devices with this enabled from the beginning.
To set up your band/watch with Gadgetbridge you need Gadgetbridge > 0.35.0 and a unique key for your band. There are several ways to obtain the key.
On rooted phone you may grab the key from MiFit/Amazfit database which means that you must:
Then, execute the following command in a root shell terminal:
sqlite3 /data/data/com.xiaomi.hm.health/databases/origin_db_[YOURDBNAMEHERE] "select AUTHKEY from DEVICE"
sqlite3 /data/data/com.huami.watch.hmwatchmanager/databases/origin_db_[YOURDBNAMEHERE] "select AUTHKEY from DEVICE"
NOTICE: Every time you hard reset the band/watch, the Bluetooth MAC Address will be changed and you must grab a new key! Also, anytime you unpair your band/watch from MiFit/Amazfit/Zepp the pairing key will be invalidated and you must make new pairing in MiFit/Amazfit/Zepp app.
https://github.com/argrento/huami-token
Please see the README for a detailed desctiption on the procedure
https://codeberg.org/vanous/huafetcher Please see the README for a detailed desctiption on the procedure
This allows you to run the huami-token script right on your phone, so that you can easily copy and paste the key.
On a non rooted phone you may consider using https://www.freemyband.com/ NOTE that the procedure described there is not encouraged or supported by the Gadgetbridge developers and the devs have no information on that app and whether it is safe to use
You are allowing "location services", which include GPS, because on Android, Bluetooth discovery is considered to be able to reveal a location. You can disable "location services" access for Gadgetbridge after pairing your device.
If you already connected your band/watch with your phone, remove it from Android Bluetooth settings. The procedure depends on which ROM is installed on your smartphone. Here is an example for LineageOS 16 (Android 9):
You are allowing "location services", which include GPS, because on Android, Bluetooth discovery is considered to be able to reveal a location. You can disable "location services" access for Gadgetbridge after pairing your device.
IMPORTANT: Enter your key prefixed with 0x ( eg. if your key is fedcba01234567890fedcba012345678
enter 0xfedcba01234567890fedcba012345678
). Do not press the Enter key. Make sure 0x is really 0x , some keyboards might use different symbols.
Congratulations, you did it!
If you encounter problems with Bluetooth discovery or pairing process, try the following steps:
General
Sports/Activities
Device Related
Development
Feature Discussion
FAQ
Deleting the wiki page 'Huami Server Pairing' cannot be undone. Continue?