-
Hi,
I did some googling last night. What I'm looking for is called a 'captive portal' it turns out.
I found this post about it http://www.esp8266.com/viewtopic.php?p=23857 but its using native code which I don't understand (yet);
And I found this https://github.com/espruino/Espruino/issues/590 which mentions dns redirect as being supported. So I'm wondering if I use the code in this post but use the * wildcard for the host lookup it might work?
Thoughts?
-
-
-
-
Hi, i feared that may be the case.
This the article and it does mention a dns http://hackaday.com/2015/05/03/esp8266-wifi-throwies/
So is there no dns capabilities in espurino at the moment?
-
@Ollie, you replied as i was typing!
Ok, that rings a bell about connecting as that ip address, now how about the other request. It redirecting all other address requests to the same page hosted on the device?
Thanks again guys.
-
Ok. I can see localhost not working.
I simply want to connect to the esp8266 as an access point using my phone. I then want to be able to go to a page or site hosted on the esp8266 by typing the correct address into the address bar. What should this address be?
Ideally i would like to be able to type any address and have the esp8266 redirect that reqest to same basic page....like when you log into a secure wifi hotspot and it redirects to the login page. So a user connects to the esp8266, types http://www.google.com, but gets redirected to 'hello world'. I saw on hackaday some did a wifi throwy project that did this, but this was using nodemcu and lua. I wondered if it were possible on espurino.
Thanks for the help so far.
-
I've got it set up in ap+station mode for now.
I can set up the webserver so that when I browse to the ip at the correct port I get 'hello world'.
but I connect to the ap and the then go to http://localhost:80 or http://:80 I get nothing.
I really want it so that whatever address i put in once connected gets redirected to my 'hello world' page
does that make sense
-
Hi,
I'm just getting started on espurino and the esp8266 and have a few questions.
I've successfully got espurino set and running on an esp8266. I would like to have it set as an access point so that when someone connects to it, they are automatically redirected to page that is served by the esp8266 using the http server.
is this possible? I can connect to it, but can't figure out how to then use the webserver functionality along with it.
Any help would be greatly received.
Thanks
-
the second on is correct.
after creating the wifi object (the first line), you should be able to do something like wifi.getStatus() to actually get some info back from it to confirm its working