Skip to content
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.

Captive portal #16

Open
T94T opened this issue Jan 19, 2018 · 7 comments
Open

Captive portal #16

T94T opened this issue Jan 19, 2018 · 7 comments
Assignees

Comments

@T94T
Copy link

T94T commented Jan 19, 2018

It would be great to have captive portal enabled. Just found this sketch: https://github.com/espressif/arduino-esp32/blob/615c9279f79f9f721eedc3d48b3506b3c3054492/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino
Is it possible to implement this feature in your code?

@TOLDOTECHNIK
Copy link
Contributor

TOLDOTECHNIK commented Jan 22, 2018

Just implemented the code. It is available in the PR #18

esp32 captive portal osx

Captive portal support, so you don't have to type in 192.168.4.1 in your browser again when you try to setup your device. Tested on OSX and iOS.

Ensure to call iot.dnsServer.processNextRequest(); periodically in your loop() block.

@merlinschumacher
Copy link
Contributor

I'm currently evaluating @TOLDOTECHNIK s PR. Since the DNSServer.h needed by the CaptivePortal has been added to the ESP32 Core for Arduino just 4 days ago I will to make the CaptivePortal-code optional for now. So people won't have failing projects.

@merlinschumacher
Copy link
Contributor

merlinschumacher commented Jan 22, 2018

@TOLDOTECHNIK I've merged #18 but the portal doesn't work for me on Android, iOS or Linux. This might be a problem with the Core, because the provided example CaptivePortal.ino doesn't work either. Nonetheless I merged your code. Thank you for your support.

@TOLDOTECHNIK
Copy link
Contributor

Making it optional is a very good idea. We made the tests with the newest core. One issue we discovered with an older core, is, the ESP32 gets a new IP over and over again when obtaining one from a FRITZ!Box. This issue has been gone since updating.

@merlinschumacher
Copy link
Contributor

I've updated before testing the PR, but I will test it some more

@TOLDOTECHNIK
Copy link
Contributor

Did you use the DNS update statement in your loop()?
iot.dnsServer.processNextRequest();

@merlinschumacher
Copy link
Contributor

I did.
It seems there are still issues with the DNSServer:
espressif/arduino-esp32#1011

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants