Author Topic: ESP32 AP issues  (Read 1028 times)

0 Members and 1 Guest are viewing this topic.

Offline Tangent_TrackerTopic starter

  • Regular Contributor
  • *
  • Posts: 65
ESP32 AP issues
« on: September 18, 2025, 02:18:42 pm »
Hi folks, so I have set up an AP using <WebSocketsServer.h> and <esp_wifi.h> on an ESP32C3.
Now here's a weird thing, everything worked on my Pixel 9 at first. I was able to log into the AP, enter password and see my webpage.

Then, for some reason, I was unable to access the webpage on my GP9. I thought to try a couple of other smartphones, an old samsung, and newish Iphone and an Honor (latest model, android 15 i think) and all are able to find the webpage with no problems whatsoever.

so despite connecting to wifi no probs, I just seem unable to actually even ping my esp with the GP9!

When I connect via wifi I get the following

15:10:33.305 -> Sleep State: AWAKE, Inactive: 0s, Clients: 1
15:10:33.604 -> IP assigned: 192.168.4.2 to MAC: C0:1C:6A:76:EF:20
15:10:43.311 -> Sleep State: AWAKE, Inactive: 0s, Clients: 1

The only thing I cannot get to work on any phone is websocket so I am not getting automatic page updates...

Tried changing all parameters that I can think of to no effect...

All in Ard IDE...

Code: [Select]
  Serial.print("Setting up WiFi AP... ");
 
  IPAddress customDNS(8, 8, 8, 8);  // Google DNS
  if (!WiFi.softAPConfig(customAPIP, customGateway, customSubnet)) {
    Serial.println("Failed to configure AP!");
  } else {
    Serial.println("AP configured successfully");
  }
 
  if (!WiFi.softAP(ssid, password, 1, 0, 4)) {
    Serial.println("Failed to start AP!");
  } else {
    Serial.println("AP started successfully");
  }

  IPAddress IP = WiFi.softAPIP();
  WiFi.enableIPv6(false);
 
  // Set up HTTP server routes
  Serial.print("Setting up HTTP server... ");
server pages here......
  server.on("/settimezone", handleSetTimezone); etc etc...
  server.onNotFound(handleNotFound);
 
  server.begin();
  Serial.println("OK");
 
  // Initialize WebSocket server
  Serial.print("Starting WebSocket server... ");
  webSocket.begin();
  webSocket.onEvent(webSocketEvent);
  Serial.println("OK");

But this is a side issue... Why would my GP9 not want to talk to the ESP and how can I take things further?
 

Offline Tangent_TrackerTopic starter

  • Regular Contributor
  • *
  • Posts: 65
Re: ESP32 AP issues
« Reply #1 on: September 19, 2025, 05:30:38 pm »
Anyone else struggled with this?
 

Offline ahsrabrifat

  • Regular Contributor
  • *
  • Posts: 200
  • Country: pk
Re: ESP32 AP issues
« Reply #2 on: September 19, 2025, 05:39:28 pm »
You’ve explicitly disabled IPv6 with WiFi.enableIPv6(false). Some Pixel 9 builds can behave oddly if IPv6 is advertised but not actually routable. Try to remove that line or test both states (true/false).
 

Offline Tangent_TrackerTopic starter

  • Regular Contributor
  • *
  • Posts: 65
Re: ESP32 AP issues
« Reply #3 on: September 19, 2025, 06:02:01 pm »
Thanks, I actually did that to try to resolve the problem, but have not tried "enabled". Will give it a go!
 

Offline Tangent_TrackerTopic starter

  • Regular Contributor
  • *
  • Posts: 65
Re: ESP32 AP issues
« Reply #4 on: September 19, 2025, 06:26:00 pm »
Sadly there is no difference. Must be a security feature with the phone beyond wifi, but not sure what!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->