iOS - How to get GATT handle of a given characteristic in CoreBluetooth?

1k views Asked by At

I need to access a custom BLE GATT service that contains multiple instances of same characteristic. It sounds weird but complies with v4.0 standard (Vol.3, Part G, Sec 3.3.1):

A service may have multiple characteristic definitions with the same Characteristic UUID.

The first characteristic of this service is a list of [CustomID:GattHandle] pairs that represent the identity and position of the following characteristics. A GATT client is supposed to first discover all characteristics and then read the the value of ID:handle list, so that the identity of each characteristics shall be known.

The problem is, CBCharacteristic class doesn't provide GATT handle of characteristic. And I can't find any information whether CBService.characteristics will follow the nature order of attribute handle in GATT server.

Is there anyway to acquire the GATT handle of a given CBCharacteristic object ?

0

There are 0 answers