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

BLE_GAP_CONN_SEC_MODE_SET

Given this answer, do the BLE_GAP_CONN_SEC_MODE_SET family of macros only relate to the Write permissions of the device name?

Maybe a better way to ask this is: Is it just incidental that the only characteristic that has adjustable permissions in the GAP service is the write permissions of the name?

Using sdk10 and s130.

  • FormerMember
    0 FormerMember

    The BLE_GAP_CONN_SEC_MODE_SET_xxx macros are, according to their documentation, GAP attribute security requirement setters, see ble_gap.h. The macros can be used to set the read and write permissions on attribute properties. In ble_app_hrs --> battery service, the client is not allowed to write battery level characteristic, and it is set the following way: BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm);

    In the sd_ble_gap_device_name_set(..) documentation it is specified that the first parameter is the write permissions for the device name. And hence, setting BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&sec_mode);will set the write permissions.

Related