Within the API documentation, I found that inside of bleprofile.h (this file provides definitions and function prototypes for the BLE GATT profiles), there is a macro: #define HANDLE_NUM_MAX 5, so you are correct in that the max value is 5.
There is also a series of Typedefs (listed under GATT Profile functions), including one named BLE_ADV_FIELD where the following fields use HANDLE_NUM_MAX as a parameter:
UINT16 hdl [HANDLE_NUM_MAX]
UINT16 serv [HANDLE_NUM_MAX]
UINT16 cha [HANDLE_NUM_MAX]
Are you asking for a profile or example that uses HANDLE_NUM_MAX?
I conformed with the developers that HANDLE_NUM_MAX is 5 in the ROM.
Currently, the only value which may be used by the stack is serv. If application does not define the advertisement, by default the stack will use serv to indicate that the service with that UUID is supported. All other variables of hdl, serv and cha are for the application to use. Hello_sensor does not use that area of the API.
if I have two or more advertisements, is the HANDLE_NUM_MAX the limitation? I mean if except the serv, serv~serv are total for 4 advertisements?
1 of 1 people found this helpful
These are not really related to advertisements. These three arrays are there only for convenience if you want to use it to map handles, services and characteristics in your GATT database for later use. You can always use other methods like #defines or variables to do the same.