Files
swiftcontrol/lib/utils/settings
jonas.bark@gmx.de ec140b1600 fix(shimano): Di2 button mode on Windows needs a bond; fall back to D-Fly
The Di2's E-TUBE config service (18FF) refuses every read, write and
subscribe over an unbonded link. Android and iOS start bonding on
"insufficient authentication"; WinRT only fails the call, so on Windows
button mode setup always failed with hr=-2140864507.

- Before entering button mode on Windows, check the bond and, from the
  setup sheet, ask Windows to pair (10 s budget; Retry picks up a bond
  Windows finishes later). Off Windows nothing changes.
- A refused pairing, or insufficient authentication despite a bond the
  Di2 has forgotten, fails as ShimanoDi2PairingRequiredException. The
  setup sheet then explains how to pair the Di2 in Windows Settings
  instead of showing the generic error.
- Re-entry on reconnect only checks the bond and never starts a pairing:
  a refused one drops the link, so it would cycle the connection. A
  missing bond keeps button mode on; only a rejected passkey turns it off.
- Riders can keep the D-Fly channel buttons instead, from the pairing
  stage or the device panel. That choice ends the setup request and
  removes the "Use Di2 buttons" step from the home chain; button mode
  stays one tap away on the panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 20:53:20 +02:00
..