Setting WiFi credentials via a LCD display and keypad input for the access code is fine. There is a function to ‘forget this network’ for the currently connected wifi but is there a way of displaying all available wifi networks from which a user can select which network to connect to? This appears to be available via the CLI when the Core is connected via a usb. Is there a hidden/undocumented function somewhere?
I don’t know of a built-in function but on the Core at least the code to find all the networks in range in the RSSI function. If you take that as a starting point and adapt it for your needs, you could easily find all networks in range.
The RSSI function gets a structure back from the TI CC3000 driver that has the SSID and other info for each network which the function loops over looking for the one SSID that matches the current SSID, so if you use that same structure you can get all the networks.
I think that needing to build a screen and keypad to enter Wi-Fi details is not how I ever envisioned an internet of things device working.
Something along these lines seems more logical :
Provide a webpage on the Photon where you can manage Wi-Fi connections. Connect to it directly through any Wi-Fi enabled device and add the local network. View any live information on the Photon webpages directly - negating the need to build a screen on the device. Add any configuration screens on the Photon to manage settings.
I had a long discussion with the person I am building this system for. The issue is that the Core or Photon will be included in an item where we want to have a very simple end user interface - one button to turn the device on otherwise it will be in a ‘standby’ mode with low power consumption and hence the screen and wifi off. Wake from standby will switch on the wifi and connect to the cloud. Having a screen is unnecessary at this initial stage for end users but could become useful later on.
However, setup of the wifi network initially and changing from one wifi network to another is required as the device is moved around - probably not a very frequent requirement and would not be an end user task. We see that such a task could easily be done by plugging in a keyboard and using the screen. We realise that an App on iOS or Android would be nice but thought that could come later. If I understand what you are saying is that the you can connect to the Photon itself via WiFi and the device OS will expose the APIs via an HTML webpage. How do you do the initial setup? I will keep an eye on this development. Thanks
Well that’s my hope. I think for people producing devices at large volume the expense of building out Android and Iphone apps can be acceptable. For me, I know how to build Android apps, but building an Iphone app would not be cost effective at $100 a year to put apps on the app store plus the cost of buying a mac for development.
For lower volumes I think webpages on the Photon are a simpler / cheaper approach. Hopefully
will provide what is needed for that.