Web BLE clearing credentials

When clearing WiFi credentials from a Photon2 / OS 5.7.0 using an extended version of ble_wifi_setup_manager library the following errors are after what is a successful clearing of credential. Can anyone help throw light on what these errors are?

0000054252 [app.BLEWiFiSetupManager] TRACE: Added message to the queue: {"msg_type":"clr_creds"}
0000054257 [app.BLEWiFiSetupManager] TRACE: State Transition: 1 -> 2
0000054264 [app.BLEWiFiSetupManager] TRACE: Parse RX: {"msg_type":"clr_creds"}
0000054271 [app.BLEWiFiSetupManager] INFO: key=msg_type value=clr_creds
0000054280 [app.BLEWiFiSetupManager] INFO: Has WiFi Credentials
0000054392 [net.rltkncp] ERROR: linkOutput up=0 link_up=0
0000054590 [net.rltkncp] ERROR: linkOutput up=0 link_up=0
0000054965 [app.BLEWiFiSetupManager] INFO: WiFi Credentials cleared
0000054974 [app.BLEWiFiSetupManager] TRACE: State Transition: 2 -> 1
0000055590 [net.rltkncp] ERROR: linkOutput up=0 link_up=0
0000056590 [net.rltkncp] ERROR: linkOutput up=0 link_up=0
0000057590 [net.rltkncp] ERROR: linkOutput up=0 link_up=0

I am using the same approach (disconnecting from cloud and WiFi before deleting) from Photon to reliably clear the credentials and maybe this is the problem.

That error is generated here:

It looks like it occurs when the interface is down (because it sounds like you disconnected) but the link is still up. I'd guess that it's because the the disconnect hasn't finished yet.

However, it also is in a function to send data, so it's probably not an important error, as if the interface is in the process of disconnecting you probably don't care that data is getting discarded.

Thanks
Next question, should I check for completion? There are new functions in Device OS 5.X.0?

uint32_t time_out_cloud = 2000;
if (Particle.connectionInterface() == WiFi) {
    time_out_cloud = 5000;
} else if (Particle.connectionInterface() == Cellular) {
    time_out_cloud = 20000;
} else if (Particle.connectionInterface() == Network) {
     time_out_cloud = 2000;
}

Particle.disconnect(CloudDisconnectOptions().graceful(true).timeout(time_out_cloud));
waitFor(Particle.disconnected(), 2000);  //is this now redundant?

And

WiFi.disconnect();
waitFor(!(WiFi.ready()), 1000);

Or can I just clear the credentials and this will disconnect the WiFi?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.