Chat freely about anything...

User avatar
By OpZed
#12772 I see some support for promiscuous mode, but wonder if sniffer-like monitoring could be done in AP mode? I saw another thread trying to get at RSSI (signal strength), but I'm only interested in viewing _device_ MACs (not other APs). Any possibilities here?
User avatar
By prozac
#14152 Pretty sure that wifi_get_macaddr returns the mac address of YOUR AP or station (depending on the value of if_index).
Are you trying to get the list of associated stations' mac addresses? wifi_softap_get_station_info, will give you the associated stations IP and mac addresses.

These are from the SDK docs:

Examples 1 (Getting MAC and IP information):
Code: Select allstruct station_info * station = wifi_softap_get_station_info();
struct station_info * next_station;
while(station) {
 os_printf("bssid : MACSTR, ip : IPSTR/n", MAC2STR(station->bssid), IP2STR(&station->ip));
 next_station = STAILQ_NEXT(station, next);
 os_free(station); // Free it directly
 station = next_station;
}

Examples 2 (Getting MAC and IP information):
Code: Select allstruct station_info * station = wifi_softap_get_station_info();
while(station){
 os_printf("bssid : MACSTR, ip : IPSTR/n", MAC2STR(station->bssid), IP2STR(&station->ip));
 station = STAILQ_NEXT(station, next);
}
wifi_softap_free_station_info(); // Free it by calling functions