This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to add the descriptions of GATT Primary Service(0x2800) and GATT characteristic?

How to add the descriptions of GATT Primary Service(0x2800) and GATT characteristic? Just like the picture below. image description

Parents
  • The example is located in "your_sdk_folder\examples\ble_peripheral\ble_app_hids_mouse". The sd_ble_gatts_descriptor_add() function is used in e.g. the rep_char_add() function found in ble_hids.c file.

    The code above is copy-pasted from a random example i made. ble_os_t and char_handle are just residues from that example. ble_os_t is a service struct containing data about the service being worked on and char_handle is the handle to the characteristic that you want to add a descriptor to. If you want to use the code above you will have to modify it a bit to fit your particular application.

Reply
  • The example is located in "your_sdk_folder\examples\ble_peripheral\ble_app_hids_mouse". The sd_ble_gatts_descriptor_add() function is used in e.g. the rep_char_add() function found in ble_hids.c file.

    The code above is copy-pasted from a random example i made. ble_os_t and char_handle are just residues from that example. ble_os_t is a service struct containing data about the service being worked on and char_handle is the handle to the characteristic that you want to add a descriptor to. If you want to use the code above you will have to modify it a bit to fit your particular application.

Children
No Data
Related