Skip to content

fix(ios): wire Wi-Fi config characteristic + actually push creds on Confirm#27

Open
Flo5k5 wants to merge 1 commit intom5stack:mainfrom
Flo5k5:fix/ios-wifi-push-on-confirm
Open

fix(ios): wire Wi-Fi config characteristic + actually push creds on Confirm#27
Flo5k5 wants to merge 1 commit intom5stack:mainfrom
Flo5k5:fix/ios-wifi-push-on-confirm

Conversation

@Flo5k5
Copy link
Copy Markdown

@Flo5k5 Flo5k5 commented Apr 22, 2026

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.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant