We have a custom service on our server/peripheral devices, with a number of characteristics.
This service is implemented on a number of host platforms, including nRF devices, TI devices, uBlox devices, Android, iOS etc. Our custom service structure is fixed, as in we know programmatically the relative locations/offsets of characteristic handles within the GATT table for the service.
On the client/central side, we need to determine the handle of the first characteristic in our service FIRST_CHAR_BASE_HANDLE in order to interact with the service and perform the GATT read and write operations to all characteristics in the correct order.
We do NOT want to do a full DB discovery - it is not useful for us and takes too long, our application is time critical, we just need the base handle of the custom service.
Currently on other implementations (ie TI Bluetopia) we are doing service discovery by UUID. At the minimum, all that needs to be done on the server side is that the GATT UUIDs for each service need to be looped through and compared to the given UUID, and the handle returned when found. The handle of the first characteristic is then CUSTOM_SERVICE_HANDLE + 1. This process takes less than a connection interval (~10 ms) on the other platforms.
The nRF5 SDK provides a DB Discovery library, where a service UUID can be registered with an event handler, which is called when any event related to DB discovery for that service occurs. We are hoping that significant IOPS ie traversing, reading and writing the entire GATT tree, are not done in the nRF DB Discovery library. The documentation does not explain how the DB discovery is done.
Is this the DB Discovery library the most efficient way of doing what we want on the nRF platform or are there other alternatives? Secondly, how does it work/are there any indications on performance before we embark on the development?
TIA
