I have done this:
ble_gatts_attr_md_t ble_attr_md;
memset(&ble_attr_md, 0, sizeof(ble_attr_md));
.
.
.
ble_attr_md.rd_auth = 1;
ble_attr_md.wr_auth = 1;
.
.
.
ble_gatts_attr_t ble_attr;
.
memset(&ble_attr, 0, sizeof(ble_attr));
.
.
ble_attr.p_attr_md = &ble_attr_md;
.
.
uint32_t error_code = sd_ble_gatts_characteristic_add(
g_mesh_service.service_handle,
&ble_char_md,
&ble_attr,
&ble_value_char_handles);
So, I do have a working service. But as I have set authorization for read and write, I cannot update it from nRF Master Control Panel App. How do I actually handle the authorization? Where to set the password?