There appears to be an issue in the end-handle in the example code to retrieve characteristics for a service. Currently the code is:
// Search for end handle.
for (uint8_t j = 0; j < mp_device_srv[conn_handle]->count; j++)
{
if ((handle_range.start_handle >
mp_device_srv[conn_handle]->services[j].handle_range.start_handle) &&
(handle_range.start_handle < mp_device_srv[conn_handle]->services[j].handle_range.end_handle))
{
handle_range.end_handle =
mp_device_srv[conn_handle]->services[j].handle_range.end_handle;
break;
}
}
This returns all handles for this service and all remaining services.
It would be better if there was an option to return all handles for all services (omit the service UUID) and return only the handles for a given service