Repository navigation
Feat/terraillon smart connect web coach 14754 - #1568
Open
sebelectron wants to merge 8 commits into
Open
sebelectron wants to merge 8 commits into
sebelectron wants to merge 8 commits into
Conversation
Owner
|
Please add it to
Also:
|
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.
Terraillon Smart Connect (ref. 14754)
Bluetooth body-composition scale sold by Terraillon (vendor apps: Wellness Coach, now MyHealth). It is built on a Transtek A3 module: manufacturer "Transtek", model "380", firmware "A3". It advertises a 14-digit name starting with
01376and service0x7892.Protocol
Same Transtek A3 family as
WeightGurusA3Handler/BodyConnectHandler(0x8A24 weight FLOAT frames, 0x8A22 SFLOAT body-composition frames, 0x8A81/0x8A82 command channel), with these differences, all taken from BTSnoop captures of MyHealth:0x7892.a1 <random>, and the host answers20 <password xor random>. The password is the low four bytes of the scale's MAC address, reversed. A password handed out via0xA0takes precedence.02 <local time since 2010>, then22after thec0echo. The scale then uploads every stored weigh-in. No profile (0x51) is written; body composition is computed on the scale from the profile stored by the vendor app.Every decoded field (weight, impedance, BMR, fat, water, visceral fat, muscle, bone) was checked against the values MyHealth displayed for the same weigh-ins.
Files
scales/TerraillonWebCoachHandler.kt: GATT session only.libs/TerraillonLib.kt: frame parsing and the challenge reply, no Android dependencies.libs/TerraillonLibTest.kt: frames with the captured layout, but an invented reading and MAC.ScaleFactory.kt/ScaleCatalog.kt: registration and fixture../gradlew testDebugUnitTestandassembleDebugpass on CI.Real-device test
Limitations
Password derivation (example)
Example with an invented address
C0:FF:EE:12:34:56:EE 12 34 5656 34 12 EEa1 11 11 11 1120+ byte-wise XOR:56^11 34^11 12^11 EE^11=47 25 03 FF, so the frame is20 47 25 03 ffOn the real unit, the reply MyHealth sent matched this rule on all four bytes, so a coincidence is ruled out. What I could not determine from a single scale is whether every unit follows it, or whether the password was set to the MAC during the first pairing with the vendor app. If another owner's scale rejects the reply, the handler still accepts a password sent via
0xA0in pairing mode. That path is untested, though.Captures are available on request (MAC and personal data scrubbed).
Feel free to squash on merge.