1

I am looking for a unique id accessible for a bluetooth low energy device from iOS. I have 10 devices and i placed it in 10 different places. I exactly need to know to which device i am communicating irrespective of the iOS device i am using to connect.

In the iOS core bluetooth, a new UUID is assigned by iOS for my device. I am not able to uniquely identify the device.

rekire
  • 47,260
  • 30
  • 167
  • 264
Sibish
  • 908
  • 1
  • 13
  • 20

3 Answers3

0

I have used the MAC address of the peripheral to generate a unique name in SCAN RESP. I guess you could also use this approach and maybe also put it in the advertisement data or in a message. (My peripheral was based on TI's 2540 SoC.)

Jens Schwarzer
  • 2,840
  • 1
  • 22
  • 35
  • At first how did you get MAC address of BLE peripheral ? Can you please share the process to generate the unique name ? – kashifasif Oct 06 '17 at 06:20
  • I guess it depends on the BLE stack if you have access to the MAC address or not. As stated above my stack was TS2540 based. I'm sorry but I have no longer access to the code. But it was fairly simple for TI's BLE stack. Please note that you cannot get the MAC address from iOS CoreBluetooth. Cheers! :) – Jens Schwarzer Oct 06 '17 at 15:29
0

To my knowledge MAC/BDADDR is not accessible via CoreBluetooth, but I noticed that the "Device Information Service" profile (0x180A) contains a "System ID" attribute (0x2A23) which encodes the device's unique MAC/BDADDR address. I don't know if it is mandatory for a BLE device to expose this service, however.

novis
  • 199
  • 1
  • 5
0

Use Major and Minor properties in CLBeacon. Both are 4 char hex values.

They are located in advertisement data with UUID.

More info: https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLBeacon_class/Reference/Reference.html#//apple_ref/occ/instp/CLBeacon/major

rizaozdulger
  • 205
  • 2
  • 7