NCS 2.1.0 / nRF52840-DK
Hello,
I have a single write characteristic on my service:
BT_GATT_SERVICE_DEFINE( custom_srv,
BT_GATT_PRIMARY_SERVICE(BT_UUID_CUSTOM_SERVICE),
BT_GATT_CHARACTERISTIC( BT_UUID_ADV_PERIOD_CHRC,
BT_GATT_CHRC_WRITE_WITHOUT_RESP,
BT_GATT_PERM_WRITE,
NULL, on_write, NULL),
);
How do I set that this characteristic can be only written if there is an active pairing with the device?
In other words, I want user to only be able to write characteristic if security level is 3 or above.