Page 1 of 1

SYSTEM_EVENT_AP_STAIPASSIGNED not passing details on connected client?

Posted: Tue Mar 12, 2019 7:32 am
by loggerdaisy
I was looking here into SYSTEM_EVENT_AP_STAIPASSIGNED event raised and it got em puzzled. There is no information sent about client connected to AP, not even MAC address?

I can call the following code to print out all the connections i have on my AP, but i need at least a MAC address on SYSTEM_EVENT_AP_STAIPASSIGNED event, because &event->event_info.sta_connected.mac is certainly gives me something else not station's connected to AP MAC...

Code: Select all

wifi_sta_list_t sta_list;
    tcpip_adapter_sta_list_t tcp_sta_list;

    tcpip_adapter_get_sta_list(&sta_list, &tcp_sta_list);

    auto *stations = (wifi_sta_info_t *) sta_list.sta;
    for (int i = 0; i < sta_list.num; ++i)
        std::ostringstream ss;
        ss << "MAC: " << swarmos::Utils::mac2str(stations[i].mac)
           << "\tRSSI: " << +stations[i].rssi
           << "\tIP: " << ip4addr_ntoa(&tcp_sta_list.sta[i].ip);

Anyone can help?