How to setup multiple SSID's in the photon

Hello,

I like to travel a lot with my photon from network to network. So i want to be able to setup more then one SSID/pw inside my photon’s. I read somewhere on the forum that we can have 7 or so setup.

Now is my question on how to do that?

thanks

Just put your device into Listening Mode again and add your new credentials (best via CLI or serial)

I understand this is a very old thread, though I have a related question. Using CLI is there a way to list the configured SSID’s? Or does the particle just keep the last x entries?

I’m not aware of a CLI command to do that, but there is a WiFi.getCredentials() function to achieve that in firmware.

We will be adding this feature soon, along with ways to get this information from the device when it is not in listening mode via USB.

2 Likes

Need help with adding SSID through setCredential in code.
I think the SSID “admin2” should be added to memory. by calling WiFi.setCredential(), Unfortunately it isn’t added… What modifications to be done.

WiFiAccessPoint ap[5];

void setup() {
    WiFi.setCredentials("admin2", "12345678");
int found = WiFi.getCredentials(ap, 5);
 Serial.println("found : " + String(found));
for (int i = 0; i < found; i++) {
    Serial.print("ssid: ");
    Serial.println(ap[i].ssid);
    Serial.print("security: ");
    Serial.println(ap[i].security);
    Serial.print("cipher: ");
    Serial.println(ap[i].cipher);
}
}

void loop() {
}

That’s not really how we expect a help request to be made.
You want help but don’t state what your actual problem is.

Also some basic prinicples of courtesy may be good - the mere statement that someone is in need of help is only that - a statement not really a request and the word please or any of its kind are never a bad start for a proper plea for help.

I’m going to guess that your problem is that if the network you are adding credentials for is not in “view” such that security and cipher are discoverable over the air, then you must pass all four arguments to WiFi.setCredentials().