Wifi smart phone mac address capture

Can this be done with a wifi module? If I understand correctly, smart phones that have the "scan for networks" setting turned on periodicly send out a broadcast singals as they search for networks. I'm looking for a way to capture these signals and retrieve the mac address. Any sugestions? sample code? Thanks in advance.

I'm looking for a way to capture these signals

Using what hardware?

and retrieve the mac address.

For what purpose?

I'm thinking of using something along these lines: https://www.sparkfun.com/products/10822

And I would like to build a device that could track the coming and goings of my shops customers. Nothing malicious.

Nothing malicious.

Not if you inform the customers.

My iPhone has WiFi turned off most of the time. The only time it is on is when I turn it on to connect to particular WiFi access points (at home, mostly). So, even if I visited your shop, you would not find out about my phone.

I'm not sure when a WiFi packet contains any useful information. That may be when the phone is trying to access a WiFi access point (all the time it is looking) or it may be only when the access point agrees to let the device connect.

Only one way to find out.

http://blog.spiderlabs.com/2012/12/wardrive-raspberry-pi-style.html

I came acesss that the other day - used a pi and kismet

Also check out this company

http://euclidanalytics.com/product/

Able to log Mac address and signal levels to figure out if people walk by or into the store.

I think Pantonvich's recommendations are a more likely solution than an Arduino-based one.

To capture arbitrary MAC addresses you'd need to be able to put the Ethernet card into promiscuous mode and parse the raw packers in your application yourself.

I'm not aware of any WiFi adapters for the Arduino that can do that. The RN-XV definitely can't; it goes so far out of its way to shield you from the lower protocols that you can't even use it to receive arbitrary UDP or multicast packets.

Thanks for the responses. The bit about promiscuous mode is what I needed if I decide to continue.