You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • With what do you

    connect to the ap and then go to localhost:80 or http://:80

    ?

    localhost (or 127.0.0.1) is (with defaults) always the host on which the http request is made on.

    If you do it with a browser, localhost is the machine where your browser runs on. If it is a different ESP8266 then your access point, this different_ESP8266_then_your_access_point­ is the local host.

    If it is the ESP8266 that is your access point on which you try to create a connection to localhost, I don't know what that yields... if any thing at all, because you have now three things going on: the access point that maintains the Wifi network with given SSID (and DHCP service), a Web server, AND a client of the Web server - the client that wants to connect to the Wifi, and send an http(s) request and expects a response.

    I assume, only access point and Web server run on the ESP8266, and the page request is made from a device other than the access point device, such as from a mobile or desktop browser.

    In this case, your Web server gets (from DHCP service) - or sets - an IP address, and you have to connect to that IP address in the http request... You can give the Web server (connection) a fixed IP address (when not using DHCP) or a host name and use either one of those in the http request.

About

Avatar for allObjects @allObjects started