Go Down

Topic: [ESP8266+Mega2560] Connect to network with login webpage (Read 72 times) previous topic - next topic

Javifa

Hello all. I'm having some trouble with my Arduino Mega2560 and the ESP8266, and I'm seeking for some help.
I've done a project where I use the Mega2560, with the ESP8266-01 and a SHT15 sensor, and I send data to ThingSpeak. It works fine at my house, where I can connect to my network with no problems, I just need to type on the program's code the SSID and Pass of my network.
The thing is that I'm trying to bring the Arduino to my university and I can't connect to the network there. The network at my uni requires to login with an username and password to a webpage in order to have access to internet. I have an username and password, but I don't know if there is a way to put that info on the program's code to login to the page. So I'm asking, is there a way to connect with Arduino to that kind of network?

PaulS

Usually what happens when you make a GET request to a site that redirects to a login page is that, when you have entered valid data, the server sends you a cookie with an authorization token. All GET requests need to include that authorization token to prove that you have been authenticated.

You'll be learning all about reading cookie data from the server, and figuring out how the Arduino is going to persist the cookie data, and for how long.

When you make the first GET request, to the login page, you can usually supply the user name and password values, if you know the names of the text fields that the values should be in.
The art of getting good answers lies in asking good questions.

tjones9163

I use my NodeMCU with ESP8266 with my BLYNK app on android. Does the code you are running in the Arduino IDE ask you for an authentication token? What I realized with using the nodeMCU and blink is that the Arduino IDE code requested an Identification token that I later realized ( Each authentication code is specific to that SSID and p.w) For example you cannot create a sketch using a certain ID code then expect to use that same ID code on another network.
Hope that helped, if not sorry.

Go Up