I’m trying to implement the browser-based SoftAP setup for a Photon. I’ve almost completely got it sorted, except for two problems.
- I have a Photon running the latest firmware (via
npm update -g particle-cli && particle update).
- I have been playing with @brewnerd’s browserified
softap-setupbranch, trying to implement a Photon setup interface
in-browser (using Meteor, if anyone’s interested in that.)
So the good news is I built such an interface, and it does work! But there are two main roadblocks I’ve hit, and which as far as I can tell may be specific to the firmware rather than the JS lib:
SoftAP.prototype.connectdoes transmit the WiFi configuration data correctly to the device. I know this because when it restarts, it connects to the AP successfully. But this
.connect( cb_func )command does not actually trigger the Photon to attempt to connect to the access point or restart. In other words, there is no real indication that new WiFi credentials have been transmitted, and it is up to the user to manually restart the device to try connecting with those credentials. I would expect the Photon to auto-restart or attempt an auto-connect on receiving this command.
If the password is incorrect, when the Photon is restarted and attempts to connect, it flashes green and then stays solid green. It does not re-enter beacon mode or turn red, or otherwise indicate failure.