diff --git a/modules/network/wifi/esp/modwifi.c b/modules/network/wifi/esp/modwifi.c index 897e91eeaf..6b05a67eed 100644 --- a/modules/network/wifi/esp/modwifi.c +++ b/modules/network/wifi/esp/modwifi.c @@ -152,6 +152,8 @@ void xs_wifi_connect(xsMachine *the) wifi_station_set_config_current(&config); + wifi_set_sleep_type(NONE_SLEEP_T); + if (channel >= 0) wifi_set_channel(channel); @@ -463,6 +465,8 @@ void xs_wifi_accessPoint(xsMachine *the) if (!ret) xsUnknownError("wifi_set_opmode_current failed"); + wifi_set_sleep_type(NONE_SLEEP_T); + ETS_UART_INTR_DISABLE(); ret = wifi_softap_set_config_current(&config); ETS_UART_INTR_ENABLE();