Webpages on Photon / SoftAP

I just wanted to post an update to this thread with a link to version 2.0 of the SoftAPSetup JS library. Take a look at the release notes, and if anyone has any questions I’m happy to answer them.

3 Likes

Hi Everyone,

I’ve prototyped a solution to this. It’s still ugly and buggy, but working (for me - Chrome v44). The Photon serves a simple HTML/JS page and walks the user through the connection process. Get code and further instructions here.

Cheers!

2 Likes

@mebrunet, nice work. Any chance you can also update (if needed) to work with the P1.

Also what release version is the firmware you are using?

This is built off firmware branch photon_043.

I’ll have no plans to build out compatibility with the P1, however this repository explains how I made the changes and gives you some tools. I imagine you could adapt it to P1…

nice work @mebrunet - any chance you could post a screenshot of the webpage ?

Here’s a screenshot of the version I just posted today. I’ve tested it quite a bit on Chrome and my Nexus 5. It’s still a little buggy, i.e. sometimes needs a manual restart in order to connect, but I can’t do anything about that until the next firmware version is released.

Let me know how it works for you!

7 Likes

Firmware 0.4.4 was released yesterday which addresses a stack overflow issue with SoftAP HTTP, have you tried that?

1 Like

Looks very nice @mebrunet

Hi, I'm fairly sure I've got 0.4.4 running on my photon, but I can't seem to raise 192.168.0.1/device-id. TCP works just fine and logs in and configures the SSID etc, but HTTP is page not found and nothing on telnet.

Any ideas?

Let's turn fairly sure to absolutely sure! :wink:

To get to the latest release firmware:

npm install -g particle-cli
particle-cli update

Thanks, was v=2, so presume an old 0.4.2.
In the cloud UI it was saying it would be flashing with 0.4.4, so I presume that was the main firmware. Oops!
Also asked for access again to the fleet dashboard so I could conveniently see device version.

ps, when I originally claimed it, the Particle phone app said there would likely be a firmware update, which appeared to occur. I’d have thought that would have done the 0.4.2 to 0.4.4 update. Having an OTA firmware update via the app would be handy, even prompting you on the device list page if any are out of date.
Can see the next step is folk also wanting the back catalog for testing purposes.

Hi
This thread has not been updated for 6 months. Are you aware of a solution, which allows our customer, to: 1. Connect to the Photon’s Wifi. 2. access: http://192.168.0.1, 3: select Wifi, and enter Wifi credentials and Connect ?
I can see you did a lott of great work 6 months ago, has it finally been included in the formware of the Photon ?
Best Regards Thomas

Particle was not so interested in embedding a SoftAP page directly in the system firmware. Instead, they solved the CORS issue, and you can simply use a website to connect the Photon. There’s an example using Meteor on the other SoftAP thread.

I threw this together as a demo a while back, but I haven’t had the chance to open source the SoftAP process we’re using in prod.

1 Like

@mebrunet Any chance you can some time? It looks to be a great simple solution.

Our plan is to rework the system firmware so that the application can hook into the softAP process, allowing applications to serve their own webpages.

3 Likes

That link is 100% static javascript / html / css. No server side rendering or minifications. You can actually just rip the entire codebase from the link I posted. No need for anything more.

What I meant about open sourcing, is that in our app I’m using a React connection “wizard”. It’s much more interactive and animated. However, that will take some time to rip out and open source, time which I just don’t have right now.

1 Like

@mdma - Rough timeline on allowing application code a hook into the softAP? I am implementing a similar approach, but maybe I’ll wait if change is imminent.

2 Likes

It will be available with 0.5.0 which is to be released as a beta this week (hopefully tomorrow.)

4 Likes

This would be very helpful for us. Good luck with implementation!