This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to use HANDLE RANGE correctly for Multiconnection ?

good time dear Engineers!

Please explain how to use correctly HANDLE RANGE in functions of discovering. I use CENTRAL with up to 8 possible connections to PERIPH, so pls explain following:

sd_ble_gattc_primary_services_discover(conn_handle, start_handle, &uuid);

WHAT IS start_handle if 8 Active Connections co-exist ? why it is always 0x0001 ?

sd_ble_gattc_characteristics_discover(conn_handle, p_handle_range);

WHAT is p_handle_range if 8 ACTIVE CONNECTIONS ? for example, for 2 connections: if conn_handle1=0x0 and conn_handle2=0x1 ?

sd_ble_gattc_descriptors_discover(conn_handle, p_handle_range);

for different connections handles (0x0,0x1,etc..), must p_handle_range be different too ? e.g.

conn_handle1=0x00: p_handle_range  = {0x10,0x15}
conn_handle2=0x01: p_handle_range  = {0x20,0x25}

etc.. ?

How to Manage Handle Ranges in case of Disconnecting -> Connencting -> Discovering again , etc... correctly (in this cases old handles must be re-assigned again) ?

I have one SERVICE (1666) two CHAR's (d5aa, d780) in this service and 4 Descriptors in each CHAR.

I found SERVICE, CHARS and store it's HANDLEs in my database according to the Photo. Q: how to find all descriptors in each CHAR's ? What valid handle_range I should use as PARAMETER to sd_ble_gattc_descriptors_discover(...) ?

image description

if I use handle_range of [e.g. 0x09 - 0x0E] means from service start_ handle to last char handle_value , seems it's OK, all the Attribute founds success.

Parents Reply Children
No Data
Related