nrf connect SDK: Authorized BLE write (or read)

Hi,

We are migrating our current nrf5 SDK application to zephyr (nrf connect sdk v2.3). And we are using authorized read/write so we can refuse the write if device is not ready. This was achieved using following code in nrf5 SDK:

attr_md.rd_auth = 1;
attr_md.wr_auth = 0;
attr_md.vlen = 1;

memset(&attr_char_value, 0, sizeof(attr_char_value));

//reply (authorize) the read or write

err_code = sd_ble_gatts_rw_authorize_reply(conn_hndl,
&auth_reply);

Is it possible to do the same in nrf connect SDK (zephyr) environment? Any code sample will be helpful as well.

Regards,

Amir

Parents Reply Children
No Data
Related