I had marked that loop false(0) only to bypass this part of the temporarily or I would not have gotten the
"Connecting to homenetwork, with 15FE63C8B44A6192, please wait…)
Device failed to connected to homenetwork using config 18. WEP..." mentioned above.
I did not include this additional code as it was unnecessary for diagnostics and when I add unnecessary code it seem to distract people from focusing on the actual problem at hand. I should have broke this down to the essentials to isolate my issue, sorry about that:
void loop() {
}
void printWiFiCredentials(){
WiFiAccessPoint ap[5];
found = WiFi.getCredentials(ap, 5);
for (i = 0; i < found; i++) {
Serial.printf("ssid: %s \n", ap[i].ssid);
// security is one of WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA, WLAN_SEC_WPA2, WLAN_SEC_WPA_ENTERPRISE, WLAN_SEC_WPA2_ENTERPRISE
Serial.printf("security: %d \n", (int) ap[i].security);
// cipher is one of WLAN_CIPHER_AES, WLAN_CIPHER_TKIP or WLAN_CIPHER_AES_TKIP
Serial.printf("cipher: %d \n", (int) ap[i].cipher);
Serial.printlnf("ip address: %s", WiFi.localIP().toString().c_str());
Serial.printlnf("gateway: %s", WiFi.gatewayIP().toString().c_str());
WiFi.macAddress(mac);
Serial.printlnf("mac: %02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
}
}
I have tried your code and I get:
0000033471 [app] WARN: WiFi skynet not found
...mind you. this is the same network that this device was connected to, just a moment earlier. When I go into the particle app under settings=>WiFi=>manage WiFi for this device, it shows that the skynet is there, but it has a lock on it:

I clear it and reset WiFi parameters. Since your code has no delay (buffer zone) in clearing credentials (my fault, I should have added it), even after I use the Particle App to reset to WiFi credentials, upon reboot (device reboot), this code immediately wipes the credentials I just set, and now I am unable to flash anything to it.
First and most important issue as the device is unusable at present:
-
How do I tell the web IDE or console to clear the code upon reboot (reboot after setting WiFi credentials with Particle App)?
-
The code above does not work on this device. I can look at my router and see what enc and cyph it is using. I tried connecting using those additional parameters, and it still does not connect. I then tried every possible combination, no go.