dotintent / inFullBand

Simple iOS app interacting with Mi Band 2
MIT License
45 stars 16 forks source link

Retrieve data of steps, calories and distance #2

Closed dhruv270 closed 5 years ago

dhruv270 commented 6 years ago

Hi @mikchmie

Thanks for the amazing reference code with sample project.

With your sample project, I am trying to connect the Mi Band HRX. We do get connected with that band, but after connection, we are unable to fetch data of steps, calories and distance as shown in your sample screen-shots. I am getting only battery and time related information for that band. I request you to shade some lights for the issue.

Thanks in advance for your kind support.

mikchmie commented 6 years ago

Hi @dhruv270 ! I'm glad that my project has proven useful to you.

I was able to reproduce the issue using my ordinary Mi Band 2. The value of characteristic responsible for activity data was reported as null. However the problem quickly fixed itself. I opened Mi Fit app and then went back to inFullBand, walked across the room and activity notifications started appearing.

You can try the above and if that doesn't help, check if app's logs in Xcode contain entries with UUID of activity characteristic (00000007-0000-3512-2118-0009AF100700). If they don't, then it means, that Xiaomi has changed it in HRX version. To find the new characteristic UUID you could monitor all available characteristics and check which values change when the band is registering movement.