The use of the ESP8266 in the world of IoT

User avatar
By mindrobots
#46321 Hi,

New to the forums and playing with various ESP8266 variants.

I've run into the need to connect as an IOT type device to a public Wifi network that requries you to authenticate through your browser before you have access to Internet. You might see these in hotels or other public places. When you first connect with a computer and open a browser session, you are redirected to a screen that tells you how wonderful your experience will be once you "PRESS THE BUTTON". Fine if you are in a browser session...not so good when you have a little IOT device without and interactive capabilities.

Is there a good way to navigate past this and gain Internet access?

I've searched this forum and googled for solutions but am having no luck. The best response (as far as a possible solution) was to capture the screen returned and somehow (this was left as an exercise to the user) parse through it and return the correct response.

I can't believe I'm the first person to run into this.

Any ideas out there?

Thanks!

Rick
User avatar
By torntrousers
#46667 I've done this a couple of times, by just looking at the html source for the logon web page and then emulating the logon in the ESP sketch.

One the page was just a simple html form so the sketch just needed to do a HTTP POST with the userid and password, the other was slightly more complicated as the html page included a timestamp that needed to be returned in the post to verify the page was "fresh", so the sketch needed to do an HTPP GET to find the timestamp followed by the HTTP POST with userid/password/timestamp.

The source for the first of those, which just does a POST is here, that logs on to the public FON Wifi network. The source for the second of those is here.