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

Set up MTU and DLE with SD 132 ver 4

Hello community,

I have a central device which I implemeted, it is running with SD 132 v 4 ("NRF_SD_BLE_API_VERSION=4") ) the chip is a NRF52832, I have some movement sensors which are able to send 8,20 and 30 bytes. Until 20 bytes my central is receving the data via notification with out any problem but when the central activates the 30 bytes notifications I dont received anything, but the notifications are activated, the sensors remain the notifcation on even though they are disconnected from the central, and using NRF Studio I can see the notification on and receiving it.

I know that I need to do my MTU larger and also the DLE, I am doing a #define NRF_BLE_MAX_MTU_SIZE 34

and also when the sensor is connected I am changing the :

  err_code = sd_ble_gattc_exchange_mtu_request(p_ble_evt->evt.gap_evt.conn_handle, 
             NRF_BLE_MAX_MTU_SIZE);
  APP_ERROR_CHECK(err_code); //DLE

But I am having a fatal error. Also I dont know how to chage when the central initializes the BLE stack.

I found this thread but it may work for the version 3.

Someone knows who should i need to change this configuration?

  • Hi,

    In SDK 13(where S132 v.4 is used) we have a GATT library that should handle this for you. Take a look at e.g. ble_app_uart example. MTU is set with nrf_ble_gatt_att_mtu_periph_set() in gatt_init().

    Regarding the fatal error, you should debug to find the error code and find out where in the code the error occurs. See this post on how to do that.

Related