Electronic – Counting number of bluetooth 4.0 (BLE) devices near me

androidbluetoothbluetooth low energyiphone

Does bluetooth allow you to discover devices around you that are simply on but aren't in any discovery state? I am not trying to pair with all these devices but merely count the number around me and maybe get signal strength information for very basic distance estimation. Essentially lets say I am in a room full of strangers who have their BLE turned on their phones, can I sense that they are on using my phone without them having to do anything? Essentially just notice them and count them?

Best Answer

What you are trying to do is not generally possible.
To achieve this the BLE device needs to be sending packets that you can detect. A BLE device will only be sending packets in some special cases. Those are when it is advertising (sending advertising packets), active scanning (and therefore sending scan request packets), or it is in an active connection.
Contrary to the previous answer though, advertising packets would allow you to get the Bluetooth address without having to make a connection and pair (although I don't think from your question you were interested in addresses).
It is correct though that you could use something like Ubertooth to sniff the any of the packets mentioned above. That would allow you to at least detect that there were some devices near you (even without having to decrypt the packets if the device was part of an encrypted connection).