Set up photon with different wifi credentials

Sometimes think it would be a good idea to have a ‘Advice’ category…

ANyway,

I am developing an application on a photon - it is chugging along nicely (after I found the hint from Scruff on how to compile with local atom when using Fastled - search really helps - thanks Scruff!)

ANyway, as I said the development is going well and I am using my local WIFI at home (between being asked to look after grandkid :frowning:

Eventually when I get the project complete, I will be deploying it to my office which is obviously on another WIFI network. Also obviously I have the credentials to connect to that WIFI but I am seeking advise on the best method to ‘register’ this other network from home so when I take the finished project into work it will connect automatically.

I believe I can store (5) sets of WIFI network credentials in the photon and I assume like my Iphone that the photon will connect to whichever one is physically available.

I assume that I would (at home) use WIFI.setCredentials (specifying the security type because the network will be essentially ‘offline’).

FWIW - the project will monitor a microphone and sample ‘x’ period of time (or until a break of silence is encountered). It will send this to a speech API and get the plain text returned.

After evaluating the text looking for specific words (naughty words), it will set the next not-red of an array (24) of neopixels. Over time these leds will ‘decay’ - i.e the topmost red will fade to black, followed by the next one etc.

It may work - then again it may not - only one way to find out :slight_smile:

If anyone has a small amount of time could they advise re if my plan (using wifi.setCredentials) is viable?

Stan

1 Like

Using a serial terminal, you can set new credentials. So can the CLI. Using the latter, choose to manually enter them, rather than have them being searched for automatically.

Thanks for the kind words :blush:

And nice idea, I’ll be interested to hear how it’ll turn out.

As @Moors7 said, you can do this from outside via USB (serial terminal like PuTTY or CLI), but in order to store the credentials of a non-present WiFi network, you need to know the security cipher (WLAN_CIPHER_AES, WLAN_CIPHER_TKIP or WLAN_CIPHER_AES_TKIP) of your network too and entering a WEP passphrase is not straight forward either (rather change to WPA2 ;-))

1 Like

Thanks Scruff - I too am looking forward to seeing how it turns out.

I normally get about 5 minutes a day to work on it due to having to perform toddler/granddaughter wrangling duties (Daughter and Bub are staying at our place).

But will see what happens!

gave a good one.

Stan