You need to specify a bit more information, because mobile devices use many different forms of radio communication that are detectable to varying degrees, with some legal implications in some countries.
I'm familiar only with 802.11 wireless, and have little experience with 802.15.1/Bluetooth and no experience with the multitude of cellular data protocols.
You'll have to specify if you are intending the detect devices passively and silently (without users knowing) or if you are trying to detect devices trying to be detected by you to initiate communication.
Assuming the first, and that you'll be using 802.11 based detection, have a look at the aircrack-ng suite of tools. Specifically you'll likely be interested in
airodump-ng. You'll be able to quickly detect all devices communicating over wifi within range and their reported MAC addresses (when not spoofed, are intended to be unique to the device).