1

I am writing a code which can show nearby friends whose bluetooth devices (phones) are switched on. My codes uses the devices addresses of the users to keep track of their presence but I need to know whether this figure is unique or not. If not how can I generate a unique id for each phone, let's say for example address + friendly name (which unfortunately is not unique).

Thanks

Chibueze Opata
  • 9,856
  • 7
  • 42
  • 65
  • No, Bluetooth addresses are unique. See this other question http://stackoverflow.com/questions/2004065/java-me-is-the-bluetooth-address-id-globally-unique – Telmo Pimentel Mota Jul 02 '12 at 16:32
  • This uniqueness you talk about should only exist within specific manufacturers, no? – Chibueze Opata Jul 02 '12 at 16:40
  • @ChibuezeOpata, Bluetooth addresses are globally unique. They are composed of an upper and lower address part. Some of the upper bytes identify specific manufacturer, then lower bytes are unique IDs from that manufacturer. So you will not find two devices with same address. – TJD Jul 02 '12 at 18:37
  • Wow, okay so could you please post that an answer so I can accept it properly. Thanks. – Chibueze Opata Jul 02 '12 at 18:44

1 Answers1

1

So two phones can't have the same Bluetooth address due to the way the mac addresses are assigned. Bluetooth addresses use the same MAC-48 identifier format. Read this page for details.

Chibueze Opata
  • 9,856
  • 7
  • 42
  • 65