Question

I'm currently working on a raspberry pi project that would require the wifi dongle (Realtek RTL8188CUS) to obtain the MAC addresses of nearby devices that have not connected to it. I had originally thought of doing this through tcpdump but those logs only seem to display the info of devices connected to the wifi network. So what I'm trying to figure out is: how to receive a log or list of MAC addresses within range of the network but are not connected to it.

Was it helpful?

Solution

I guess you need the wifi monitor feature. You can find out if your adapter provides this capability here. As far as I can tell, I did use the same adapters and had problems setting up a raspi to raspi adhoc connection with these adapters - see here. While moving over to edimax EW-7711UAN (RT2870/RT3070 - rt2800usb) turned out to work like charm.

As I understood the rtl8188cus are not initially supported by cfg80211, mac80211, nl80211 and thus you might have to compile the drivers yourself to have some wireless features as "iw" at hand. The "iw" provides you pretty simple access to wireless configuration and also monitor mode, see here. Several wireless modes you can access by "iw" are described here.

Monitor (MON) mode

Monitor mode is a passive-only mode, no frames are transmitted. All incoming packets are handed over to the host computer completely unfiltered. This mode is useful to see what's going on on the network.

With mac80211, it is possible to have a network device in monitor mode in addition to a regular device, this is useful to observe the network whilst using it. However, not all hardware fully supports this as not all hardware can be configured to show all packets while in one of the other operating modes. Monitor mode interfaces always work on a "best effort" basis.

taken from http://wireless.kernel.org/en/users/Documentation/modes

So using appropriate hardware is a good point to start at.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top