Hello! I trying to send message from peripheral to central. On peripheral characteristics are changes with delay. To change characteristics I use this function:
void send_char_data(char *data, char size)
{
ble_gattc_write_params_t write_params;
uint32_t err_code;
write_params.write_op = BLE_GATT_OP_WRITE_CMD;
write_params.handle = m_char_handles.value_handle;
write_params.offset = 0;
write_params.len = size;
write_params.p_value = data;
err_code = sd_ble_gattc_write(m_conn_handle, &write_params);
APP_ERROR_CHECK(err_code);
}
How can I catch on central device events for changing characteristics on peripheral?