NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.41k stars 1.15k forks source link

Cannot enter MiBand auth code with MAC #1581

Closed PhilTU closed 3 years ago

PhilTU commented 3 years ago

Date entry field for Auth code absent unless Xdrip has successfully scanned for a MiFit band.

PhilTU commented 3 years ago

Using Xiaomi Miband on 23/12 nightly build on Android 9 on a Sony Xperia G8441 XZ1 compact my Miband was not detected by scanning so I manually entered MAC from MiFit app. This allowed connection but no field was available to enter required Auth code therefore I could not progress.

Once a Miband has been identified by a scan the Auth code entry field is available and remains so.

To reproduce install Xdrip enter MAC of MiFit device and connection will proceed to authentication failure. Screenshot_20201229-114614.

PhilTU commented 3 years ago

Screenshot_20201229-114707

bigdigital commented 3 years ago

At the moment, the official xdrip version supports only Miband4. For Miband5 you should use xdrip from my blog https://bigdigital.home.blog/2020/08/25/new-xdrip-now-supports-miband-5/#xdrip_miband

PhilTU commented 3 years ago

I understand now and have implemented this. I had to compromise between xDrip functionality and latest version of band.

If the manual entry MAC field is available then I maintain the Auth code entry field is also required for full functionality, it does appear but only if a scan is successful, which makes the MAC entry ineffective. After a scan succeeds the Auth box is available and persists to be available.

bigdigital commented 3 years ago

By default Auth code field is hidden. This field will appears if was detected a known device which requires auth code. For example, miband 2 and 3 do not require auth code to pair the device. So if you scan the miband4 , the auth code will appear, but if you rescan again and will use miband 2 or 3, this filed disappears again.

tolot27 commented 3 years ago

@bigdigital Do you plan to contribute your Miband 5 support to xDrip?

@PhilTU It looks like your problem is solved with the bigdigital's version. If yes, please close this issue.

PhilTU commented 3 years ago

I have a workaround which was to buy another fitness band compatible with the version of xDrip+ I needed to work with OOP2 and the FSL Libre2. Hopefully bigdigital's MiBand 5 compatibility will be merged soon.

I am of the opinion that the Auth code box should be accessible for cases where the MAC has to be used because scan fails, or where the Auth code is obtained from servers directly rather than using the "freemyband" modified MiFit apk which bigdigital has integrated in a very elegant way but it does put all the eggs in one basket.

Navid200 commented 3 years ago

@PhilTU Please look at the title of this issue. That issue has been resolved, right? Would you please close the issue?

tolot27 commented 3 years ago

@PhilTU If I understand @bigdigital correctly, this issue should be solved with the latest version from https://bigdigital.home.blog/2020/08/25/new-xdrip-now-supports-miband-5. Hence, I close this issue.