Files
abawo-bt-app/docs/trainer-setup-and-simulation.md
2026-11-24 20:02:05 +01:00

3.2 KiB

Trainer setup and simulation

The app can assign FTMS and proprietary trainers through Universal Shifters. Scanning uses the button's radio, not a separate phone scan.

Trainer assignment

  • Supported trainers only includes FTMS advertisements and the firmware's recognized-protocol flag (0x10). Non-connectable broadcast trainers remain selectable, including Keiser.
  • Turn the filter off to choose a device requiring manual profile selection.
  • Find trainer model searches the offline model catalog by model, brand, family and stable profile ID. A catalog entry does not prove support in the installed firmware or hardware-tested interoperability.
  • Automatic detection and manual profile selection are confirmed by read-back before writing the trainer address and connect command.
  • Old firmware can still connect without the optional selection characteristic. Manual selection requires firmware exposing that characteristic.
  • A profile rejected by the installed firmware never proceeds to connecting. The app explains the firmware requirement. There are no automatic firmware downloads or bundle changes in this implementation.

Refresh the bundled catalog after reviewing firmware registry changes:

python3 tool/import_trainer_catalog.py ../kettler2ant-rs

The importer uses universal-shifters/trainer-build-matrix.md. Configured-only profiles are excluded. It intentionally requires review if the profile count changes. Control descriptions in lib/model/trainer_model.dart also need review when protocol capabilities change.

Simulation

The optional version-1 simulation characteristics supply configuration, a model catalog and runtime status. Older firmware shows an unavailable message and retry instead of exposing writable settings that cannot be saved.

  • Defaults match firmware: Auto, FE-C model, 75 kg rider, 10 kg bike, multipliers 1.
  • ANT+ weights override configured mass until the trainer session ends. They do not overwrite the app's saved configuration fields.
  • Save changes writes all 14 bytes, then requires identical read-back.
  • Advanced settings start collapsed. Preview changes are local until saved.
  • Graphs use percent gradient. The first covers 0 to 50 km/h at 0%. The second covers -5% to +5% at 15 km/h.
  • Preview equations mirror biketrainer-sim-mode/src/model.rs at ratio 1, Crr 0.004, Cw 0.51, no headwind, drafting multiplier 1 and a zero-watt floor. Trainer power bounds and effective ANT+ weights are not exposed by the current API and cannot be included. Native trainer response is not predicted.
  • Future model IDs can be displayed and preserved, but unknown equations are not invented for their previews.
  • Target power in runtime status is commanded emulation power, not measured rider power. Stale speed and trainer faults have separate messages.

Before release

Validate Android and iOS BLE behavior with actual older and newer firmware, including bonding, a proprietary trainer, a broadcast trainer, profile rejection, simulation notifications, disconnect/reconnect, ANT+ weight precedence and DFU. Confirm the exact factory-shipped firmware support list before publishing claims about shipped units. Board identity and bundle capabilities cannot currently be reliably inferred from the firmware version string.