Skip to content

how to reset and go back to captive portal? #35

@wjquigs11

Description

@wjquigs11

Is there a way to reliably reset the wifi configuration so that the MCU goes back into captive portal?
I have tried both NW.erase() and NW.reset() (followed by a 1-second delay and ESP.restart() but when I try to reset this way I consistently get an error
E (1516) wifi_init_default: netstack cb reg failed with 12308

However, I don't know if this is a problem with NetWizard, or a problem with the ESP32 TCP library code, because if I enable debugging with these flags, the issue goes away:
-D CORE_DEBUG_LEVEL=5
-D CONFIG_ESP_WIFI_LOG_LEVEL=5
-D CONFIG_ESP_WIFI_DEBUG_PRINT=1
-D ARDUHAL_LOG_LEVEL=5
-D CONFIG_ARDUHAL_LOG_COLORS=1
-D ESP_PLATFORM=1
-D ARDUINO_ESP32_DEV=1
-D DEBUG_ESP_WIFI=1
-D DEBUG_ESP_PORT=Serial
Setting log level = 3 or 4 also causes the issue, so it's quite timing-dependent. Whatever the additional logging is doing is causing enough delay to mask the problem.
Also, it occurs whether or not ASYNC TCP is enabled.

I've attached my platformio.ini (as .txt) for reference.

platformio.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions