Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By ScottCypher
#43073 My goal is to exchange information between my ESP8266 and another device.

When I try to connect my device to the ESP8266 on 192.168.4.1 (port 80), my connection is being refused because the ESP8266 is not listening on this port.

I'm new to the ESP8266 so it's probably something minor. Any links or help would be appreciated. Here is my code:

Code: Select all#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>

const char *ssid = "Test SSID";
const char *password = "thereisnospoon";

ESP8266WebServer server(80);

void setup() {
   delay(1000);
   Serial.begin(115200);
   Serial.print("Configuring access point...");
   WiFi.softAP(ssid, password);

   IPAddress myIP = WiFi.softAPIP();
   Serial.print("AP IP address: ");
   Serial.println(myIP);
   server.begin();
   Serial.println("HTTP server started");
}

void loop() {
   server.handleClient();
}
User avatar
By martinayotte
#43194 First, we don't see any server.on() handler in your sketch.
Second, make sure that all your client devices are in STA mode only, otherwise, if they are in STA+AP, they will try to connect to themselves since they will also have an local IP 192.168.4.1.