Changing Wifi Network

Hi All,
We have our Photons and having great fun blinking. At the moment when we travel between work/home we seem to have to re-register them to get them to work with the online dev env.

We do this by pressing and holding the left button for 10 seconds.

My question is, if I integrate one of these in to a product, and test it at our offices and then ship to a customer, how do they get it to connect so that it can start feeding data back. We can’t expect them to download the Phone App and do the reset thingy can we?

I would really be great if someone could explain this to me - or point me to where it is written.

thanks in advance.

1 Like

Holding the mode button for 10 seconds will actually erase all credentials. Holding the mode button for 3 seconds until it starts blinking blue (listening mode), will allow you to enter new credentials. These will be stored on a FIFO principle, for a given amount of credentials (I remember the Core stores 7), whereby the device will cycle through them until it finds a matching one.
There’s a great effort going on to make it easier for product creators to enable them to easily ship products and connect them. There are several things in the work on the dashboard, and the ParticleJS javascript SDK will be updated to allow you to do the softAP setup through a browser. Also, there is the iOS(/Android) SDK which allows you to create an app of your own.

An alternative is to write a program that turns on Serial every time is it plugged in and maybe a special character like “w” will prompt the user for Wifi credentials. Actually the same as how Listening mode works now :wink:

Hi All,

Thanks for the reply,

I think what I need is a recipe for users that wish to produce commercial products, how do I do this, what techniques do I use, which parts of the API etc.
I Think I’ll put a post in the general section on this.

jon

I haven’t integrated this on the photon yet… This is spark core stuff… But if I don’t connect to a network in 90 seconds I go into “listen mode” and allow the user to provide the device with new credentials… If I am in “listen mode” and I don’t get new credentials for 4 minutes. I try to connect again using my current credentials (in case the network was down temporarily). The unit toggle between modes until it connects to the particle cloud.

Works awesome.

4 Likes

Any news?

What news in particular?
There were loads in the last 20 months.

1 Like

@ScruffR I’m also interested in adding wifi credentials via a browser without the app. I’ve read about softAP in multiple places, but have seen a lot of fragmented answers on this. Is there a solution for easily changing/updating wifi info this way?

I never had issues with SoftAP, but I don’t use certain brand devices which seem to keep having problems.

Thanks for the reply. Can you point me in the direction to implement what I was asking above? I could use some direction on how to accomplish this task.

The docs are usually a good place to look at
https://docs.particle.io/reference/firmware/photon/#complete-example

I’ve read through that. And seen Mebrunet’s example:
http://mebrunet.github.io/softap-setup-page/src/?claim_code=1234

I’m looking for a way to alter/edit wifi credentials without resorting to listening mode.

Is there a way to do this?

Sorry if I wasn’t clearer before :slight_smile:

You found WiFi.setCredentials() in the docs?

BTW, did you know that you can enter and leave Listening Mode via your code too?

Hi

We have built a fully working Particle based solution for our electric car charging product
However we cannot deploy our solution because I am concerned about reliability of particle network set up procedure

Here is the issue

  1. Using a clean module registered to our account. Select Setup Option

RESULT: OK
Once network credentials are added by Our Mobile App or using Particle Web App or Tinker App Wifi setup is reliable with no problem.

  1. Press the Select Setup Button to initiate connection to new Wifi Network

RESULT; ERRORS
The process is appears very unreliable.
We get loads of failures (at least 70% during testing with Photon Dev modules)

  1. Connecting to the Photon module during setup from a desktop or laptop using win 10 results in the following behaviour

a) Particle Connection being refused
b) Particle Hotspot Connection established for a few seconds before a RED LED flashing and disconnecting again from the setup PC

In its current state we are unable to deploy a Particle based solution to our customers without causing massive customer service issues
Can anyone advice of a fix or is this known problem with Particles hardware/software?

Thanks
Dave

First, to assist we’d need to know what system version your devices run on.
We’d also need how your code is handling the setup process.
When you mention red flashing, stating the actual red pattern you see would be good.

We are using System Firmware 0.6.3.

When we try to connect module in listen mode,

it is flashed as red several times and fails to connect on my desktop.

Connect how (wired/wireless) to what (device to cloud, computer to device, mobile device to device)?

Yes, what kind of and how often exactly?
One possible pattern would be SOS (… — …) x slow blinks (… — …).

Are you using the default SoftAP http sample code, or a reworked version?
If reworked, how does it now look?
With or without SYSTEM_THREAD(ENABLED)?

I have played a lot with SoftAP and had a ~100% success rate, but then I know what not to do in the SoftAP handlers.
Also the rest of your code might be so close to the memory limits that engaging the Listening Mode SoftAP might tip the device over the edge.

So, I have flashed tinker app using CLI mode
But same issue, I should to use doctor app?

And onething,
Actually, I need to some logic when module is disconnected from cloud

When module boot, if module can’t connect to cloud due to wifi problem etc,

Program logic is not executed? ( of course, I didnt add SYSTEM_THREAD(ENABLED) )
What is solution?