New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Captive Portal to enter AccessPoint credentials #1221
Comments
Ideally, I'd like to make There's an |
Just an idea here: It would be cool if the wifi capable Espruino firmware 'shipped' with such a thing built-in and the only thing the user would have to do to start working with such a board would just be to plug it in a USB and connect to it using his dev machine/phone. It could give the user a choice to connect to his wifi router and provide the Espruino IDE links (or even redirects) allowing for a smooth onboarding. Once router-connected it could advertise itself as an Espruino capable via mDNS (just like the esp8226 version does at the moment) and allow for local discoverability. |
Yes, that's what I'd been thinking as well. I've been experimenting with compiling in JS code, and it works pretty well - so that could be a good option for this I think. |
Great, so this will be a cool firmware enhancement! |
I think a more useful variant of having a captive portal is to have a captiveForm
This allows user to setup their on captive form or use the default form Note: 'captiveForm' is a name of a 'Storage' file/item |
Personally I think this is more of a getting started thing that we'd want pre-installed - so customisation wouldn't be a big deal as long as it was easy for people to change the code to roll their own? Once configured, potentially we could also look at using this to serve up an iframe to espruino.com/ide with a websocket server for the IDE? It shouldn't actually require much code. |
I've extended your starting code: https://gist.github.com/wilberforce/cc6025a535b8a4c7e2910d4ba7845f11 It scans for wifi ssid, adds that to the drop list, and allows you to enter a password and connect to the network. Still very much proof of concept....
Might use too much space on the ESP8266, but more useful on the ESP32 or Espruino Wifi perhaps (I don't have one to test with) |
Very nice. If this went into flash (which it would) then it could hopefully be tweaked such that it didn't use any RAM once WiFi had been connected? |
Yes. I would like to use the Storage module to save a list of known access points and passwords. Then on start up: Test for conection. If ok done. I might be over complicating things here! So extending the concept of wifi.save to work with known existing networks, and only on failure do the captive portal. |
Wow - great work |
time to close it ;-) |
Started to work on Captive Portal to enter SSID and Password to easily connect a Wifi enable Espruino device to a local AP. All this is based on UPD dgram from @opichals .
[-] implement a wrapper module for all wifi devices
[x] setup dns server to handle IP4 request
[x] with own ip
[x] setup http server
[x] redirect to own http server
[-] present page to enter SSID and Password
[-] create a CaptivePortal JS module
First version of CaptivePortal.js is still ESP specific because the first topic is missing.
@gfwilliams What are your thoughts about such a wifi device wrapper?
Any hints, comments or wishes are welcome.
The text was updated successfully, but these errors were encountered: