Configuring Wi-Fi credentials from Android APP using configureAPStep and ConnectDeviceToNetworkStep

Hi,

We are researchers from Carnegie Mellon Univerisity trying to setup a photon with the local cloud. In doing so, we want to use the tinker app with device setup library to just change the Wi-Fi credentials of a device by configuring it while it is in the listening mode. On trying to do so with the stock tinker app, we see that there are 2 calls being made, configureAPStep to set the configuration via softAP commands and ConnectDeviceToNetworkStep (which I see is simply setting a semaphore? Would be great if you can throw some light). I believe the configureAPStep does add the credentials and sets that to be the Primary SSID. And we are seeing the response code as “r”:0 after the ConfigureAPCommand–>add_wiced_wifi_credentials call (which we see as success). However, the device still continues to use the previous SSID for connection.

  1. Shouldn’t a successful call to ConfigureAP update the WiFi creds and the devices connection status?
  2. Is a valid claim code required for any WiFi configuration changes via SoftAP?
  3. Is there an example code to just change the WiFi credentials (connect to SoftAP, and send the commands) via an android/iOS app, without the need of other device setup steps or using claim code?

P.S., we tried to change the WiFi creds while the device was connected to local cloud. We tried using the tinker app as it is connected to particle cloud and we also tried by making tinker app connect to local nodejs server by changing the base_api_url.

TIA,
Synergy Labs, CMU