I am running this program on a Photon with firmware v3.0.0.
During listening mode (SYSTEM_MODE(SEMI_AUTOMATIC); SYSTEM_THREAD(ENABLED); ) I pass the arguments to the function: ssid, password, security and cipher.
If the network is available, the photon works fine, but if the networks is not there it is not stored.
In my code I check the saved networks before and after to verify if it was saved. When I try it wit an offline network, allways fails
mem = WiFi.getCredentials(ap, 5); Serial.printlnf("Networks saved before:%d",mem); credentials.setSsid("MySSID"); credentials.setCipher(WLAN_CIPHER_AES_TKIP); credentials.setSecurity(WPA2); credentials.setPassword("MyPass"); WiFi.setCredentials(credentials); mem = WiFi.getCredentials(ap, 5); Serial.printlnf("Networks saved after:%d",mem);
What could make this process to fail?