Hi folks, so I have a small project with an esp32 acting as an AP. It initially worked on my google phone but now for some reason I cannot connecting to the AP via webpage. This does work with an Iphone, an Honor mobile (android 15 I think) and an ancient samsung.
I can connect the wifi no problem, but the following page…
On my ISP-supplied WiFi 6 and 6e router, I have no access to 192.168.4.1. That is supposed to be the universal AP, but that address does not exist on my router. When I try it, I get an ISP error page.
I also have no web access like we used to, the router is managed with the eero app. It shows 192.168.4.1 is the Gateway eero IP Address.
I was wondering if the phone has done something similar.
NOPE, I did a test the other day to see if I could change the 192.168.4.1 but was not successful. Here is a screenshot of some of the info. As you can see 192.168.4.1 is already assigned. This is the main router attached to the modem.
And here is what I see when I enter 192.168.4.1 as the address in the browser. His phone may be doing something similar. I don't know when the routes were changed, if they were changed, regarding the special address 192.168.4.1, but that is what is happening.
@mil24 Try this code to change the captive portal address of 192.168.4.1 to something else. I chose 192.168.4.253 (254 and 255 are special I think)
#include <WiFi.h> // For ESP32
// #include <ESP8266WiFi.h> // For ESP8266 instead
const char* ssid = "MyESP_AP";
const char* password = "12345678";
// Set custom IP info
IPAddress local_IP(192, 168, 4, 253); // The AP's own IP (default was 192.168.4.1)
IPAddress gateway(192, 168, 4, 253); // Gateway is usually same as AP
IPAddress subnet(255, 255, 255, 0);
void setup() {
Serial.begin(115200);
// Configure AP with custom IP
if (!WiFi.softAPConfig(local_IP, gateway, subnet)) {
Serial.println("AP Config Failed!");
}
// Start AP
if (WiFi.softAP(ssid, password)) {
Serial.println("AP Started");
Serial.print("IP address: ");
Serial.println(WiFi.softAPIP());
} else {
Serial.println("AP Start Failed!");
}
}
void loop() {
// Your code here
}
I'm not familiar with Apple but I guess that you're getting a HTTP reply from http://192.168.4.1, it is just that it is a "forbidden" reply, not what you expected.
Is there a particular reason you're using 255.255.252.0 subnet mask? Although it is valid, most likely your home network is just misconfigured. You probably wanted to assign 255.255.255.0, which is still good for 254 different IP addresses.