-->
Page 1 of 1

Connecting to public WiFi with an ESP8266

PostPosted: Thu Oct 17, 2019 7:44 pm
by Alan-bc
To keep a long story short, I need to email myself the current temperature.

To that end, I've took an ESP8266 board and connected up a Dallas One-Wire sensor. I've written a wee bit of code .. (actually, tweaked other people's code) .. to connect to my home WiFi, embedding the SSID and password in the code.

It works great! Press the rest button and within a few seconds, an email appears with the current temperature as read from the sensor.

However, I don't want to do this at home, I want to do it from a remote location.

Thankfully, there is free Open WiFi available at the remote location provided by the city (Vancouver, B.C.)

Sadly, that WiFi requires me to click "OK" to agree to the Terms and Conditions.

That is, when I select #VanWiFi using my notebook, a web browser is automatically started and a web page loaded that requires an "OK". I click OK and all is well.

So here's the question: Is it possible for an ESP8266 to "click OK" ?

Any hints appreciated. Any actual code really appreciated as I'm not much of a C programmer.

Alan

Re: Connecting to public WiFi with an ESP8266

PostPosted: Fri Oct 18, 2019 2:41 am
by btidey
What you are describing to access wifi is called a Captive portal.

Check out https://yoursunny.com/t/2017/ESP8266-captive-login/

Re: Connecting to public WiFi with an ESP8266

PostPosted: Fri Oct 18, 2019 6:15 am
by schufti
usually this 'OK' button is redirecting to another url, so you just either call this url directly (if static) or have to parse the startpage for the dynamic url of the "OK" button to call it.