Search code examples
macoswifipacket-sniffers

How do I get a list of 802.11 access points and their MAC addresses that's shown in the pull-down?


My Mac says that there are 10 access points nearby. How do I read that list of access points programmatically, getting both the signal strength and the MAC address of the APs?


Solution

  • Use the Apple80211 Private framework (/System/Library/PrivateFrameworks/Apple80211.framework). Since it is private, there is no official documentation, but you can get a lot of information by googling "apple80211". I have found http://code.google.com/p/iphone-wireless/wiki/Apple80211Functions to be the best source. It is specifically for iPhone development, but the frameworks are nearly identical. The two biggest differences: the load location and the fact that it can be linked in on the mac instead of loaded at runtime.