Hello Nordic semi team,
I am running into an issue with sd_ble_gattc_read
I have set the MTU size to 70 and I do this:
// Configure the gatt MTU size .
memset(&ble_cfg, 0, sizeof(ble_cfg));
ble_cfg.conn_cfg.conn_cfg_tag = APP_BLE_CONN_CFG_TAG;
ble_cfg.conn_cfg.params.gatt_conn_cfg.att_mtu = MTU_SIZE;
err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATT, &ble_cfg, *ptr );
When I do a read using
er = sd_ble_gattc_read(tenx_ble.conn_handle, tenx_ble.read_handle, 0);
I do the read using this (in interrupt)
if (p_ble_evt->header.evt_id==BLE_GATTC_EVT_READ_RSP)
{
memcpy((void*) incoming_tenx_ble_read_buffer, (void*) &p_ble_evt->evt.gattc_evt.params.read_rsp.data[0], MTU_SIZE);
tenx_ble.event= READ_SUCCESS;
}
I get only 22 bytes of data.
Why is this sd_ble_gattc_read call returning only 22 bytes when I have told the SD that my MTU is 70 bytes?
I know in the ble header files you have defined ATT_MTU = 23, but I am not using the ATT_MTU anywhere. Is this 23 hard coded in softdevice?
Kind regards,
Hari