An archive of community.esquilo.io as of Saturday January 26, 2019.

# Public wifi or captive wifi

patelH

Hello all!

I am enjoying the Esquilo---kudos to the team!

Anyway, I managed to get the Esquilo working at home on my wifi network, however, I attempted to do the same on our corporate "guest" network but failed. The main reason being that the "guest" network is "open" but requires a user to input credentials on a web-page. How do I get past this?

Thanks and regards,
Hitesh

patrick

Thanks for the the kudos, Hitesh. We appreciate it and are glad you are enjoying the board.

We don't have a good way to get around the captive portal issue. I've read that a lot of times these are forms that simply whitelist your MAC address in some router after you enter credentials. Some suggest asking your IT department to manually add the MAC to the whitelist.

I haven't tried it yet, but I suppose some HTTP client code could be written in Squirrel to post the credentials. That would probably require snooping a POST that you do from a computer so you'd know what the URL and POST parameters are.

http://www.esquilo.io/docs/#esquilo-library-httpc

I've been planning to try something like this at Starbucks, but haven't tried it yet.

patelH

Patrick,
Thanks for your input. I will see what I can do using HTTP client side---MAC whitelisting is next to an impossibility. I'll post if I learn something.
Regards,
Hitesh

patelH

Patrick,

I have looked further into this and have reached the limits of my knowledge. I hope you can guide me. Anyway, what I found out is that the wifi network is "open" but on first access there is authentication required via the company website. This "login" page contains Javascript that has a form "submit" function once the user enters the uid/pwd and presses submit. One final note, all this is happening on https. How can this be done on Esquilo, if at all?

Thanks,
Hitesh

patrick

That sounds promising. First you need to get the post URL and what the fields are. Easiest way to do that is problem with the Chrome debugger. Bring up the "Network" tab and filter on "XHR". Then look for the post request and see what the URL is and what the form data looks like.

Here's an example post page and a capture:
http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_post2

See "General->Request URL" (top) and Form Data (bottom).

Then you can replicate the post in esquilo:

http <- HTTPC("www.w3schools.com")
http.post("/ajax/demo_post2.asp", {fname="Henry", lname="Ford"}, HTTPC_URLENCODE)
<p>
Hello Henry Ford
</p>

The HTTP client is documented here:
http://www.esquilo.io/docs/#esquilo-library-httpc

patelH

Thanks, Patrick.

Still looking into this but there appear to be basic issues I am fighting right now. Such as connecting to the network. Appears that the link is up but an attempt to do an HTTPC causes "connect error". Logs indicate "ERROR Connect error 0x1649". BTW, I am running EOS 0.5 of the Esquilo firmware. Any thoughts on this?

Scott_Shumate

Connect error 0x1649 is a connection timeout error. That means that the server did not respond to Esquilo's attempts to connect to it. Double check your host name and path to make sure they are valid. On a PC, try pinging the server and replicating the request with a web browser. You can also post your code and we can sanity check it.