This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Central receiving more than 23 bytes as a notification

Hello community,

I am working in a central device with SDK 13 v. 4, PCA10400 (NRF52832) and SD 132 and one task is to receive 30 bytes from a sensors as a notifcation, but unfortunally I dont get anything, the MTU is already set up in ble_stack_init() as the following:

 #define NRF_BLE_MAX_MTU_SIZE    34

// Configure the MTU
memset(&ble_cfg, 0, sizeof(ble_cfg));
ble_cfg.conn_cfg.conn_cfg_tag = CONN_CFG_TAG;
ble_cfg.conn_cfg.params.gatt_conn_cfg.att_mtu = NRF_BLE_MAX_MTU_SIZE;
err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATT, &ble_cfg, ram_start);

What else should the programm have in order to receive the 30 bytes from the sensor?

Regards,

David Caraveo

  • for readind using cypress

    Source: Destination Protocol length Info Master Slave ATT 33 Rcvd Read Request, Handle: 0x0037 Slave Master ATT 57 Rcvd Read Response

  • I've another question, there is a way to activate the DLE using 'ble_gap_opt_ext_len_t' and using "rxtx_max_pdu_payload_size = 33" but where this code should be? Before the connection is stablish or when the ble stack is starting?

  • Hi DavidC. Sorry for the delayed response. Regarding your code above, you need to look at the GATT library in SDK 13 instead of MTU. See this link for details. Also, take a look at this function in the main.c file of the ble_app_uart example under the ble_peripheral folder. Try that instead of using the sniffer. Hope that helps!

    void gatt_init(void) {
    ret_code_t err_code;
    err_code = nrf_ble_gatt_init(&m_gatt, gatt_evt_handler);
    APP_ERROR_CHECK(err_code);
    
    err_code = nrf_ble_gatt_att_mtu_periph_set(&m_gatt, 64);
    APP_ERROR_CHECK(err_code); }
    
Related