Promiscuous mode and connected at the same time

dsiganos
Posts: 5
Joined: Sat Jun 17, 2017 9:21 pm

Promiscuous mode and connected at the same time

Postby dsiganos » Tue Jun 20, 2017 9:01 pm

Is it possible to be connected to an access point as a station and also be in promiscuous mode?

For example, could this code remain connected to the access point even after the call to esp_wifi_set_promiscuous(1)?

Code: Select all

    tcpip_adapter_init();
    wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
    ESP_ERROR_CHECK(esp_wifi_init(&cfg));
    wifi_config_t wifi_config = {
        .sta = {
            .ssid = DEFAULT_SSID,
            .password = DEFAULT_PWD
        },
    };
    ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
    ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config));
    ESP_ERROR_CHECK(esp_wifi_start());

    ESP_ERROR_CHECK(esp_wifi_set_promiscuous_rx_cb(sniffcb));
    ESP_ERROR_CHECK(esp_wifi_set_promiscuous(1));

Who is online

Users browsing this forum: Google [Bot] and 169 guests