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.
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!
Post
Replies
Boosts
Views
Activity
When using ssidPrefix in the descriptor and completing the AccessorySetupKit setup, I attempt to connect to the accessory's Wi-Fi hotspot using NEHotspotConfigurationManager joinAccessoryHotspot.
The connection fails with the following error:
Error Domain=NEHotspotConfigurationErrorDomain Code=1 "invalid SSID." UserInfo={NSLocalizedDescription=invalid SSID.}
I'm using a prefix that is at least 3 characters.
If I provide ssid instead of ssidPrefix it connects successfully.