If i am developing on my particle and and then send it to a customer? What is the easiest way for him to setup his network profile on particle? Without creating a particle account and register it to himself? Or do i have to make a program that check if it is connected to the cloud or not? If not then the customer can connect thru serial and setup the wifi?
Easy for you or for the customer?
Easy for you: Clear the WiFi credentials, then the device will come up in Listening Mode, but the customer would need either a serial terminal (slightly “complicated” on Windows since drivers are needed) or CLI (can become rather complicated to setup).
Easy for the customer: Clear credentials and provide an app/websetup that connects to the Phonons SoftAP
But you must not only think of first time setup but also how to allow for the user to change the credentials if they decide to alter their WiFi.
All this said, depending on your actual use case other options might be more suitable (e.g. with touch screen, add a setup screen with keyboard).
Alright, maybe make my own “reset” button that will set the device in a hotspot mode. The user connect to it and a web page where you can setup the wifi?
Is there some documentation on how to make it to a hotspot state?
Listening Mode activates SoftAP.
You can activate this in code via
To get some ideas of how to work with SoftAP, you could go through these long threads (but have to filter quite considerably what goes and what not)
Photon softAP usage?
Using softap-setup-js browserfied
Webpages on Photon / SoftAP
Thanks, i think i can work with https://github.com/spark/softap-setup-js. I think is i possible to create a program that compile a node js app to a program.
Is it possible to set the name of the device?