← Back to Pull requests

Weekly sweeps 2026-11-15 to 11-29: Slingbox, Cozmo, Echelon, Fossil, BGH, Coway, GE Cync, EcoFlow #98

Merged
holdenk merged 30 files (13510 lines) on Dec 02, 2026 10:29 UTC
View on GitHub
holdenk holdenk commented on Nov 15, 2026 17:38 UTC
Author

<!-- claude-projects-attribution: {"github_login":"holdenk"} -->
_Requested by Holden · project thread_

Before: the catalogue had no spec for Slingbox place-shifters, Anki Cozmo, Echelon Connect bikes and treadmills, Fossil Hybrid HR watches, BGH Smart Control air conditioners, Coway Airmega purifiers, GE Cync Bluetooth lights or EcoFlow power stations.

After: each of the eight has a validated spec, a docs page and a test. The test rebuilds every example frame from the spec's own rules, using invented values. The sweep log has entries for 2026-11-15, 11-22 and 11-29, recording these candidates and status notes:

  • ecobee Switch+: its smart features end on 2027-03-02.

  • Haier SmartAir2.

  • The Nest app shutdown on 2027-01-25.

  • Roku winding down sales of its smart-home hardware.
  • This PR stayed open, so each later sweep builds on it, with main merged in.

    How, 2026-11-15:

  • Slingbox (#25): UDP discovery and the TEA-framed TCP control channel. Video payload decryption is left out pending the DMCA §1201 review the backlog row asks for. That review should also note that the control channel's session key is the same key open clients use on older-family streams.

  • Cozmo (#26): the robot's own AP, UDP 5551 with selective-repeat ARQ, motion commands, RobotState and the firmware transfer. Motion and firmware commands are advanced.

  • Echelon (#21): pre-July-2025 firmware only, with one variant per advertised treadmill name. Treadmill writes are advanced and come with a warning safety_advisory.

  • Slingbox and Cozmo are added to ENTITYLESS_CONTROL_SURFACES.
  • How, 2026-11-22:

  • Fossil Hybrid HR / Gen 6 Hybrid (#9): the AES key handshake, using a key the owner exports themselves (no account API), the file-handle layer and AES-CTR encrypted files. identify_only.

  • BGH Smart Control: the cloud closed on 2025-12-31. Plain UDP 20910/20911, a climate entity, setup and reset.

  • Coway Airmega (local server): setup points the unit at an owner-run CA, enrolment endpoint and MQTT/TLS broker. The plain-HTTP CA fetch is recorded as a prose security note rather than a security_advisory, because an advisory would hide the controls.
  • How, 2026-11-29:

  • GE Cync / C by GE (#13): the BLE mesh only; the Wi-Fi cloud path stays open. Covers the Telink login and session key, per-packet AES with a CBC-MAC, the Cync opcodes and the status record. Mesh credentials are a one-time export the owner makes. identify_only, with a new telink_mesh handler name.

  • EcoFlow (#14): phone-direct BLE with an ECDH secp160r1 handshake, AES-128-CBC frames, an auth token built from the owner's account user ID, V3 protobuf and V2 status fields, and output and charge-limit commands. AC output and power-off are advanced, with a warning safety_advisory. The vendor key table is described by its shape only and is not reproduced. identify_only.
  • All eight are testing: untested.

    Gates: validate_specs.py 339/339 · validate_glyphs.py · ruff check . · pytest -q (3014 passed, 27 skipped) · mkdocs build --strict.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01FVJtKGXmz4ReFp9V2xLqE4

    Diff: 13510 lines (+13506 / -4) across 30 files Reviewer: holdenk Review duration: 24051m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.91) × (1 − Review Confidence (0.68)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.91 · 13510 lines diff across 30 files
    0.91
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.52 · 5 substantive comment(s)
    0.52
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    68%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Self Review self_review
    0.140
    Mass File Touch mass_file_touch
    0.080
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    7 items
    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on Nov 15, 2026 17:38 UTC
    Bot

    <!-- codex-pull-request-review-summary -->
    <!-- codex-review-state:v1 {"code_review":{"commit_sha":"d76d37b85ff169eb39e466fe22a5dbad96f876d4","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} -->

    <details>
    <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary>

    This comment shows the latest Codex review activity on this pull request.

    | Review | Status | Commit | Review trigger |
    | --- | --- | --- | --- |
    | 📝 Code Review | ✅ Completed <relative-time datetime="2026-11-15T17:43:25.293370Z">2026-11-15T17:43:25.293370Z</relative-time> | d76d37b | PR opened |

    <details> <summary>ℹ️ About Codex in GitHub</summary>
    <br/>

    Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review

  • Mark a draft as ready

  • Comment "@codex review" or "@codex security review".
  • Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

    </details>

    </details>

    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on code on Nov 15, 2026 17:43 UTC
    Code Review
    device-specs/devices/echelon-connect.yaml:1
    @@ -0,0 +1,705 @@
    +# Echelon Connect bikes and Stride treadmills (pre-July-2025 firmware) — Device Specification
    +# Copyright 2026 Pigs Can Fly Labs LLC
    +# SPDX-License-Identifier: Apache-2.0
    +#
    +# Sources (public, clean-room; derived facts only, no code copied):
    +#   - cagnulein/qdomyos-zwift (QZ, GPL-3.0) at commit
    +#     49be559ae85c1571a4a2323224e06e96c2867d32 (2025-06-30, before the July
    +#     2025 firmware): src/devices/echelonconnectsport/echelonconnectsport.cpp
    +#     (bike driver), src/devices/echelonstride/echelonstride.cpp (treadmill
    +#     driver), src/devices/bluetooth.cpp (name routing). Byte facts were
    +#     re-checked against the current master files; only the plain profile
    +#     present at that commit is described here.
    +#   - QZ issue #62 (Echelon Connect Sport BLE log, 2020) and the QZ
    +#     Equipment Compatibility wiki page.
    +#   - ptx2/gymnasticon pull request #76 (MIT), src/bikes/echelon.js at
    +#     82aea215b92eef0152208964ab4c4f309bbd9df5: independent bike client.
    +#
    +# Scope: only the plain BLE profile of machines on firmware older than July
    +# 2025. Nothing here concerns later firmware.
    +
    +device:
    +  name: "Echelon Connect bikes and Stride treadmills (pre-July-2025 firmware)"
    +  manufacturer: "Echelon Fitness"
    +  manufacturer_status: "active"
    +  testing:
    +    status: untested
    +    notes: >
    +      Not driven against hardware by this project. Every byte comes from two
    +      independent open clients (QZ and Gymnasticon) that agree on the bike's
    +      service, characteristics, stream-start frame and the cadence and
    +      resistance offsets. Treadmill facts come from QZ alone.
    +  protocol: "ble"
    +  transport: "ble-gatt"
    +  category: "fitness"
    +  type: "exercise-bike-and-treadmill-telemetry"
    +  notes: >
    +    Echelon is an active company still selling Connect bikes, Stride
    +    treadmills and rowers; it is listed as active for that reason. The
    +    machines have no screen of their own (bikes) or only a basic console
    +    (treadmills), and the vendor app normally drives them over BLE.
    +
    +    Scope: this spec covers only firmware released before July 2025. From
    +    July 2025, Echelon firmware makes the machine wait for a server-issued
    +    challenge before it streams metrics, and this spec does not apply to
    +    machines running such firmware. Echelon also announced on 2025-07-29
    +    that it would void the warranty of customers it finds using third-party
    +    apps with its equipment.
    +
    +    On older firmware the bikes and treadmills share one vendor service,
    +    0bf669f1-45f2-11e7-9598-0800200c9a66, with one write characteristic
    +    (0bf669f2-…) and two notify characteristics (0bf669f3-…, 0bf669f4-…).
    +    Every frame in both directions is
    +    f0 <type> <payload length> <payload…> <sum8>, where the last byte is the
    +    sum of all earlier bytes modulo 256 (see payload_formats.Echelon_Frame).
    +
    +    Bikes report cadence (0xd1 frame) and resistance level (0xd2 frame).
    +    They do not report power, speed or heart rate: open clients estimate
    +    power and speed from cadence and resistance (protocol_details.estimates)
    +    and take heart rate from a separate strap. Treadmills report belt speed
    +    (0xd3), incline (0xd2) and heart rate (0xd1, byte 11). They expect the
    +    client to write each 0xd0, 0xd2 and 0xd3 frame straight back as an
    +    acknowledgement.
    +
    +    DANGER POINT: the same bytes mean different things per family. f0 b0 01
    +    01 a2 starts a bike's stream but starts a treadmill's belt, and f0 b1 01
    +    nn sets bike resistance but treadmill incline. Identify the family
    +    before sending anything beyond the shared initialisation.
    +
    +    Echelon rowers (ECH-ROW…, ROWSPORT…, ROW-S…) and the stair climber
    +    (ECH-EC-SPT…) answer on the same service but are not covered here.
    +
    +  openness:
    +    status: "undocumented"
    +    reverse_engineered: true
    +    source_code: "https://github.com/cagnulein/qdomyos-zwift"
    +    license: "GPL-3.0"
    +    notes: >
    +      No vendor documentation exists. The profile was recovered by QZ from
    +      an HCI log of the vendor app (issue #62) and independently implemented
    +      for bikes by Gymnasticon (MIT). Facts are restated here in our own
    +      words; no code is copied.
    +
    +  identification:
    +    local_name_prefixes: ["ECH", "STRIDE"]
    +    service_uuids:
    +      - "0bf669f0-45f2-11e7-9598-0800200c9a66"
    +    notes: >
    +      Echelon machines advertise service 0bf669f0-45f2-11e7-9598-0800200c9a66
    +      (Gymnasticon scans for it; QZ lists it as a fitness-machine service)
    +      and connect on 0bf669f1-…. Require that service together with a name:
    +      the bare prefix ECH also matches unrelated machines such as Rogue's
    +      ECHO_BIKE_ units. Test the more specific names first, as QZ does:
    +      ECH-EC-SPT is the stair climber (out of scope); ECH-STRIDE, ECH-UK-,
    +      ECH-FR-, ECH-SD-SPT, STRIDE and STRIDE6S- are treadmills; ECH-ROW,
    +      ROWSPORT and ROW-S are rowers (out of scope); any other ECH name is a
    +      Connect bike. Whether the treadmills also advertise 0bf669f0 is not
    +      confirmed by either source.
    +
    +  discovery:
    +    methods:
    +      - type: "ble_scan"
    +        ble:
    +          service_uuids:
    +            - "0bf669f0-45f2-11e7-9598-0800200c9a66"
    +          local_name:
    +            match: "prefix"
    +            value: "ECH"
    +        notes: >
    +          Bikes. Exclude the treadmill, rower and stair-climber prefixes listed
    +          in device.identification before treating an ECH name as a bike.
    +      - type: "ble_scan"
    +        ble:
    +          local_name:
    +            match: "prefix"
    +            value: "STRIDE"
    +        notes: >
    +          Stride treadmills that advertise without the ECH- prefix. The
    +          ECH-STRIDE, ECH-UK-, ECH-FR- and ECH-SD-SPT names are also
    +          treadmills. Stride 4 units (names starting STRIDE4) use a longer
    +          initialisation in QZ that this spec does not document.
    +    identity:
    +      stable_keys: ["address"]
    +      display: "local_name"
    +    static_ip_required: false
    +
    +  setup:
    +    required: false
    +    confidence: "medium"
    +    notes: >
    +      No account, cloud or bond is needed on pre-July-2025 firmware. Both open
    +      clients connect, subscribe and write without pairing.
    +    methods:
    +      - type: "ble_direct"
    +        name: "Connect bike telemetry"
    +        role: "variant"
    +        verified: false
    +        description: >
    +          Subscribe to both notify characteristics, run the shared
    +          initialisation, then send start_stream_or_belt to start the bike's
    +          metric stream.
    +        ble:
    +          pairing_required: false
    +        steps:
    +          - action: "Confirm the machine is a bike: an ECH name that is not one of the treadmill, rower or stair-climber prefixes."
    +            actor: "client"
    +          - action: "Run the top-level initialization: subscribe 0bf669f3-45f2-11e7-9598-0800200c9a66 and 0bf669f4-45f2-11e7-9598-0800200c9a66, then the a1/a3 queries."
    +            actor: "client"
    +          - action: "Write start_stream_or_belt (f0 b0 01 01 a2). On a bike this starts the stream; Gymnasticon sends only this frame after subscribing and gets data."
    +            actor: "client"
    +            expect: "0xd1 frames (cadence) and 0xd2 frames (resistance, sent when it changes) arrive on 0bf669f4-45f2-11e7-9598-0800200c9a66."
    +          - action: "Optionally write poll every 2 s, as QZ does. Gymnasticon never polls, so it does not appear to be required on bikes."
    +            actor: "client"
    +      - type: "ble_direct"
    +        name: "Stride treadmill telemetry and control"
    +        role: "variant"
    +        verified: false
    +        description: >
    +          Subscribe, send the treadmill query, run the shared
    +          initialisation, poll every 2 s, and echo the 0xd0/0xd2/0xd3 frames
    +          back.
    +        ble:
    +          pairing_required: false
    +        steps:
    +          - action: "Confirm the machine is a treadmill by its name prefix. Never send start_stream_or_belt as part of connecting: on a treadmill it starts the belt."
    +            actor: "client"
    +          - action: "Write treadmill_query_a4 (f0 a4 00 94). QZ sends it before the a1 queries; the top-level initialization runs it after them, and whether the order matters is unknown."
    +            actor: "client"
    +          - action: "Run the top-level initialization (subscriptions, then the a1/a3 queries)."
    +            actor: "client"
    +          - action: "Write poll every 2 s (QZ's cadence) and write every received 0xd0, 0xd2 and 0xd3 frame straight back to 0bf669f2-45f2-11e7-9598-0800200c9a66."
    +            actor: "client"
    +          - action: "Start the belt only when the user asks and is standing safely: start_stream_or_belt, then treadmill_start_d0_00, then treadmill_start_d0_11."
    +            actor: "user"
    +    factory_reset:
    +      applicable: "unknown"
    +      confidence: low
    +      effect: >
    +        No factory reset for the BLE module or the machine is described in the
    +        sources used. A reset would not roll firmware back.
    +    rejoin:
    +      in_place_supported: true
    +      requires_factory_reset: false
    +      notes: "Nothing is bonded or stored. Reconnect, resubscribe and rerun the initialisation."
    +    credentials:
    +      wifi_passphrase_protection: not_applicable
    +      stored_on_device: []
    +      issued_to_client: []
    +      notes: "No credential is involved on pre-July-2025 firmware."
    +
    +  pairing:
    +    required: false
    +    confidence: "medium"
    +    security_mode: "none"
    +    bonding: "none"
    +    enter_pairing_mode:
    +      required: false
    +    notes: >
    +      QZ and Gymnasticon both connect to un-bonded machines and write the
    +      vendor characteristic directly. Whether the machine accepts a second
    +      central while the vendor app is connected is not stated by either
    +      source; close the vendor app first.
    +
    +  safety_advisory:
    +    severity: "warning"
    +    summary: "Treadmill speed, incline and start commands move the belt and deck under the person using it."
    +    detail: >
    +      set_speed, set_incline and start_stream_or_belt change a running
    +      treadmill without anyone touching its console. A wrong speed can throw
    +      a user off the belt. Only send them at the user's explicit request,
    +      keep the safety key clipped on, and keep the treadmill's stop control
    +      within reach. This client is experimental and unaffiliated with
    +      Echelon; Echelon's own instructions take precedence. Bike resistance
    +      changes are not covered by this warning, but a sudden large step can
    +      still surprise a rider.
    +    acknowledge_required: true
    +
    +  variants:
    +    - model: "Stride treadmill"
    +      identification:
    +        local_name_prefix: "ECH-STRIDE"

    <sub><sub>!P1 Badge</sub></sub> Encode all supported treadmill names in variant matchers

    For supported treadmills advertising STRIDE…, STRIDE6S-…, ECH-UK-…, ECH-FR-… or ECH-SD-SPT…, this matcher never selects the treadmill variant. Those names appear only in notes, but every treadmill entity—including Heart Rate, Target Speed and Stop Belt—is scoped to Stride treadmill, so a consumer applying the schema's variant matching cannot expose those entities for these machines. Encode the supported aliases in structured identification data, splitting variants if necessary and updating entity scopes accordingly. This violates AGENTS.md's requirement that “A fact in prose is a fact no consumer can read.”

    AGENTS.md reference: AGENTS.md:L166-L175

    Useful? React with 👍 / 👎.

    <!-- codex-code-review-finding:v1 -->

    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on Nov 15, 2026 17:43 UTC
    Reviewer

    <!-- codex-review-receipt:v1 -->

    💡 Codex Review

    Here are some automated review suggestions for this pull request.

    Reviewed commit: d76d37b85f

    <details> <summary>ℹ️ About Codex in GitHub</summary>
    <br/>

    Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review

  • Mark a draft as ready

  • Comment "@codex review".
  • If Codex has suggestions, it will comment; otherwise it will react with 👍.

    Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

    </details>

    holdenk holdenk commented on code on Nov 15, 2026 17:53 UTC
    Code Review
    device-specs/devices/echelon-connect.yaml:1
    @@ -0,0 +1,705 @@
    +# Echelon Connect bikes and Stride treadmills (pre-July-2025 firmware) — Device Specification
    +# Copyright 2026 Pigs Can Fly Labs LLC
    +# SPDX-License-Identifier: Apache-2.0
    +#
    +# Sources (public, clean-room; derived facts only, no code copied):
    +#   - cagnulein/qdomyos-zwift (QZ, GPL-3.0) at commit
    +#     49be559ae85c1571a4a2323224e06e96c2867d32 (2025-06-30, before the July
    +#     2025 firmware): src/devices/echelonconnectsport/echelonconnectsport.cpp
    +#     (bike driver), src/devices/echelonstride/echelonstride.cpp (treadmill
    +#     driver), src/devices/bluetooth.cpp (name routing). Byte facts were
    +#     re-checked against the current master files; only the plain profile
    +#     present at that commit is described here.
    +#   - QZ issue #62 (Echelon Connect Sport BLE log, 2020) and the QZ
    +#     Equipment Compatibility wiki page.
    +#   - ptx2/gymnasticon pull request #76 (MIT), src/bikes/echelon.js at
    +#     82aea215b92eef0152208964ab4c4f309bbd9df5: independent bike client.
    +#
    +# Scope: only the plain BLE profile of machines on firmware older than July
    +# 2025. Nothing here concerns later firmware.
    +
    +device:
    +  name: "Echelon Connect bikes and Stride treadmills (pre-July-2025 firmware)"
    +  manufacturer: "Echelon Fitness"
    +  manufacturer_status: "active"
    +  testing:
    +    status: untested
    +    notes: >
    +      Not driven against hardware by this project. Every byte comes from two
    +      independent open clients (QZ and Gymnasticon) that agree on the bike's
    +      service, characteristics, stream-start frame and the cadence and
    +      resistance offsets. Treadmill facts come from QZ alone.
    +  protocol: "ble"
    +  transport: "ble-gatt"
    +  category: "fitness"
    +  type: "exercise-bike-and-treadmill-telemetry"
    +  notes: >
    +    Echelon is an active company still selling Connect bikes, Stride
    +    treadmills and rowers; it is listed as active for that reason. The
    +    machines have no screen of their own (bikes) or only a basic console
    +    (treadmills), and the vendor app normally drives them over BLE.
    +
    +    Scope: this spec covers only firmware released before July 2025. From
    +    July 2025, Echelon firmware makes the machine wait for a server-issued
    +    challenge before it streams metrics, and this spec does not apply to
    +    machines running such firmware. Echelon also announced on 2025-07-29
    +    that it would void the warranty of customers it finds using third-party
    +    apps with its equipment.
    +
    +    On older firmware the bikes and treadmills share one vendor service,
    +    0bf669f1-45f2-11e7-9598-0800200c9a66, with one write characteristic
    +    (0bf669f2-…) and two notify characteristics (0bf669f3-…, 0bf669f4-…).
    +    Every frame in both directions is
    +    f0 <type> <payload length> <payload…> <sum8>, where the last byte is the
    +    sum of all earlier bytes modulo 256 (see payload_formats.Echelon_Frame).
    +
    +    Bikes report cadence (0xd1 frame) and resistance level (0xd2 frame).
    +    They do not report power, speed or heart rate: open clients estimate
    +    power and speed from cadence and resistance (protocol_details.estimates)
    +    and take heart rate from a separate strap. Treadmills report belt speed
    +    (0xd3), incline (0xd2) and heart rate (0xd1, byte 11). They expect the
    +    client to write each 0xd0, 0xd2 and 0xd3 frame straight back as an
    +    acknowledgement.
    +
    +    DANGER POINT: the same bytes mean different things per family. f0 b0 01
    +    01 a2 starts a bike's stream but starts a treadmill's belt, and f0 b1 01
    +    nn sets bike resistance but treadmill incline. Identify the family
    +    before sending anything beyond the shared initialisation.
    +
    +    Echelon rowers (ECH-ROW…, ROWSPORT…, ROW-S…) and the stair climber
    +    (ECH-EC-SPT…) answer on the same service but are not covered here.
    +
    +  openness:
    +    status: "undocumented"
    +    reverse_engineered: true
    +    source_code: "https://github.com/cagnulein/qdomyos-zwift"
    +    license: "GPL-3.0"
    +    notes: >
    +      No vendor documentation exists. The profile was recovered by QZ from
    +      an HCI log of the vendor app (issue #62) and independently implemented
    +      for bikes by Gymnasticon (MIT). Facts are restated here in our own
    +      words; no code is copied.
    +
    +  identification:
    +    local_name_prefixes: ["ECH", "STRIDE"]
    +    service_uuids:
    +      - "0bf669f0-45f2-11e7-9598-0800200c9a66"
    +    notes: >
    +      Echelon machines advertise service 0bf669f0-45f2-11e7-9598-0800200c9a66
    +      (Gymnasticon scans for it; QZ lists it as a fitness-machine service)
    +      and connect on 0bf669f1-…. Require that service together with a name:
    +      the bare prefix ECH also matches unrelated machines such as Rogue's
    +      ECHO_BIKE_ units. Test the more specific names first, as QZ does:
    +      ECH-EC-SPT is the stair climber (out of scope); ECH-STRIDE, ECH-UK-,
    +      ECH-FR-, ECH-SD-SPT, STRIDE and STRIDE6S- are treadmills; ECH-ROW,
    +      ROWSPORT and ROW-S are rowers (out of scope); any other ECH name is a
    +      Connect bike. Whether the treadmills also advertise 0bf669f0 is not
    +      confirmed by either source.
    +
    +  discovery:
    +    methods:
    +      - type: "ble_scan"
    +        ble:
    +          service_uuids:
    +            - "0bf669f0-45f2-11e7-9598-0800200c9a66"
    +          local_name:
    +            match: "prefix"
    +            value: "ECH"
    +        notes: >
    +          Bikes. Exclude the treadmill, rower and stair-climber prefixes listed
    +          in device.identification before treating an ECH name as a bike.
    +      - type: "ble_scan"
    +        ble:
    +          local_name:
    +            match: "prefix"
    +            value: "STRIDE"
    +        notes: >
    +          Stride treadmills that advertise without the ECH- prefix. The
    +          ECH-STRIDE, ECH-UK-, ECH-FR- and ECH-SD-SPT names are also
    +          treadmills. Stride 4 units (names starting STRIDE4) use a longer
    +          initialisation in QZ that this spec does not document.
    +    identity:
    +      stable_keys: ["address"]
    +      display: "local_name"
    +    static_ip_required: false
    +
    +  setup:
    +    required: false
    +    confidence: "medium"
    +    notes: >
    +      No account, cloud or bond is needed on pre-July-2025 firmware. Both open
    +      clients connect, subscribe and write without pairing.
    +    methods:
    +      - type: "ble_direct"
    +        name: "Connect bike telemetry"
    +        role: "variant"
    +        verified: false
    +        description: >
    +          Subscribe to both notify characteristics, run the shared
    +          initialisation, then send start_stream_or_belt to start the bike's
    +          metric stream.
    +        ble:
    +          pairing_required: false
    +        steps:
    +          - action: "Confirm the machine is a bike: an ECH name that is not one of the treadmill, rower or stair-climber prefixes."
    +            actor: "client"
    +          - action: "Run the top-level initialization: subscribe 0bf669f3-45f2-11e7-9598-0800200c9a66 and 0bf669f4-45f2-11e7-9598-0800200c9a66, then the a1/a3 queries."
    +            actor: "client"
    +          - action: "Write start_stream_or_belt (f0 b0 01 01 a2). On a bike this starts the stream; Gymnasticon sends only this frame after subscribing and gets data."
    +            actor: "client"
    +            expect: "0xd1 frames (cadence) and 0xd2 frames (resistance, sent when it changes) arrive on 0bf669f4-45f2-11e7-9598-0800200c9a66."
    +          - action: "Optionally write poll every 2 s, as QZ does. Gymnasticon never polls, so it does not appear to be required on bikes."
    +            actor: "client"
    +      - type: "ble_direct"
    +        name: "Stride treadmill telemetry and control"
    +        role: "variant"
    +        verified: false
    +        description: >
    +          Subscribe, send the treadmill query, run the shared
    +          initialisation, poll every 2 s, and echo the 0xd0/0xd2/0xd3 frames
    +          back.
    +        ble:
    +          pairing_required: false
    +        steps:
    +          - action: "Confirm the machine is a treadmill by its name prefix. Never send start_stream_or_belt as part of connecting: on a treadmill it starts the belt."
    +            actor: "client"
    +          - action: "Write treadmill_query_a4 (f0 a4 00 94). QZ sends it before the a1 queries; the top-level initialization runs it after them, and whether the order matters is unknown."
    +            actor: "client"
    +          - action: "Run the top-level initialization (subscriptions, then the a1/a3 queries)."
    +            actor: "client"
    +          - action: "Write poll every 2 s (QZ's cadence) and write every received 0xd0, 0xd2 and 0xd3 frame straight back to 0bf669f2-45f2-11e7-9598-0800200c9a66."
    +            actor: "client"
    +          - action: "Start the belt only when the user asks and is standing safely: start_stream_or_belt, then treadmill_start_d0_00, then treadmill_start_d0_11."
    +            actor: "user"
    +    factory_reset:
    +      applicable: "unknown"
    +      confidence: low
    +      effect: >
    +        No factory reset for the BLE module or the machine is described in the
    +        sources used. A reset would not roll firmware back.
    +    rejoin:
    +      in_place_supported: true
    +      requires_factory_reset: false
    +      notes: "Nothing is bonded or stored. Reconnect, resubscribe and rerun the initialisation."
    +    credentials:
    +      wifi_passphrase_protection: not_applicable
    +      stored_on_device: []
    +      issued_to_client: []
    +      notes: "No credential is involved on pre-July-2025 firmware."
    +
    +  pairing:
    +    required: false
    +    confidence: "medium"
    +    security_mode: "none"
    +    bonding: "none"
    +    enter_pairing_mode:
    +      required: false
    +    notes: >
    +      QZ and Gymnasticon both connect to un-bonded machines and write the
    +      vendor characteristic directly. Whether the machine accepts a second
    +      central while the vendor app is connected is not stated by either
    +      source; close the vendor app first.
    +
    +  safety_advisory:
    +    severity: "warning"
    +    summary: "Treadmill speed, incline and start commands move the belt and deck under the person using it."
    +    detail: >
    +      set_speed, set_incline and start_stream_or_belt change a running
    +      treadmill without anyone touching its console. A wrong speed can throw
    +      a user off the belt. Only send them at the user's explicit request,
    +      keep the safety key clipped on, and keep the treadmill's stop control
    +      within reach. This client is experimental and unaffiliated with
    +      Echelon; Echelon's own instructions take precedence. Bike resistance
    +      changes are not covered by this warning, but a sudden large step can
    +      still surprise a rider.
    +    acknowledge_required: true
    +
    +  variants:
    +    - model: "Stride treadmill"
    +      identification:
    +        local_name_prefix: "ECH-STRIDE"

    Confirmed, and fixed in the next commit (not yet pushed). Variant identification only takes a single local_name_prefix, so the treadmill is now split into five variants: ECH-STRIDE, ECH-UK-, ECH-FR-, ECH-SD-SPT and STRIDE. The STRIDE variant also covers STRIDE6S-. Every treadmill entity now lists all five. A new test resolves sample names for each prefix to a treadmill variant under longest-prefix matching, checks that a plain ECH- name still resolves to the bike, and checks that every treadmill-scoped entity lists all five treadmill variants.

    ---
    _Generated by Claude Code_

    holdenk holdenk commented on Nov 30, 2026 05:28 UTC
    Author

    I compared this Fossil spec against the independent recovered Fossil draft and the two open clients. This PR's per-packet AES-CTR reset is correct: Gadgetbridge finalizes the cipher inside the packet loop, and Hybridge invokes one-shot CTR for each packet. Do not adopt the other draft's continuous-CTR rule or its strict inbound 02... authentication prefix.

    A few follow-ups look real before this is merged:

  • file_put_open is not advanced, while DFU prose says firmware upload must be advanced. Please add a distinct schema-resolvable advanced firmware-put path (rather than gating every ordinary file put).

  • The upload chunk formula should include the lower ATT-MTU clamp: min(512, max(23, negotiated_mtu) - 3) - 1 index byte, with boundary tests. The current formula agrees for legal negotiated MTUs, but does not document defensive handling of an invalid lower value.

  • Gadgetbridge's Fossil pairing guide says both vendor-app unpairing and factory reset invalidate the key; the spec currently leaves reset survival unknown. The docs' claim that the key service “still runs” should also be qualified as unverified.

  • The independent draft's negative tests are worth porting (authentication failure/mismatch, truncated close/completion, wrong handle/status, CRC corruption), but keep this PR's per-packet CTR vectors. Do not impose a blanket 256-packet limit on raw firmware uploads.
  • Evidence: Gadgetbridge encrypted upload, Hybridge encrypted upload, Fossil pairing/reset guide.

    holdenk holdenk commented on Nov 30, 2026 05:44 UTC
    Author

    Thanks. All four follow-ups are addressed in the next commit (not yet pushed), and the per-packet CTR reset and its vectors are unchanged. Gadgetbridge's pairing guide confirms the key-invalidation point.

  • Firmware put: new firmware_put_open on 3dda0003. It is the same 03 frame with the handle fixed at 0x00ff and only a length parameter, and it is advanced with an advanced_reason. That reason covers unknown recovery and the DN1.0.2.21r key invalidation. file_put_open stays non-advanced, and its description says never to use it for 0x00ff. The dfu.enter and dfu notes now point to firmware_put_open. I added no packet-count limit, and a test streams a >256-packet image to show the 6-bit sequence simply wraps.

  • Chunk size: the service notes, protocol_details.file_transfer.upload_sequence and the docs page now give min(512, max(23, negotiated_mtu) - 3) - 1, and say that an MTU reported below 23 is treated as 23. A boundary test covers MTU 0, 1, 22, 23, 24, 247 and 514–517, plus 1000.

  • Key invalidation: setup.factory_reset.effect, its description and the factory_reset command's advanced_reason now state that a reset invalidates the key, citing Gadgetbridge's Fossil pairing guide. The pairing guide's "don't unpair in the vendor app" warning is now in pairing.unpair.notes and in the setup step. The docs header no longer says the key service "still runs"; it says whether it still issues keys is unverified here. remaining_unknowns is narrowed to match.

  • Negative tests ported:

  • - handshake failures: a truncated challenge, the wrong frame type, a phone-random mismatch, and every non-zero result code treated as failure;
    - file-channel replies: truncated put-open, close and completion frames, a reply for another handle, the wrong reply type, and a non-zero status (134);
    - CRC: a corrupted container fails both the CRC-32 completion check and its CRC-32C.

    Gates: validate_specs.py 339/339, ruff check ., full pytest -q (3019 passed, 27 skipped) and mkdocs build --strict all pass.

    ---
    _Generated by Claude Code_

    Reviewers
    Assignees
    holdenk holdenk
    Labels
    risk: low confidence: 68.3% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 90.5% (HIGH) · Higher = larger blast radius
    90.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 68.3% · Lower = rushed or shallow review
    68.3%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28.7% · Safe to merge
    28.7%