Skip to content

Commit b2a469d

Browse files
AdrianSoundynfbot
andauthored
Fix hang when AP configured on latest firmware (IDF 5.x) (#2945)
Co-authored-by: nfbot <[email protected]>
1 parent b008eb1 commit b2a469d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

targets/ESP32/_Network/NF_ESP32_Wireless.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ esp_err_t NF_ESP32_InitaliseWifi()
153153
if (expectedWifiMode & WIFI_MODE_AP)
154154
{
155155
// create AP (ignoring return)
156-
esp_netif_create_default_wifi_ap();
156+
esp_netif_t *nap = esp_netif_create_default_wifi_ap();
157+
158+
// Remove DHCP server flag as not configured in sdkconfig, DHCP server done in managed code
159+
// Otherwise startup hangs
160+
nap->flags = (esp_netif_flags_t)(ESP_NETIF_FLAG_AUTOUP);
157161
}
158162

159163
// Initialise WiFi, allocate resource for WiFi driver, such as WiFi control structure,

0 commit comments

Comments
 (0)