WiFiManager
WiFiManager copied to clipboard
Esp32 s3/c3 softap not working esp v2.0.3+
There are several open issues that all seem related to wifi being broken on esp32 s3 and c3, seems to work on the latest esp lib. Not sure if its a combination on wifimanager starting and stopping sta mode the ln starting softap making this hard to debug.
Solution: USE 2.0.4
Hi @tablatronix , 5 days ago i opened this issue about my esp32-c3 (#1481) I just (5 minutes ago) tried with the latest version (2.0.11-beta) but the problem persists, that is the Access Point does not "generate" the wifi network.
Thanks
Thanks yeah I am trying to gather the 3-4 issues into this one, they all seem related and hard to test. I think this is a ESP lib issue, as updating to staging fixes it
Same issue with ESP32-S2. When I flash the ESP32 Wifi AP example it creates an access point, but the "basic" example of the WifiManager does not start an access point.
@tablatronix I know you already know this, but I want to confirm that downgrading to espcore version 2.3 in the board manager solves this.
I can only get this to work on 2.0.4 sorry , fixing title typo for me everything is broken on 2.0.3 and no idea why, There might be a workaround, i have to test and see if I can stop wifi, then start softap and if that solves it, I suspect its something I am doing because noone has complained about this in normal exmaples, so I am assuming this is some kind of switching wifi sate issue
This is strange because for me the issue was on 2.0.4 and 2.0.3 fixed it
Arduino IDE, Adafruit QT Py ESP32-C3, WiFiManager 2.0.12-beta: Issue is present with Arduino-ESP32 2.0.4 No issues with Arduino-ESP32 2.0.3 Tested with WiFiManager "Basic" example
Sorry, I have a perhaps trivial question.
When you write "version 2.0.3" or "version 2.0.4" what are you referring to?
Are you referring to 2.0.3-alpha and v2.0.4-beta?
Thanks.
@Ben-Rheinland @FHanus
Hi @tablatronix, here is a hint:
Following fix in WiFiManager.cpp:717 will solve the problem on my 2.0.4 version and a ESP32S3, not sure about any side effects this might have.
// HANDLE issues with STA connections, shutdown sta if not connected, or else this will hang channel scanning and softap will not respond
if(_disableSTA || (!WiFi.isConnected() && _disableSTAConn)){
// this fixes most ap problems, however, simply doing mode(WIFI_AP) does not work if sta connection is hanging, must `wifi_station_disconnect`
WiFi_Disconnect();
/// WiFi_enableSTA(false); **<<< disable this**
#ifdef WM_DEBUG_LEVEL
DEBUG_WM(DEBUG_VERBOSE,F("Disabling STA"));
#endif
}
else {
WiFi_enableSTA(true);
}
Also the WM_NOTEMP only works for the ESP32S3_DEV board any other ESP32S3 board will fail to compile this library. We should find another way of disabling the temperature for all ESP32S3 boards in the market.
When you write "version 2.0.3" or "version 2.0.4" what are you referring to?
This is referring to the esp32 platform by espressiv, installed in Arduino IDE using the boards manager: Link to tutorial
Are you referring to 2.0.3-alpha and v2.0.4-beta?
No, I have the WiFiManager Library installed on version 2.0.12-beta.
Sorry, I have a perhaps trivial question.
When you write "version 2.0.3" or "version 2.0.4" what are you referring to?
Are you referring to 2.0.3-alpha and v2.0.4-beta?
Thanks.
@Ben-Rheinland @FHanus
Confirming what @Ben-Rheinland said
@mazgch thanks, i have disable temp sensor on all for now
201ad2e838b2fe39295bf3819a46d02c49a37279
@tablatronix I keep encountering one more issue. When the ESP runs the basic example from the WifiManager, and gets unplugged before the WiFi manager AP turns off by saving credentials (not using the reset button, but by unplugging the cable) it is impossible to connect back to the AP when it turns back on.
That might be something else, is it crashing?
I cannot even use 2.0.3 for c3 on platformio, it just boot loops
That might be something else, is it crashing?
I cannot even use 2.0.3 for c3 on platformio, it just boot loops
That's the thing, after this forced reboot it goes to the same old problem of being stuck on the ESP printing out that zero clients are connected.
hmmmmmmm lol
I have a patch to fix a wifi not init issue , let me see if that can help.
ok so 2.0.3 esp c3 does not work afaik, and there is no patch until 2.0.4 I could be wrong.
https://github.com/espressif/arduino-esp32/issues/6862#issuecomment-1175926313
So if you are running 2.0.3 the bootloader is all fucked
@mazgch thanks, i have disable temp sensor on all for now
Were you able to confirm that commenting line WiFiManager.cpp:717 solved the startup issue, is my proposal a safe patch or do you see major side effects?
Yeah same change, its not needed for anything, and i have no idea how to cleanly detect board
I give up for now, I cannot get a damn thing to work on this c3... Really pissing me off now
ELF file SHA256: 0000000000000000
Rebooting...
ESP-ROM:esp32c3-20200918
Build:Sep 18 2020
rst:0x3 (RTC_SW_SYS_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40381976
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x438
load:0x403ce000,len:0x918
load:0x403d0000,len:0x24e4
SHA-256 comparison failed:
Calculated: 080c5cb68a075ced55f248b97bca965e3e5bd5da80a64e34e6a1638f89d6f64e
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403ce000
*wm:[1] AutoConnect
Guru Meditation Error: Core 0 panic'ed (Illegal instruction). Exception was unhandled.
Core 0 register dump:
MEPC : 0x40001be4 RA : 0x42071f60 SP : 0x3fca3e00 GP : 0x3fc8ea00
TP : 0x3fc863f4 T0 : 0x40057fa6 T1 : 0x40383628 T2 : 0xffffffff
S0/FP : 0x3fc95a98 S1 : 0x40383b00 A0 : 0x3fc8fc34 A1 : 0x40383a02
A2 : 0x40385288 A3 : 0x40383744 A4 : 0x4038377c A5 : 0x3fcdf4f8
A6 : 0x40383812 A7 : 0x403837e6 S2 : 0x3c0abc1c S3 : 0x00000000
*wm:[3] WiFi_enableSTA enable
Guru Meditation Error: Core 0 panic'ed (Illegal instruction). Exception was unhandled.
Core 0 register dump:
MEPC : 0x40001be4 RA : 0x42071e7c SP : 0x3fca2a90 GP : 0x3fc8ea00
TP : 0x3fc85130 T0 : 0x40057fa6 T1 : 0x40383628 T2 : 0xffffffff
S0/FP : 0x3fc95a98 S1 : 0x40383b00 A0 : 0x3fc8fc34 A1 : 0x40383a02
A2 : 0x40385288 A3 : 0x40383744 A4 : 0x4038377c A5 : 0x3fcdf4f8
Good news, my c3 devkit is garbage, I have another c3 board and it works, and i can reproduce this AND my previous suggestion does indeed work.. Still not sure why though...
There is something wrong with turning off STA , I will figure it out and have a real fix
bool _disableSTAConn = false; // disable sta when starting ap, if sta is not connected ( stability )
I can't get AP to work in ESP 2.0.4 and WifiManager 2.0.12-beta on ESP32-C3.
Even WiFiManager.cpp:717 patch does not work.
I have not fixed it yet but you can do the .h mod i mentioned above a d see if that works
I have tried the _disableSTAConn=false
mod, but still no AP. It's really late here, I will try a clean experiment tomorrow.
Ok thanks for letting me know
I have done a clean install via platformio. This is my platformio.ini:
[env:local]
platform=espressif32
framework = arduino
board = esp32-c3-devkitm-1
board_build.f_cpu = 160000000L
lib_deps = https://github.com/tzapu/WiFiManager.git
I am sure platformio pulls in esp32 core 2.0.4
I have added bool _disableSTAConn = false;
hack into WiFiManager.h
Now if I have WiFi.mode(WIFI_STA);
in my setup()
function, I can't get AP to run, but if I change it to WiFi.mode(WIFI_AP)
the AP starts up.
Yeah there is something very wrong with changing modes, and even stranger no error on startap.. I have no idea whats going on. afaik its only the c3.. I will keep testing my guess is we are going to need something like an intermediate wifi_off or wifi_stop raw calls, or there is a missing event in the arduino esp handler maybe..
Now if I have
WiFi.mode(WIFI_STA);
in mysetup()
function, I can't get AP to run, but if I change it toWiFi.mode(WIFI_AP)
the AP starts up.
Thanks Miceuz, I wasn't able to get the config portal to run on ESP32-S2 for ages — using WIFI_AP
instead of WIFI_STA
got me there!
Now if I have
WiFi.mode(WIFI_STA);
in mysetup()
function, I can't get AP to run, but if I change it toWiFi.mode(WIFI_AP)
the AP starts up.
I had the same issue with S2. I tried bool _disableSTAConn = false;
and so far so good.