feat: Add support for Afu B1 - #1485
Open
icealtria wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AFU B1 body fat scale (an AFU × Boohee Health co-brand) — shows up on Bluetooth as
AFU-BH-TZ-B1. But I guess this is a scale made by ICOMON.Summary
This PR adds a dedicated
AfuB1Handlerplus its libraryAfuB1Lib.What works: weighing, history import, time sync, user profile sync, and body composition derived.
Everything was reverse-engineered from HCI snoop captures of the official app and Boohee app.
Protocol (reverse-engineered)
Every frame is exactly 20 bytes, in both directions:
Wire types:
0x51live weight,0x54stored/history record,0x52single impedance result,0x5fcontrol (sub-cmds0x12ACK,0x14chunk request / report chunk,0x16time-sync),0x61user profile and0x62sync-request (phone → scale only).The session flow that mirrors the official app:
The full annotated frame layout lives in the
AfuB1Libheader comment.Body composition
The scale itself only ever sends weight + raw impedance. The official app computes body fat in the cloud, therefore, I cannot obtain the actual algorithm.
Testing
/gradlew test.AI disclaimer
I used generative AI to help write this solution.