This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issue in getting serial number of BLE device iOS

I am working on a project in which i have to get the readings from device (BLE device). I have two devices BP and BG. I can successfully get the data from the devices using your library.

I was trying to get serial number of device by it's information service with serial number characteristic. I am able to get information service, but it does not contain serial number characteristic. In android, able to get serial number for the device. Is there any way to get serial number from device when service does not contain serial number characteristic? It's basic requirement for app, to verify Bluetooth device.

  • Through the iOS API both UUID and MAC ID are restricted and cannot be viewed by an app. I believe the serial number characteristic you refer to is one of these. Also, for iBeacons the raw advertisement data is restricted and cannot be viewed through the core bluetooth framework.

    The only thing you can access is the CBUUID which is generated by the OS the first time a device is seen. Ideally, this number will not change on an iOS device and can be used to reference the device. Of course though the CBUUID is different on all iOS devices.

  • I guess it has something to do with privacy protection policy on iOS.

    Can you create a proprietary service and add your serial number there instead of information service ?

  • I would encourage you to read up on it to confirm, but with Core Location my understanding is no. iBeacons are really meant for proximity marketing. You would need to use the Core Bluetooth Framework. In order to have your beacon's raw data seen by CB you cannot advertise as iBeacon. iBeacon data is suppressed in CB by iOS. For this reason, you might find it easier to not be iBeacon.

Related