Add more wifi networks

I seen that it’s possible to add more wifi credential using spark-cli
Is it possible also by code ?


1 Like

yes i’ve just seen this but i need to add more than one wifi network…

If you had bothered to actually read it, instead of merely seeing it, you would’ve noticed that it says the following:

These credentials will be added to the CC3000’s memory

It will add the credentials to memory, not replace them. Calling that function multiple times should allow you to insert multiple credentials.


sorry… thanks !!

Yea, but that’s easy to miss/understand so don’t worry! Also, notice it doesn’t say what happens when you hit the CC3000 profile limit? That’s because no one knows! Not even Ti has it documented! Yay!

I can say what happens in the photon - the last 5 credentials set are stored, and those credentials older than the last 5 are forgotten. So after 6 calls to WiFi.setCredentials() the 1st credentials provided will be forgotten.

This also applies to using setup mode / setting Wifi credentials via serial.

I recently wrote a blog post that clarifies how to set wifi credentials via code on your Particle device. Check it out to get some clarification on how best to set wifi credentials from within your Photon code.