Best use case to deploying app/products using Photon to customers?


I read about how to deploying application to customer I need to deploy some product (application particle) to my customers and I choose Photon WiFi for. How customer will be able to setup the WiFi on the Photon ? Right now is very simple for me to use my Particle app and setup a new device but what’s append when my customer far of you ?

I have product just sent publish and another product will able to turn on/off a relay and for that I need to use a token.

Anyone can refer to the right way to done that ?

@steeves Have you setup your software as a product? If you are going to have many devices out in the field then you will likely need the features in the console to manage devices, groups of devices and software updates even if the application is very simple.

With regards wifi setup there are a few approaches:

  1. Use the softap code and example to have the device become a wifi AP and web server that hosts a site to allow a user via a browser to update the wifi credentials.
  2. You could write your own mobile app.
  3. Build a simple interface (screen and buttons/keyboard input) to allow a user to directly enter wifi credentials to each device.
  4. Do a setup via USB serial with a terminal app on a PC and use ‘w’.
  5. If wifi credentials are always the same you can hard code them in your application or have them read from external media like an SD card - the details are then deleted after successful setup.

There are probably more options but you get the idea.


Thanks @armor

Yes I use products in Particle Console for manage app update etc. For my product using Electron it’s very easy because I made the setup myself, activate the SIM card, test and ship to the customers but for a WiFi product is not the same.

Do I need to ask the customer first for credentials ?
What’s append when the customer change the WiFi password or SSID on the WiFi Router ?

While I write this message I think I need to search for softap :slight_smile:

Where is the sample to achieve that and example for page customization ?

thanks for sharing

You could look at this post

The basics this solution builds on can be found here

1 Like

@scruffr beat me to the link. One thing to say about the wifi setup is that you need to initiate the setup and give feedback to a user. If your product already has a screen that’s easy if not then you need at least a button and 1 or 2 LEDs. Lastly, the softAP setup can only handle WPA2 authenticTion and not Enterprise.


Thanks @ScruffR and @armor I’ll look that during the weekend. I try to find the reference for Argon, look not implemented to do the same SoftAP. It’s true ?

The Argon does currently not support SoftAP and it’s not yet clear if that feature will ever be added.
The current understanding is that BLE should provide a better UX and hence has a much higher priority than SoftAP.

Hi @ScruffR I testing during the weekend the softap on the photon. I am able to make a dummy app from the Web IDE using the lib SoftApLib by Juvenal Guzman and set the correct WiFi.

When I try to use the lib in my program, using Particle Dev soft, I have a problem (see the screenshot)

What’s wrong ?

Are you sure you are compiling the correct project?
AFAICT neither the library nor the example use stl_vector.h.

Also what device OS version are you targeting?
How did you import the library in Dev?

I’d suggest you forget Particle Dev and rather transition to Particle Workbench.

Hi @ScruffR
In my project I use the lib for OLED SSD1306 and I target Photon 1.0.1.

I import the lib like #include <SoftAPLib.h> and like that in the properties dependencies.SoftAPLib=1.0.1

Yes I use Particle Workbench for my others Gen 3 devices

And why not for Gen1 & 2?

For your issue with SSD1306 there already is an answer

Look now fixed, I define in this order

#include <math.h>
#include “Particle.h”
#include <SoftAPLib.h>
#include “Adafruit_GFX.h”
#include “Adafruit_SSD1306.h”

I don’t know the real reason for use Gen 3 with WB but when complete this project, I promise to switch :slight_smile:

Thanks for your help, is not resolved

1 Like

Hi @ScruffR you ask me 2 weeks agos why I don’t use Particle Workbench ? The problem i tested today just to create a hello word app a tried to compile and flash and I got error. Can you share me please a link when I can be sure to follow instructions ? I am able to compile for Photon but not for Argon

iMac:test me$ particle compile argon
Compile failed: Target device argon is not valid
        eg. particle compile core xxx
        eg. particle compile photon xxx

Can you run particle --vesion
This message suggests you are running an ancient version of CLI. Currently we are at 1.39.0

in Particle Workbench you can run Ctrl/Cmd+Shift+P image

You can also try Ctrl/Cmd+Shift+B to get local building options.

BTW, Particle Workbench doesn’t support the Spark Core.


Version is 1.39.0
I follow another thread where you indicated the uninstall Local Compilar and reinstall. I am able to compile for Argon like Particle compile argon, I can see the .bin file.

When I try to flash like particle flash my_argon, no luck

bash-3.2$ particle flash my_argon
attempting to flash firmware to your device my_argon
Flash device failed: Request Timed Out

When you have a binary, can you run a particle binary inspect <yourFirmware.bin> to double check it is actually targeted for Argon (I had instances where that wasn’t the case).

If an OTA update fails try putting the device into Safe Mode and flash again.
Before running that command, I’d also remove the bob.cpp file. This is a byproduct of the local compile but your implicit cloud compile may get tripped up by that.
If you don’t want to implicitly cloud compile you should run particle flash my_argon <yourFirmware.bin> tho’