Hi,
I am wondering if it is possible for a peripheral device to interpret and react to a specific value written to it's CCCD by a central device. In all of the examples I looked at, it appears that this characteristic can simply be NULL or != NULL. From the bas example:
// CCCD written, call application event handler
if (p_bas->evt_handler != NULL)
{
ble_bas_evt_t evt;
if (ble_srv_is_notification_enabled(p_evt_write->data))
{
evt.evt_type = BLE_BAS_EVT_NOTIFICATION_ENABLED;
}
else
{
evt.evt_type = BLE_BAS_EVT_NOTIFICATION_DISABLED;
}
p_bas->evt_handler(p_bas, &evt);
}
is it possible to create code where a central device would write 01:00 to the peripheral's CCCD to flash the peripheral's LED1 and write a value of 02:00 to flash the peripheral's LED2?