esp_wifi_ap_get_sta_list() problem

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

esp_wifi_ap_get_sta_list() problem

Postby bvovag » Thu Dec 26, 2019 9:02 pm

I am using ESP_IDF v4.1.
I try to get mac and IP of station, connected to AP.
The aim is to serve reconnection, when STA is accidentally disconnects (power off) without posting some disconnect action.
in that case we get any ... disconnect.. events in AP event loop.
I found in some posts, that the only way is to use:
esp_wifi_ap_get_sta_list(&wifi_sta_list);
tcpip_adapter_get_sta_list(&wifi_sta_list, &tcp_sta_list);
( or esp_netif_get_sta_list(&wifi_sta_list, &netif_sta_list); )
But as I see, sta_list gotten from esp_wifi_ap_get_sta_list(&wifi_sta_list) isn't updated when station leave the AP net (is turned-off).
So that is there is no methods to get a newly connected station's IP .?.?
That is very strange situation.
My task - to handle reconnection of some particular station (multiple of STAs are connected to AP) is very common, and there are no appropriate instruments in IDF ?????
May someone knows the other way?
any help...
thanks

sharkx
Posts: 5
Joined: Fri Feb 28, 2020 3:27 pm

Re: esp_wifi_ap_get_sta_list() problem

Postby sharkx » Thu Mar 05, 2020 3:55 pm

Hello,

I have a stranger problem. After the call to esp_wifi_ap_get_sta_list, the wifi_sta_list_t.num is always zero ... but there are stations that are connected.

Any ideas are appeciated.

Who is online

Users browsing this forum: No registered users and 85 guests