Repository navigation
feat(bluetooth): support the Urikar Aero I in TaylorBIAHandler - #1567
Open
kashif-khan wants to merge 1 commit into
Open
kashif-khan wants to merge 1 commit into
kashif-khan wants to merge 1 commit into
Conversation
The Aero I / Aero I Pro (sold with the Fitdays app, advertises as "Aero I" on 0xFFB0) speaks the same `AC 27` protocol as the ALPHA Smart Scale PRO 3, so it joins TaylorBIAHandler as a third model instead of getting a handler of its own. MGBHandler used to claim it by service alone and could not parse its frames, so it connected and never produced a measurement. Aero I behaviour: * The result packet (0xD6) carries the impedance but no weight, so the weight comes from the locked 0xD5 packet and waits for the result (8 s limit, then it is published alone). Body composition is derived with StandardImpedanceLib, as for the ALPHA. * Results and stored records are acknowledged and stored records are imported, as for the ALPHA. The scale is only awake for a few seconds after it wakes, so a weigh-in made before the phone has connected is stored on the scale and arrives on the next connection. * The link is left open: the scale switches itself off. After a weigh-in it sends nothing instead of reporting an empty platform, so the next weigh-in is recognised by its first unlocked reading. * The 0xD0 profile frame carries the real time zone, the display unit and the profile weight. The 0xD0 body is documented field by field in the class comment. buildProfile() takes the time zone, unit, user index, weights and flags as parameters whose defaults reproduce the ALPHA capture byte for byte, so the ALPHA and Taylor paths are unchanged. The unit codes (kg 0, lb 1, st 2) and the field layout come from the vendor SDK; the three profile frames in the tests are the ones written to a real Aero I Pro whose display switched kg -> lb -> st -> kg with them.
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.
Scale
Urikar Aero I Pro, sold with the Fitdays app (the label reads "Urikar APP"; Smart Scale, model Aero I Pro, FCC ID 2AS9D-AEROIPRO, 6-180 kg, d = 0.1 kg / 0.2 lb). It advertises as
Aero Iwith service0xFFB0, soMGBHandlerclaimed it by service alone.MGBHandlercannot parse the scale's 20-byteAC 27frames, so the scale connected and never produced a measurement.It speaks the same
AC 27protocol as the ALPHA Smart Scale PRO 3 (#1534), whichTaylorBIAHandleralready drives: the same0xD5live weight,0xD6result,0xD8stored record and0xD0/0xDFphone frames. So it joinsTaylorBIAHandleras a third model instead of getting a handler of its own.TaylorBIAHandleris already ahead ofMGBHandlerinScaleFactory.What works
Tested on a Samsung Galaxy S24 Ultra (SM-S928W, Android 16) with
openScalebuilt from this branch (plus #1566 for the reconnect, see below):StandardImpedanceLibderives fat, water, muscle, bone, LBM and BMR from them as it does for the ALPHA. The scale reported 0 Ω in some weigh-ins (presumably when the feet did not touch the electrodes) and 514-559 Ω in others; with 0 Ω only the weight is recorded.0xD0frame carries the unit (kg 0, lb 1, st 2), so the scale's display follows the weight unit set in openScale. With an earlier standalone version of this handler, writing exactly the frames inTaylorBIAHandlerTest, the display switched kg → lb → st → kg. The reworked handler writes identical bytes (asserted by the tests) and was run on the scale with kg.DF 04 D6). The scale repeats the result three times within about 0.3 s whether or not it is acknowledged; the handler publishes the first and ignores the rest.Differences from the ALPHA
0xD5packet that precedes it, held until the result arrives (8 s limit, then it is published alone).DF 01session-start frame is sent (its purpose is unknown, and the scale does not need it).The
0xD0framebuildProfile()now takes the time zone, unit, user index, weights and flags as parameters. Their defaults reproduce the ALPHA capture byte for byte, so the ALPHA and Taylor paths are unchanged (the default profile frame still reproduces the ALPHA capture). The fields are documented in the class comment; they come from the vendor SDK'sencodeTimeAndUserInfo, and the ALPHA's captured frame has the same layout (its08is a time zone of +2 h, its00 00weights and03flags):The profile weight is
ScaleUser.initialWeight, which openScale already converts to kg.lastMeasurementFor()is not unit-aware (it returns the stored number as if it were kg), so it is not used.Changes
TaylorBIAHandler: newAERO_Imodel (matched by theAero Iname together with0xFFB0);buildProfile()parameters;unitCode()andhundredths(); the Aero I's result/stored-record/re-arm handling; class commentScaleCatalogfixture and ascale_catalog_remarks.txtlineTaylorBIAHandlerTest: the frames above, taken from the device log, the three profile frames that switched the display, and the Aero I flows through the existing harness (including the weight-only fallback with aTestScope)./gradlew :app:testDebugUnitTestpasses (947 tests).Not verified
StandardImpedanceLibformulas, so the numbers differ from the Fitdays app's.