-->
Page 1 of 1

ESP8266 wifi connection to Third party Captive portal

PostPosted: Tue Jun 22, 2021 1:19 am
by Harjeet Singh
Hello Guys,
I manage to connect wifi through Captive portal of ESP8266.
Now we need to connect to our customer wifi, They have firewall and safety inplace. therefor first we need to connect to the guest wifi then it opens the login page where we need to enter the seperate credentials and accept the policy by clicking on agree / ok button.
It means we first need to connect to guest wifi then need to enter user name and password on webpage then click ok to get though this.
Could not find proper solution, some guys talked about it over internet but no solution. :?:

Re: ESP8266 wifi connection to Third party Captive portal

PostPosted: Tue Jun 22, 2021 6:44 pm
by davydnorris
The simplest solution is to get them to create a dedicated user and complex password for your device that will let you connect straight away. Then you can supply the credentials directly in whatever way they have defined.

Some organisations can set up a guest network and restrict it to a whitelist of MAC addresses and allow direct connection without login. This also works really well.

The key thing is you will need to talk to them about how credentials are supplied, and whether you can send them with a single request. Otherwise you're going to have to analyse their login process and work out what sequence of web calls you have to make

Re: ESP8266 wifi connection to Third party Captive portal

PostPosted: Tue Jun 22, 2021 10:36 pm
by Harjeet Singh
Thanks! davydnorris for insight.
I believe smart people from this community must have done this. Just need to know the procedure or script to be at safer side :D

Re: ESP8266 wifi connection to Third party Captive portal

PostPosted: Wed Jun 23, 2021 7:48 pm
by davydnorris
There will be no one script because there's no standard approach to a custom login on a captive portal.

I have seen at least 5 different ways that people do it
- not assigning an IP address until you are authenticated
- not responding to DNS requests until you are authenticated
- whitelisting the assigned IP address in a firewall once authenticated
- setting a web session cookie once authenticated
- sending autoproxy info once authenticated

Every one is different :-(