Photon softAP usage?

@mdma @nexxy these are very promising developments. Setting up wifi in a browser would be so much less friction for our customers. As a small dev shop we love what particle brings to the table to enable us to innovate at a fast pace, but we don’t staff iOS and Android developers, nor do we care to support those apps going forward. As such, the browser support is a big deal and I appreciate the work on everyones behalf to see it through. Thanks so much!

8 Likes

@mdma it looks like to “fixed the http_server bug.” as of 3 hours ago? I have been following this thread closely. I want is to be able to serve a light weight web page from the photon in ap mode. Will this be possible on the photon? If so would it be through the particle application, or will I need to dig into the source code? I am super interested in this… I have got similar functionality from the TI CC3200, but I love the service particle has, as all the web connectivity is done (as in I don’t have to do it).

The web page will have 2 purposes:
1: set the equipment set point, and view equipment state (it is a dehumidifier, not super complicated).
2: allow the user to connect to wifi and the spark cloud (if they want to, for feature TBD). Obviously if they do this we will no longer be serving the web page in AP mode.

Exposing generic AP mode, with TCP Server, TCP Client and UDP is scheduled this sprint. The web server will be provided by the Webduino library.

I have yet to start coding this (being continually dragged into other stuff!) but my understanding is that we can have both AP mode and WiFi STA mode active together. So no need to stop the web server when connecting the photon to another AP.

5 Likes

thanks for the update @mdma I will forge ahead with my product under the assumption that my customers will be able to connect their photon to wifi from a browser. I will first claim all the photons in my account before I send them out so that I may push remote code updates to them, but letting the user simply connect/reconnect their device to their local wifi creds will be huge!

2 Likes

Great to hear! Perfect that you can flash the latest code to the devices yourself before sending them on to customers.

@mdma
I am excited for this next update. I am using the photon as the brain for an xbee localization method currently, but I am hoping to get access to the WIFI STA mode to read the individual WiFi.RSSI values.

We are using the information to trigger real time controls in live theatre, and we are polling the RSSI data as fast as possible to give us the proper resolution.

I am wondering if that functionality will be baked into the newest firmware release, or if I will have access to Broadcom’s API.

Thank you for your time!!

Thanks for that use case! I’m unsure yet if it’s possible to get the RSSI for each connected client, in either AP or STA mode.

The only thing I’ve seen is AP scanning, which is probably not what you’re looking for.

If you know of the WICED API that provides RSSI values for connected client this please let me know! :slight_smile: I haven’t really looked for it since I’ve been busy with support requests - I had hoped to start implementing the AP mode by now. :smile:

That’s great news… @mdma any updates on when we can get this wonderful feature? :smile:

This feature has been rescheduled to after we have multithreading in place. I’m taking vacation starting the end of this week for 2 weeks, so 3 weeks time at the earliest.

If I can squeeze in a beta preview before I head off I’ll do that.

2 Likes

Have a great vacation!! :slight_smile: If you can squeeze it into the beta version that would be wonderful!!

1 Like

looking forward to seeing how we can run a soft AP (with basic password associated to physical device or account used to claim it) if it detects that previously available networks aren’t online, ie the user has changed their wireless network then a month later turns on their particle device

Hey,
I got the Photons yesterday and I’m happy to see that the “N wifi”/“smart config” problems have been solved with the softAP.
I configured my photon thru the app but, I would like to know if there are other options to config (just) the WIFI: browser? minimal app just for that or something else? With the Core we built menu in case the WIFI credentials are not working, but here it should be easier with the softAP.

With 0.4.2 (not yet released, but in develop branch on the repo) you can configure WiFi via HTTP. The Javascript SDK will be updated to support this.

4 Likes

We’re considering using PhoneGap. I was wondering if you had some sample code for the device setup? Did you use the above mentioned JS library?

1 Like

Curious if you can expand on what the flow of “configure wifi via http” actually entails.

I assume the process is basically to connect to the photons AP, then open a browser and visit some specific address, there you are presented with a list of nearby routers, and a dialog box to add a password?

Are there any roadmaps out there that could give insight into when 0.4.2 might go into production? Thanks for all the work on this one!

The HTTP protocol supports basically the same command set as our proprietary SoftAP protocol (we would have gone with HTTP from the outset but were prevented from doing this by bugs in the WICED HTTP implementation.)

As far as I know, the Javascript SDK will provide a programmatic interface to allow:

  • retrieving the device ID
  • scanning local APs
  • configuring the AP connection details (including encrypting the password with the device’s public key)

I don’t know the timeline for when this will be available. @nexxy will have more details.

We are really hoping to get 0.4.2 out this week now that the infrastructure to update system modules is in place.

1 Like

The use case I am trying to solve is:

  1. I develop a photon based product.
  2. I send that product to a customer.
  3. I would like the customer to attached/reattach the product to their own wifi network, but need the device to be part of my particle.io account so I can push code updates to the device.
  4. I would like to do this without the user having to download a 3rd party app.

I’m not sure how/where I would host a javascript api to accomplish the above, can you confirm if it will be possible? As I understand it the JavascriptSDK is designed to be used devs who want to create a nodejs app for their users, not really something that is in a hosted environment.

I’m hoping I’m not alone in my wanting an easy way to have my users connect their device to their wifi network without downloading an app. There are many wifi connected products that do it all in a browser and it seems like a lot less friction.

9 Likes

Let’s bring in @jonlogan and @corey here who have a better understanding of the end to end process!

@anthonywebb you have hit the nail exactly on the head!

For commercial deployments we need the ability to maintain our control over the firmware but allow the client to readily change their WiFi settings.

If this could be done over the web without app deployment, this would be the ideal.

There seems to be a number of solution possibilities here, the softAP + custom firmware is one.

The Particle app is great, but the login requirement makes it unusable for commercial applications.

Thinking that a modification to the Particle app and login requirement would be simpler - “all” that is needed is for a separate token to be generated by the Particle cloud for the specific device and for this magic number to be provided with the product, perhaps as QRCode. The user would enter this token into the Particle App instead of the Photon owner’s login and voila, we have a fully commercial, field deployable solution.

Food for thought…

1 Like

Hey @anthonywebb, Jeff here, one of the Particle engineers. What you’re describing sounds like a great use case for our fleet management dashboard, that is currently in development. This dashboard will be entirely geared towards product creators like you to be able to manage firmware on a group of devices en masse, while still allowing your customers the flexibility to connect it to their own Wi-Fi networks.

We are introducing an entirely new architecture of organizations, products, and customers, to avoid the need to have all of the devices claimed to your single account. Something like this:

In words, you set up an organization, the overarching group responsible for the development of your Internet of Things products.

Your organization can have multiple products. Defining a product is what unifies a group of devices together, and can be configured to function exactly how you envision.

Each product has its own fleet of associated devices. Either a P0, P1, Photon, or eventually, an Electron, can be used inside of each device.

Customers own a device, and have permissions to control their device. The extent of their access to the device is defined by you when configuring your product.

Your organization has team members with access to the dashboard. As a team member, you will be able to rollout firmware to a group of devices that identify as part of your product.

A beta for the fleet management dashboard will begin in a matter of weeks. If you are interested, please send a note to hello@particle.io asking for an invitation!

I know there are plans to implement SoftAP from the browser as @mdma mentioned that you will be able to take advantage of in the JavaScript SDK. However, this is not ready to be released yet.

6 Likes