0

I am writing an app for checking attendance on a classroom via bluetooth. It works just fine so far, I have been testing with my Macbook, iPad, Apple TV. And I get their name, such as: "Eduardo's iPad, Apple TV, Eduardo's Macbook". The problem is that yesterday I tested it on a mall, and all I got was a bunch of "unnamed" devices. That's going to be a problem on the classroom as well.

I am also getting an id, but I don't know how to identify that id on the iOS or Android device, this are the kind of objects I get when I scan:

{
  id: "2BD5D5A7-EF50-B4F4-D4FD-9A8413006D4B",
  rssi: -24,
  advertising: {
    kCBAdvDataIsConnectable: true
  },
  name: "Eduardo's iPad"
}

Please notate that the id I get here is 2BD5D5A7-EF50-B4F4-D4FD-9A8413006D4B, but if I go on my iPad to Settings/General/About/Bluetooth the id shown there is F0:D1:A9:E3:F9:E9.

So, can I get the short id from the long id somehow? Or, is there a way to get that long id on iOS or Android using their graphic interface? Thanks in advance.

Multitut
  • 2,089
  • 7
  • 39
  • 63
  • 1
    there is no way to map the identifier to the device MAC. The identifier is a value that is created by Core Bluetooth to identify a peripheral but the way in which the identifier is derived is not documented. In my experience you tend to only get names for devices that have the same iCloud account as this causes iOS to pair those devices for things like handoff to work. You will also be challenged by the fact that iOS (and maybe Android) have MAC randomisation to specifically defeat attempts to track devices. – Paulw11 Oct 29 '17 at 19:28

1 Answers1

2

In iOS not allow to get MAC address of peripheral(BLE Device), so iOS generate UUID for peripheral.

Diff. iOS devices allocate diff. UUID.

So, There is no any other way to identify a peripheral device in iOS.

If peripheral advertisement data shows any Id then we can identify BLE device.

Deepak Tagadiya
  • 2,187
  • 15
  • 28