Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Create example for browser-based device setup #70

Open
beriberikix opened this issue Nov 5, 2021 · 3 comments
Open

Create example for browser-based device setup #70

beriberikix opened this issue Nov 5, 2021 · 3 comments

Comments

@beriberikix
Copy link
Contributor

@keenanjohnson asked in Discord for an example showing how to setup/deploy a device in the field via the web browser. Some of that discussion (Keenan - please add any more details!):

Given that we're open source and sort of limited in developer resources, something that we can develop once for all platforms ( like a UI in the web) would be the most ideal that allows our users to connect their devices to their home wifi!
So when you get your device you got to sensor.local or something similar to connect it to your home wifi etc. That works well for our full linux devices today and not sure if it's technically feasible for an esp32
...
The device broadcasts an AP, the user connects to that, enters the credentials and then the device switches to that AP.
...
I've seen other ESP devices do something similar, like this one: https://www.bhencke.com/pixelblazegettingstarted, so it seems technically feasible.

Basically create a sample that serves a web page for entering network credentials, similar to our mobile demo (which does more than wi-fi credentials.)

A non-Zephyr library I've used is called esp32-wifi-manager We could do something similar with civetweb as the webserver, dns-sd for .local discovery & settings to store credentials.

@keenanjohnson
Copy link

Awesome! Yes, I would definitely support this example!

In my experience the ESP32 is one of the most common modules used for IOT devices, so targeting that as a device would be a great start I think!

We've had some additional discussion in Discord that using a Bluetooth connection to the ESp32 from a Mobile device (IOS, Android) might be a more reliable technical solution and better for the product user because they don't have to disconnect the Bluetooth to make the Wifi Connection in case there is an error or something. I totally agree, however, my main concern is that developing and supporting two mobile apps (IOS and Android) seems like quite a daunting task.

From my perspective as a product developer my goal is to develop an MVP as fast as possible and then iterate to improve the product experience once I have validated the total product concept. So my first effort would be to choose a web UI probably and then know that I can devote more development resources to a bluetooth solution later as the product grows in success. I imagine this flow will be common for most users of Golioth. Given that I think the Web device setup demo would be critical for onboarding developers onto the product of Golioth :)

@aramix
Copy link

aramix commented Feb 10, 2022

A better option for device provisioning is smart-config and recently also easy-connect (Android/not sure about iOS).
Espressif has open-source android/iOS app for smart config. Android one is here for ex. EspTouch.
​Android source code​ and ​iOS source code​ is available.

The best thing about smart config is that it uses broadcast or multicast. And if for example you have 100 devices to provision you can use multicast and provision them at once.

1 extra point is that you don't need to have/use BT to be able to provision the device through smart-config, thus it's applicable also to ESP8266 boards

@aramix
Copy link

aramix commented Feb 10, 2022

To @keenanjohnson I'm sure by now you might have already seen that but bluetooth and wifi can coexist under different process tasks. So you don't really have to turn off BT to use wifi.
Also there are react-native and flutter libs for smart config so you can use either of them to create a cross platform app.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Status: triage
Development

No branches or pull requests

3 participants