From 15389516f52a8bee8a8d169dc0965dbc23c4bdaf Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Sat, 7 Sep 2019 15:02:43 +0200 Subject: [PATCH] added setting for wifi power save off --- src/wifiscan.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wifiscan.cpp b/src/wifiscan.cpp index 12ec9c82..6951ad6a 100644 --- a/src/wifiscan.cpp +++ b/src/wifiscan.cpp @@ -71,6 +71,7 @@ void wifi_sniffer_init(void) { ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM)); // we don't need NVRAM ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_NULL)); + ESP_ERROR_CHECK(esp_wifi_set_ps(WIFI_PS_NONE)); // no modem power saving ESP_ERROR_CHECK(esp_wifi_start()); // channel switch throws error without ESP_ERROR_CHECK(esp_wifi_set_promiscuous_filter(&filter)); // set frame filter ESP_ERROR_CHECK(esp_wifi_set_promiscuous_rx_cb(&wifi_sniffer_packet_handler));