This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Large MTU + DLE Softdevice Crash

Hello,

I have followed a couple of the posts on the devzone on how to increase the MTU and add the DLE support such as this.

However, whenever I send over 20 bytes of data I get an "app_error_fault".

  • I have logging enabled and changed my ram size so my ram should be set correctly.

  • I have set the MTU size in sdk_config.h:

    #define NRF_BLE_MAX_MTU_SIZE 75

  • I set the att size in the setup function

    ble_enable_params.gatt_enable_params.att_mtu = NRF_BLE_MAX_MTU_SIZE;

  • I have set the DLE options

    ble_opt_t opt; memset(&opt, 0, sizeof(opt));

      opt.common_opt.conn_evt_ext.enable = 1;  //DLE
      
      err_code = sd_ble_opt_set(BLE_COMMON_OPT_CONN_EVT_EXT, &opt);
      APP_ERROR_CHECK(err_code);
      
      opt.gap_opt.ext_len.rxtx_max_pdu_payload_size = NRF_BLE_MAX_MTU_SIZE+4; //DLE
      
      err_code = sd_ble_opt_set(BLE_GAP_OPT_EXT_LEN, &opt);
      APP_ERROR_CHECK(err_code);
    
  1. I changed ble_nus.h to use the longer MTU size:

    *//#define BLE_NUS_MAX_DATA_LEN (GATT_MTU_SIZE_DEFAULT - 3) /< Maximum length of data (in bytes) that can be transmitted to the peer by the Nordic UART service module. */ #define BLE_NUS_MAX_DATA_LEN (NRF_BLE_MAX_MTU_SIZE - 3) /< Maximum length of data (in bytes) that can be transmitted to the peer by the Nordic UART service module. /

Any ideas as to why the softdevice would crash on a long write? I get a message saying I have requested the longer MTU by the central as well.

Parents Reply
  • FormerMember
    0 FormerMember in reply to Craig

    To check if UART is the problem, you can temporarily disable the UART functionality or for example transmit only one of the transmitted bytes per packet over UART.

    The example ble_central_and_peripheral/experimental/ble_att_mtu_throughput shows how to test long MTU, but it doesn't transfer the received data over UART.

Children
No Data
Related