esp32 wifi promiscuous mode, no control frame captured
Posted: Fri Dec 30, 2022 12:57 pm
Hi, I'm doing a project to capture WiFi ACK frames under promiscuous mode. These are part of the initialization codes:
I've also tried other combinations of filters, but none of them can capture any control frame. Meanwhile, the Management frames and the Data frames can be captured successfully. Does anyone have some ideas?
- wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
- ESP_ERROR_CHECK(esp_wifi_init(&cfg));
- ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );
- ESP_ERROR_CHECK(esp_wifi_start());
- ESP_ERROR_CHECK(esp_wifi_set_promiscuous(true));
- ESP_ERROR_CHECK(esp_wifi_set_promiscuous_rx_cb(&sniffer));
- wifi_promiscuous_filter_t filter = {
- .filter_mask = WIFI_PROMIS_CTRL_FILTER_MASK_ALL|WIFI_PROMIS_FILTER_MASK_DATA|WIFI_PROMIS_FILTER_MASK_CTRL;
- };
- ESP_ERROR_CHECK(esp_wifi_set_promiscuous_filter(&filter));