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_NO_ACCESS vs remove the char

by set a char with BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS, means it can't be read and write, if so, why not remove the char? any reason behind BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS?

Thanks

  • Hi Julian,

    The BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS is to set the permission of a write or read property of a characteristic, not the characteristic itself. So that you can have a characteristic with read permission set to no access but can have write permission open.

    Also, a characteristic can even have both read and write permission to no access. This is used when the characteristic is mainly used to notify the data only, without allowing the peer device to read or write.

    You can find the use of BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS in our sample profiles in the SDK.

Related