I have an accessory which uses both Bluetooth and WiFi to communicate with the app. I am trying to migrate to Accessory Setup Kit.
However, the API expects both the bluetooth identifiers and WIFI SSID or SSID prefix in the ASDiscoveryDescriptor.
The problem is we only have the WIFI SSID after BLE pairing.
Our current flow looks like this:
-
- Pair via BLE
-
- Connect via BLE
-
- Send a BLE command to request WIFI settings (SSID and password) (Each device has a different SSID and password)
-
- Connect to WI-FI hotspot by calling
NEHotspotConfigurationManager applyConfiguration
with the retrieved credentials.
- Connect to WI-FI hotspot by calling
Is there a way to set the Wi-Fi SSID of an ASAccessory
object after the initial setup?
To use Accessory Setup Kit we would need something like this:
-
- Call Accessory Setup Kit with bluetooth identifiers in the descriptor, finish the setup and get ASAccessory object.
-
- Connect via BLE
-
- Send a BLE command to request WIFI settings (SSID and password)
-
- Set the SSID of the ASAccessory to the retrieved value.
-
- Connect to WI-FI hotspot by calling `NEHotspotConfigurationManager joinAccessoryHotspot.
Thanks!