Photon softAP usage?

Just a simple question - is the photon softAP mode for wifi client configuration only, or can it be normally used together with a client ? And how about the wifi mesh - this was not possible with core, how about photon ?

I’m thinking about tens of photons chained together (with only first of them being in the range of the wifi AP), talking with each other. Using spark cloud (if possible) or any other network communication method if not.

2 Likes

Hi @kefir135
So indeed the photon Soft AP is client configuration mode, the Photon cannot establish a wifi connection to another network while it is being configured, as it acts as an AP only. Regarding mesh - the Broadcom BCM43362 chip which the Photon is based on does support Wi-Fi Direct mode (will require firmware changes) that will allow you to connect between two photons , however that will be point-to-point type communication, not really mesh type.
Hope that helps.

3 Likes

I have previously used TI’s Java SmartConfig Code for connecting the SparkCore on my website. Does Broadcom have code for loading WiFi credentials on the Photon?

Hi @bdi247
Sorry for the delayed reply, upon release the Photon will have it’s own libraries for easily loading the WiFi credentials using any option you select:

  1. CLI (command line tools)
  2. Direct using Serial over USB (by adhering to a simple protocol)
  3. Javascript (web)
  4. iOS app (by using the Spark DeviceSetup library)
  5. Android app (using Android DeviceSetup library)

All of the libraries/methods (except direct) utilize the soft AP module in the firmware running on the broadcom chip

I presume then, using JS, I can build a web based form to to configure an photon, rather than an app?

I have looked at the spark/softap-setup-js code and this looks like server side script - it would be helpful to have the html side as well? Can anyone provide a simple example that implements this code.

Thank you

Hey Kevin!

At this time it’s not possible to complete SoftAP Setup from a browser. This is due to a limitation in the underlying vendor firmware that we are working on resolving.

Future iterations of the SoftAP Setup protocol will support the ability to be performed via a browser, and I will be sure to post about it when that happens!

In the mean time I am happy to help with any other questions you may have!

Thanks!
— nexxy

2 Likes

Thanks nexxy.

Can you reiterate what options we have for setting up the wifi credentials? Is it currently limited to using an app based solution?

I do not have the skills to develop both IOS and Android apps, so I am looking at alternative solutions that can be used by customers (so usb is not really an option) to setup the wifi credentials.

As a fallback (to learning IOS enough to wrangle the sample app) I was thinking about appcelerator, a little off topic, but would the sample app libraries be re-useable with appcelerator?

Thanks again.

Hi @nexxy

Got my photons in the mail and they have passed testing, we are ready to get a bulk of photons on the way. The one sticking point here is getting the customers wifi credentials onto the device. How is the javascript configuration option coming?

Thanks!

Curious if you found a solution Kevin?

@anthonywebb,

Hey! The new Particle-CLI has great support for SoftAP Setup of Photons! Check it out here: https://github.com/spark/particle-cli

If you’d like to make an application that wraps this setup process into a different user experience, you can use just the SoftAP Setup JS library. You can take a look at that here: https://github.com/spark/softap-setup-js

Let me know if you have any questions! :smile:

Thanks @nexxy ! Can you expand a bit on the JS Lib. That almost looks in the examples like a nodeJS app right? Question is where would the JS be hosted in a setup scenario?

@anthonywebb,

The SoftAP Setup library is indeed intended for use with Node.js. It would run on the computer that is completing the setup of the device! You could pair this with your own command line utility, or combine it with something like https://github.com/atom/electron for a GUI experience.

I hope this helps!

— nexxy

I was afraid of that, wanted to get by without having to support a separate setup app.

If it hasn’t been mentioned before I would love to see a simple html wifi setup utility hosted on the photon so when you connected to the photon in AP mode you could simply open a link and config, without an additional software download. Most of these headless wifi products use similar.

@ido you mentioned (web) was in the works. Can you expand how how this might work? Is the idea that they user is able to add/edit wifi credentials in a browser?

It looks like other people have made soft AP work with a web server. See this repo for some code:

https://github.com/lubing521/bcm-wiced-sdk/tree/master/apps/snip/apsta

I don’t believe this configures WiFi but the general idea is the same.

Apologies in my delayed response @antonywebb (been on holiday). No - no progress here. Seems that the idea of a browser based solution is off the agenda at present. Not had time to look further into the appcelerator option - but would be really grateful if someone could provide some pointers here.

I tried really hard to get SoftAP working with HTTP so it could be “browserified”. Unfortunately there was an underlying bug with the version of a vendor library we were relying on, and it prevented us from being able to reliably support HTTP, so the decision was made to remove it from the current release of Photon system firmware.

As soon as this is fixed, I will definitely work on getting it into our SoftAP Setup module! :smile:

@mdma may have some more insight into this particular predicament.

2 Likes

I’m also at least a little bit concerned with this:

https://github.com/lubing521/bcm-wiced-sdk/blob/master/apps/snip/apsta/apsta.c#L1-L9

which is part of the reason I’m referring to things as a nondescript ‘vendor library’.

1 Like

I have done some work with PhoneGap (or Cordova), and Ionic Framework to create a bit of a skeleton for basic ‘hybrid mobile apps’ that do little more than setup the device.

I would suggest maybe taking a look at these technologies as starting points for working on something that might be a little more flexible in terms of deployment options?

https://cordova.apache.org/

1 Like

We were using the proprietary library in a private repo (closed source), but recently WICED have opened up the license with their latest version (3.3.0). This version may also have fixed the HTTP issues - I can try spending a few minutes seeing if it works.

The license now looks like this:

3 Likes