fix(ios): wire Wi-Fi config characteristic + actually push creds on Confirm - #27
fix(ios): wire Wi-Fi config characteristic + actually push creds on Confirm#27Flo5k5 wants to merge 1 commit into
Conversation
…onfirm
Two stub-level gaps in the open-source app prevented the pairing from
ever completing:
1. AppState.swift never maps the E2E5E5E3 (Config) characteristic to
BlufiUtil.writeWifiSetCharacteristic. Without the mapping, any
attempt to sendWifiSetData() early-returns with "No writable
characteristic".
2. BindingDevice.confirmWifi() only flipped the pairingStatus to
DistributionNetwork and then ChangeTheName after a 1s delay,
without ever writing anything over BLE. The firmware never
received the Wi-Fi credentials, the StackChan stayed offline.
Fix:
- Assign writeWifiSetCharacteristic when the E2E5E5E3 characteristic
is discovered during the GATT service scan.
- Serialise {"ssid":..., "password":...} as JSON in confirmWifi and
send it via BlufiUtil.sendWifiSetData before animating the UI
progression. The firmware handler (hal_ble.cpp:
_handle_ble_config_write) parses this exact shape.
Both fixes live on self-host for now; they should also land upstream.
|
Hi 👋 — closing this PR as fixed-by-replacement. The upstream merged commit I've preserved the Swift-based patches on a dedicated branch Happy to re-open or re-submit against the Flutter codebase if useful. Thanks for the review on the merged firmware PRs (#20/#21/#24) 🙏 |
Two stub-level gaps in the open-source app prevented the pairing from
ever completing:
AppState.swift never maps the E2E5E5E3 (Config) characteristic to
BlufiUtil.writeWifiSetCharacteristic. Without the mapping, any
attempt to sendWifiSetData() early-returns with "No writable
characteristic".
BindingDevice.confirmWifi() only flipped the pairingStatus to
DistributionNetwork and then ChangeTheName after a 1s delay,
without ever writing anything over BLE. The firmware never
received the Wi-Fi credentials, the StackChan stayed offline.
Fix:
is discovered during the GATT service scan.
send it via BlufiUtil.sendWifiSetData before animating the UI
progression. The firmware handler (hal_ble.cpp:
_handle_ble_config_write) parses this exact shape.
Both fixes live on self-host for now; they should also land upstream.