Skip to content

Commit

Permalink
disable esp8266 modem sleep - resolves analog noise and should give s…
Browse files Browse the repository at this point in the history
…mooth network performance phoddie/node-red-mcu#101
  • Loading branch information
phoddie committed Mar 16, 2023
1 parent dccc1bb commit 7d1a6eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/network/wifi/esp/modwifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 7d1a6eb

Please sign in to comment.