From 0ce58cc8bf6805c48489c967ede5769aa52b58d0 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Mon, 22 Jul 2019 00:04:26 +0200 Subject: [PATCH] wifiscan.cpp: fixes --- src/wifiscan.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wifiscan.cpp b/src/wifiscan.cpp index 750f9c5a..f1367b83 100644 --- a/src/wifiscan.cpp +++ b/src/wifiscan.cpp @@ -57,13 +57,13 @@ void wifi_sniffer_init(void) { wificfg.nvs_enable = 0; // we don't need any wifi settings from NVRAM wificfg.wifi_task_core_id = 0; // we want wifi task running on core 0 - // wifi_promiscuous_filter_t filter = { - // .filter_mask = WIFI_PROMIS_FILTER_MASK_MGMT}; // only MGMT frames + wifi_promiscuous_filter_t filter = { + .filter_mask = WIFI_PROMIS_FILTER_MASK_MGMT}; // only MGMT frames // .filter_mask = WIFI_PROMIS_FILTER_MASK_ALL}; // we use all frames - wifi_promiscuous_filter_t filter = {.filter_mask = - WIFI_PROMIS_FILTER_MASK_MGMT | - WIFI_PROMIS_FILTER_MASK_DATA}; + // wifi_promiscuous_filter_t filter = {.filter_mask = + // WIFI_PROMIS_FILTER_MASK_MGMT | + // WIFI_PROMIS_FILTER_MASK_DATA}; ESP_ERROR_CHECK(esp_wifi_init(&wificfg)); // configure Wifi with cfg ESP_ERROR_CHECK( @@ -73,7 +73,7 @@ void wifi_sniffer_init(void) { ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_NULL)); ESP_ERROR_CHECK(esp_wifi_stop()); ESP_ERROR_CHECK( - esp_wifi_set_promiscuous_filter(&filter)); // set MAC frame filter + esp_wifi_set_promiscuous_filter(&filter)); // set frame filter ESP_ERROR_CHECK(esp_wifi_set_promiscuous_rx_cb(&wifi_sniffer_packet_handler)); ESP_ERROR_CHECK(esp_wifi_set_promiscuous(true)); // now switch on monitor mode