[GH-ISSUE #799] SSID in AP mode not visible on ESP32 DOIT DEVKITV1 [SOLVED] #667

Closed
opened 2026-02-28 01:26:29 +03:00 by kerem · 12 comments
Owner

Originally created by @amontefusco on GitHub (Jan 4, 2019).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/799

Basic Infos

Hardware

WiFimanager Branch/Release:

  • Master
  • [ X] Development

Esp8266/Esp32:

  • ESP8266
  • [ X] ESP32

Hardware: ESP-12e, esp01, esp25

  • ESP01
  • ESP12 E/F/S (nodemcu, wemos, feather)
  • [ X] Other

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • [ X] 2.4.0
  • staging (master/dev)

Description

Looking to the console the sketch seems to work fine; however the SSID that should be generated is not visible from any PC/tablet.
Even configuring my NetworkManager in order to connect to an hidden SSID (ESP32_af2de6b4), doesn't make the situation better.

Settings in IDE

Module: ESP32 DEVMODULE

Additional libraries:
WiFiManager

Sketch

// LED will blink when in config mode

#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager

//for LED status
#include <Ticker.h>
Ticker ticker;
int LED = BUILTIN_LED;

void tick()
{
  //toggle state
  digitalWrite(LED, !digitalRead(LED));     // set pin to the opposite state
}

//gets called when WiFiManager enters configuration mode
void configModeCallback (WiFiManager *myWiFiManager) {
  Serial.println("Entered config mode");
  Serial.println(WiFi.softAPIP());
  //if you used auto generated SSID, print it
  Serial.printf("[%s]\n", myWiFiManager->getConfigPortalSSID().// LED will blink when in config mode

#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager

//for LED status
#include <Ticker.h>
Ticker ticker;
int LED = BUILTIN_LED;

void tick()
{
  //toggle state
  digitalWrite(LED, !digitalRead(LED));     // set pin to the opposite state
}

//gets called when WiFiManager enters configuration mode
void configModeCallback (WiFiManager *myWiFiManager) {
  Serial.println("Entered config mode");
  Serial.println(WiFi.softAPIP());
  //if you used auto generated SSID, print it
  Serial.printf("[%s]\n", myWiFiManager->getConfigPortalSSID().c_str());
  //entered config mode, make led toggle faster
  ticker.attach(0.2, tick);
}

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  
  //set led pin as output
  pinMode(LED, OUTPUT);
  // start ticker with 0.5 because we start in AP mode and try to connect
  ticker.attach(0.6, tick);

  //WiFiManager
  //Local intialization. Once its business is done, there is no need to keep it around
  WiFiManager wm;
  //reset settings - for testing
  wm.resetSettings();
WiFi.mode(WIFI_AP); 
  //set callback that gets called when connecting to previous WiFi fails, and enters Access Point mode
  wm.setAPCallback(configModeCallback);

  //fetches ssid and pass and tries to connect
  //if it does not connect it starts an access point with the specified name
  //here  "AutoConnectAP"
  //and goes into a blocking loop awaiting configuration
  if (!wm.autoConnect()) {
    Serial.println("failed to connect and hit timeout");
    //reset and try again, or maybe put it to deep sleep
    ESP.restart();
    delay(1000);
  }

  //if you get here you have connected to the WiFi
  Serial.println("connected...yeey :)");
  ticker.detach();
  //keep LED on
  digitalWrite(LED, LOW);
}

void loop() {
  // put your main code here, to run repeatedly:

}

Debug Messages

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:808
load:0x40078000,len:6084
load:0x40080000,len:6696
entry 0x400802e4
*WM: [1] SETTINGS ERASED 
*WM: [3] WiFi station enable 
*WM: [1] AutoConnect 
*WM: [2] ESP32 event handler enabled 
*WM: [2] Connecting as wifi client... 
*WM: [2] setSTAConfig static ip not set 
*WM: [3] WIFI station disconnect 
*WM: [1] No saved credentials, skipping wifi 
*WM: [2] Connection result: WL_NO_SSID_AVAIL
*WM: [3] lastconxresult: WL_NO_SSID_AVAIL
*WM: [1] AutoConnect: FAILED 
*WM: [3] WIFI station disconnect 
*WM: [3] WiFi station enable 
*WM: [2] Disabling STA 
*WM: [2] Enabling AP 
*WM: [1] StartAP with SSID:  ESP32_af2de6b4
*WM: [2] AP has anonymous access! 
*WM: [1] AP IP address: 192.168.4.1
Entered config mode
192.168.4.1
[ESP32_af2de6b4]
*WM: [3] setupConfigPortal 
*WM: [1] Starting Web Portal 
*WM: [3] dns server started with ip:  192.168.4.1
*WM: [2] HTTP server started 
*WM: [2] WiFi Scan ASYNC started 
*WM: [2] Config Portal Running, blocking, waiting for clients... 
Originally created by @amontefusco on GitHub (Jan 4, 2019). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/799 ### Basic Infos #### Hardware **WiFimanager Branch/Release:** - [ ] Master - [ X] Development **Esp8266/Esp32:** - [ ] ESP8266 - [ X] ESP32 **Hardware: ESP-12e, esp01, esp25** - [ ] ESP01 - [ ] ESP12 E/F/S (nodemcu, wemos, feather) - [ X] Other **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [ X] 2.4.0 - [ ] staging (master/dev) ### Description Looking to the console the sketch seems to work fine; however the SSID that should be generated is not visible from any PC/tablet. Even configuring my NetworkManager in order to connect to an hidden SSID (ESP32_af2de6b4), doesn't make the situation better. ### Settings in IDE Module: ESP32 DEVMODULE Additional libraries: WiFiManager ### Sketch ```cpp // LED will blink when in config mode #include <WiFiManager.h> // https://github.com/tzapu/WiFiManager //for LED status #include <Ticker.h> Ticker ticker; int LED = BUILTIN_LED; void tick() { //toggle state digitalWrite(LED, !digitalRead(LED)); // set pin to the opposite state } //gets called when WiFiManager enters configuration mode void configModeCallback (WiFiManager *myWiFiManager) { Serial.println("Entered config mode"); Serial.println(WiFi.softAPIP()); //if you used auto generated SSID, print it Serial.printf("[%s]\n", myWiFiManager->getConfigPortalSSID().// LED will blink when in config mode #include <WiFiManager.h> // https://github.com/tzapu/WiFiManager //for LED status #include <Ticker.h> Ticker ticker; int LED = BUILTIN_LED; void tick() { //toggle state digitalWrite(LED, !digitalRead(LED)); // set pin to the opposite state } //gets called when WiFiManager enters configuration mode void configModeCallback (WiFiManager *myWiFiManager) { Serial.println("Entered config mode"); Serial.println(WiFi.softAPIP()); //if you used auto generated SSID, print it Serial.printf("[%s]\n", myWiFiManager->getConfigPortalSSID().c_str()); //entered config mode, make led toggle faster ticker.attach(0.2, tick); } void setup() { // put your setup code here, to run once: Serial.begin(115200); //set led pin as output pinMode(LED, OUTPUT); // start ticker with 0.5 because we start in AP mode and try to connect ticker.attach(0.6, tick); //WiFiManager //Local intialization. Once its business is done, there is no need to keep it around WiFiManager wm; //reset settings - for testing wm.resetSettings(); WiFi.mode(WIFI_AP); //set callback that gets called when connecting to previous WiFi fails, and enters Access Point mode wm.setAPCallback(configModeCallback); //fetches ssid and pass and tries to connect //if it does not connect it starts an access point with the specified name //here "AutoConnectAP" //and goes into a blocking loop awaiting configuration if (!wm.autoConnect()) { Serial.println("failed to connect and hit timeout"); //reset and try again, or maybe put it to deep sleep ESP.restart(); delay(1000); } //if you get here you have connected to the WiFi Serial.println("connected...yeey :)"); ticker.detach(); //keep LED on digitalWrite(LED, LOW); } void loop() { // put your main code here, to run repeatedly: } ``` ### Debug Messages ``` rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0018,len:4 load:0x3fff001c,len:808 load:0x40078000,len:6084 load:0x40080000,len:6696 entry 0x400802e4 *WM: [1] SETTINGS ERASED *WM: [3] WiFi station enable *WM: [1] AutoConnect *WM: [2] ESP32 event handler enabled *WM: [2] Connecting as wifi client... *WM: [2] setSTAConfig static ip not set *WM: [3] WIFI station disconnect *WM: [1] No saved credentials, skipping wifi *WM: [2] Connection result: WL_NO_SSID_AVAIL *WM: [3] lastconxresult: WL_NO_SSID_AVAIL *WM: [1] AutoConnect: FAILED *WM: [3] WIFI station disconnect *WM: [3] WiFi station enable *WM: [2] Disabling STA *WM: [2] Enabling AP *WM: [1] StartAP with SSID: ESP32_af2de6b4 *WM: [2] AP has anonymous access! *WM: [1] AP IP address: 192.168.4.1 Entered config mode 192.168.4.1 [ESP32_af2de6b4] *WM: [3] setupConfigPortal *WM: [1] Starting Web Portal *WM: [3] dns server started with ip: 192.168.4.1 *WM: [2] HTTP server started *WM: [2] WiFi Scan ASYNC started *WM: [2] Config Portal Running, blocking, waiting for clients... ```
kerem 2026-02-28 01:26:29 +03:00
Author
Owner

@amontefusco commented on GitHub (Jan 4, 2019):

I tested above on three different boards: two from DOIT from Amazon, another one marked "ESP32 DEVKIT V1" (a cheap one coming from Banggood).

Same results as above on all.
When initialized with explicit SSID/password everything works.

<!-- gh-comment-id:451498315 --> @amontefusco commented on GitHub (Jan 4, 2019): I tested above on three different boards: two from DOIT from Amazon, another one marked "ESP32 DEVKIT V1" (a cheap one coming from Banggood). Same results as above on all. When initialized with explicit SSID/password everything works.
Author
Owner

@tablatronix commented on GitHub (Jan 4, 2019):

your code is all messed up, you have 2 loops, can you repost it ? ( oh maybe pasted twice )
Or just use the examples?

<!-- gh-comment-id:451508620 --> @tablatronix commented on GitHub (Jan 4, 2019): your code is all messed up, you have 2 loops, can you repost it ? ( oh maybe pasted twice ) Or just use the examples?
Author
Owner

@tablatronix commented on GitHub (Jan 4, 2019):

let me grab an esp32 and test real quick

<!-- gh-comment-id:451509332 --> @tablatronix commented on GitHub (Jan 4, 2019): let me grab an esp32 and test real quick
Author
Owner

@tablatronix commented on GitHub (Jan 4, 2019):

working for me, on macbook and iphone

maybe see if manually use an _ and see if it cannot see that one either ?

what device?

<!-- gh-comment-id:451511173 --> @tablatronix commented on GitHub (Jan 4, 2019): working for me, on macbook and iphone maybe see if manually use an _ and see if it cannot see that one either ? what device?
Author
Owner

@amontefusco commented on GitHub (Jan 4, 2019):

I tested above on three different boards: two from DOIT from Amazon, another one marked "ESP32 DEVKIT V1" (a cheap one coming from Banggood).

Same results as above on all.
When initialized with explicit SSID/password everything works.

your code is all messed up, you have 2 loops, can you repost it ? ( oh maybe pasted twice )
Or just use the examples?

I just used your example.

<!-- gh-comment-id:451512449 --> @amontefusco commented on GitHub (Jan 4, 2019): I tested above on three different boards: two from DOIT from Amazon, another one marked "ESP32 DEVKIT V1" (a cheap one coming from Banggood). Same results as above on all. When initialized with explicit SSID/password everything works. > your code is all messed up, you have 2 loops, can you repost it ? ( oh maybe pasted twice ) > Or just use the examples? I just used your example.
Author
Owner

@amontefusco commented on GitHub (Jan 4, 2019):

working for me, on macbook and iphone

I'm using a Linux workstation and a Wifi scanner on Android: the two are in good accord, they show the same networks (even the hidden ones).

maybe see if manually use an _ and see if it cannot see that one either ?
what device?

Sorry, it is not clear to me what you are suggesting.

<!-- gh-comment-id:451513450 --> @amontefusco commented on GitHub (Jan 4, 2019): >>> working for me, on macbook and iphone I'm using a Linux workstation and a Wifi scanner on Android: the two are in good accord, they show the same networks (even the hidden ones). >>> maybe see if manually use an _ and see if it cannot see that one either ? >>> what device? Sorry, it is not clear to me what you are suggesting.
Author
Owner

@amontefusco commented on GitHub (Jan 4, 2019):

In the meantime, I found inside one of my drawers another ESP32.
Apparently, this one is identical to the three marked

DOIT
ESP32 DEVKIT V1

But this one is working!
Both with your example and my code.
So, it seems there is some hardware dependency.

Where is your ESP32 coming from?

<!-- gh-comment-id:451514591 --> @amontefusco commented on GitHub (Jan 4, 2019): In the meantime, I found inside one of my drawers another ESP32. Apparently, this one is identical to the three marked DOIT ESP32 DEVKIT V1 But this one is working! Both with your example and my code. So, it seems there is some hardware dependency. Where is your ESP32 coming from?
Author
Owner

@tablatronix commented on GitHub (Jan 4, 2019):

which example?

You might want to try a full erase of those modules, might be old version flash segmentation

<!-- gh-comment-id:451516110 --> @tablatronix commented on GitHub (Jan 4, 2019): which example? You might want to try a full erase of those modules, might be old version flash segmentation
Author
Owner

@amontefusco commented on GitHub (Jan 4, 2019):

which example?

AutoConnectWithFeedbackLED.ino

(BTW, I fixed my first message with the right code)

You might want to try a full erase of those modules, might be old version flash segmentation

I'll do that.

<!-- gh-comment-id:451526661 --> @amontefusco commented on GitHub (Jan 4, 2019): >>> which example? AutoConnectWithFeedbackLED.ino (BTW, I fixed my first message with the right code) >>>You might want to try a full erase of those modules, might be old version flash segmentation I'll do that.
Author
Owner

@tablatronix commented on GitHub (Jan 4, 2019):

let me know how it goes

<!-- gh-comment-id:451534392 --> @tablatronix commented on GitHub (Jan 4, 2019): let me know how it goes
Author
Owner

@tablatronix commented on GitHub (Jan 4, 2019):

could it be not showing them cause they are anonymous ?
try a blank password with static ssid ?

<!-- gh-comment-id:451534766 --> @tablatronix commented on GitHub (Jan 4, 2019): could it be not showing them cause they are anonymous ? try a blank password with static ssid ?
Author
Owner

@amontefusco commented on GitHub (Jan 4, 2019):

You might want to try a full erase of those modules, might be old version flash segmentation

You nailed it!

I made a full erase on the three modules giving problems with the following command:

~/arduino-1.8.1$ ./hardware/espressif/esp32/tools/esptool.py  -p /dev/ttyUSB0 -b 460800  erase_flash

And now I have WiFiManager working fine on all my modules. Irrespective of the producer and chip revision.

Many thanks for the library and the good support!

<!-- gh-comment-id:451537718 --> @amontefusco commented on GitHub (Jan 4, 2019): >>> You might want to try a full erase of those modules, might be old version flash segmentation You nailed it! I made a full erase on the three modules giving problems with the following command: ``` ~/arduino-1.8.1$ ./hardware/espressif/esp32/tools/esptool.py -p /dev/ttyUSB0 -b 460800 erase_flash ``` And now I have WiFiManager working fine on all my modules. Irrespective of the producer and chip revision. Many thanks for the library and the good support!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#667
No description provided.