-->
Page 1 of 1

MAC sniffer using AP mode?

PostPosted: Fri Mar 27, 2015 7:58 pm
by OpZed
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?

Re: MAC sniffer using AP mode?

PostPosted: Sun Mar 29, 2015 10:37 pm
by Athena
??

wifi_get_macaddr ?

Re: MAC sniffer using AP mode?

PostPosted: Thu Apr 09, 2015 7:24 pm
by Lottie
Duh... :roll:

Re: MAC sniffer using AP mode?

PostPosted: Fri Apr 10, 2015 9:48 pm
by prozac
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