diff --git a/Sming/Arch/Esp32/Components/esp32/sdk/esp_system.mk b/Sming/Arch/Esp32/Components/esp32/sdk/esp_system.mk index ec7f205e94..f18108c391 100644 --- a/Sming/Arch/Esp32/Components/esp32/sdk/esp_system.mk +++ b/Sming/Arch/Esp32/Components/esp32/sdk/esp_system.mk @@ -12,10 +12,10 @@ ifndef CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE SDK_UNDEF_SYMBOLS += start_app_other_cores endif -# ld_include_panic_highint_hdl is added as an undefined symbol because otherwise the -# linker will ignore panic_highint_hdl.S as it has no other files depending on any +# ld_include_highint_hdl is added as an undefined symbol because otherwise the +# linker will ignore highint_hdl.S as it has no other files depending on any # symbols in it. -SDK_UNDEF_SYMBOLS += ld_include_panic_highint_hdl +SDK_UNDEF_SYMBOLS += ld_include_highint_hdl # IDF 5.2 SDK_WRAP_SYMBOLS += esp_newlib_init_global_stdio diff --git a/Sming/Components/Network/Arch/Esp32/Platform/AccessPointImpl.cpp b/Sming/Components/Network/Arch/Esp32/Platform/AccessPointImpl.cpp index ae783d746f..2b69133aaf 100644 --- a/Sming/Components/Network/Arch/Esp32/Platform/AccessPointImpl.cpp +++ b/Sming/Components/Network/Arch/Esp32/Platform/AccessPointImpl.cpp @@ -57,7 +57,7 @@ void AccessPointImpl::enable(bool enabled, bool save) } } ESP_ERROR_CHECK(esp_wifi_set_storage(save ? WIFI_STORAGE_FLASH : WIFI_STORAGE_RAM)); - ESP_ERROR_CHECK(esp_wifi_set_mode((wifi_mode_t)mode)); + ESP_ERROR_CHECK(esp_wifi_set_mode(mode)); } bool AccessPointImpl::isEnabled() const @@ -88,10 +88,13 @@ bool AccessPointImpl::config(const String& ssid, String password, WifiAuthMode m config.ap.authmode = (wifi_auth_mode_t)mode; config.ap.max_connection = 8; + bool enabled = isEnabled(); enable(true, false); ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &config)); - ESP_ERROR_CHECK(esp_wifi_start()); + if(enabled) { + System.queueCallback(esp_wifi_start); + } return true; }