Skip to content

WiFi sniffer: change channel #11

@Quatrus

Description

@Quatrus

Hi,
While testing the example from esp-idf/examples/wifi/simple_sniffer I found that esp_wifi_set_channel(...) did not work. One of the reasons was a missing call to esp_wifi_start();
One could see the following warning and the channel would not be changed!

W (592) wifi: STA is scanning or connecting, or AP has connected with external STAs, cannot set channel

This is fixed in your code but seems there is a second problem to get the capturing all the packets working.

Working on the same ESP-IDF example I had to use ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); to capture not only the broadcast messages but also ARP, DNS, DHCP, TCP, HTTP frames.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions