[RFC] Mi Band 2: Add rudimentary raw sensor data support#894
[RFC] Mi Band 2: Add rudimentary raw sensor data support#894atx wants to merge 1 commit intoFreeyourgadget:masterfrom
Conversation
Note that this is extremely hacky (and does not really work all that great) and some more investigation into the mechanism/flags is needed.
|
@atx any news about this feature? you mention that "the bytes look easy t convert", do you have more details about it? update: Got the answer by myself, I guess you're referencing the |
Rebase of Freeyourgadget#894 from @atx
This comment has been minimized.
This comment has been minimized.
|
I’ve parsed data using mentioned method from Mi Band 1 and have tested measurements of Z axis for band laying on a table. As far for positive measurements, values as expected differ by +/- 10% from value of G. But strange thing happens for negative measurements, because error rate increases to 20-30%. As I observed this happen to negative values for every axis. Scale factor used: 250 Has anyone met this issue? |
I have been playing with a third party application whose name seems better not to mention. After replaying some of the writes it does when cooperating with Sleep as Android I got something which looks very much like raw sensor data.
A logcat dump is available on https://p.atx.name/uhuhozuvoy . The bytes look easy to convert at first glance (maybe even the same as the Mi Band 1?), but I have ran out of time for today.
This is not really useful at the moment, but eventually it would be nice to add integration with Sleep as Android (or an OSS alternative, if there is any) (thus bypassing the need for having Mi Fit + the aforementioned third party app installed).
I am mostly putting this PR here as a request for comments/patches, so if anyone has more empty timeslots than me...