multiple IP_EVENT_AP_STAIPASSIGNED evenst

bvovag
Posts: 3
Joined: Sat Dec 14, 2019 7:08 pm

multiple IP_EVENT_AP_STAIPASSIGNED evenst

Postby bvovag » Sat Dec 14, 2019 9:55 pm

I am using IDF v4.1-dev-1086-g93a8603-dirty.
esp32 as AP, forming it's own net, incoming station is PC. All works. But when "station' connects (enter the net), I get not one event with IP_EVENT_AP_STAIPASSIGNED, but normally three in sequence :
I (18700) esp_netif_lwip: softAP assign IP to station,IP is: 192.168.4.2
I (22340) esp_netif_lwip: softAP assign IP to station,IP is: 192.168.4.2
I (26240) esp_netif_lwip: softAP assign IP to station,IP is: 192.168.4.2
Sometimes they are two, and only rarely one.
The code is very common:
void wifi_event_handler(...) {
.................................
}
else
if (event_base == IP_EVENT && event_id == IP_EVENT_AP_STAIPASSIGNED) {
ESP_LOGI(TAG, "set ip to incoming STA");
}
.........
}
This has no influence on a further program flow, but make impossible to use the event strict as WIFI_EVENT_AP_STACONNECTED (wich is fires only once, as expected).

Maybe someone understand what that means & why ...
Any ideas, please.

Who is online

Users browsing this forum: federicolonghin and 225 guests