Hi
Try to send characteristic notification by invoking sd_ble_gatts_hvx() with the following parameters:
uint32_t err_code = NRF_SUCCESS;
ble_gatts_hvx_params_t params;
memset(¶ms, 0, sizeof(params));
params.type = BLE_GATT_HVX_NOTIFICATION;
params.handle = GetValueHandle();
params.p_data = pData;
params.offset = 0;
params.p_len = &length;
if (srv::ble::ConnectionHandleInvalid != mrBleInterface.GetConnectionHandle())
{
err_code = sd_ble_gatts_hvx(mrBleInterface.GetConnectionHandle(), ¶ms);
assert(err_code == NRF_SUCCESS);
}
Unfortunately, the error code 8 NRF_ERROR_INVALID_STATE occurs. The connection is established and bonding is completed. ( checked by the DM_EVT_LINK_SECURED event from the device manager)
Do you have any suggestion what "invalid state" coulde be?
Thanks for your help.
BR Armin