Hi,
In my project I need to send maximum bytes possible inside one package. When using the nrf connect app I can see that when reading the characteristic this works, but notifications are still limited to 20B. My configurations are:
#define NRF_SDH_BLE_GAP_DATA_LENGTH 251
#define NRF_SDH_BLE_GAP_EVENT_LENGTH 320
#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247
When adding the characteristic the relevant values are set to:
ble_gatts_attr_md_t cccd_md; memset(&cccd_md, 0, sizeof(cccd_md)); BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.write_perm); cccd_md.vloc = BLE_GATTS_VLOC_STACK; cccd_md.vlen = p_char_info->dyn_len ? 1 : 0; /// NOTE: This is 0 char_md.p_cccd_md = &cccd_md; ble_gatts_attr_md_t attr_md; memset(&attr_md, 0, sizeof(attr_md)); attr_md.vloc = BLE_GATTS_VLOC_STACK; attr_md.vlen = p_char_info->dyn_len ? 1 : 0; /// NOTE: This is 0 attr_md.rd_auth = CHAR_IS_REQ_TYPE_RD_AUTH(p_char_info); BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); ble_gatts_attr_t attr_char_value; memset(&attr_char_value, 0, sizeof(attr_char_value)); attr_char_value.p_uuid = &char_uuid; attr_char_value.p_attr_md = &attr_md; attr_char_value.max_len = p_char_info->len; /// NOTE: This is e.g. 40 attr_char_value.init_len = CHAR_IS_REQ_VAR_LEN(p_char_info); /// NOTE: This is e.g. 40 attr_char_value.p_value = g_ble_buff;
when sending the notification in ble_gatts_hvx_params_t the .p_len pointer is pointing to a variable with value e.g. 40.
Is there still something missing to setup?