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

Update ATT MTU NRF52832

Hello,

I had problems connecting the periphery to the central. When I connect them, I get notifications like this from peripheral, but after this message they don't lose the connection.

Fullscreen
1
<error> nrf_ble_gatt: sd_ble_gatts_exchange_mtu_reply() returned NRF_ERROR_INVALID_PARAM.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I have checked m_gatt on both sides, they all have the same parameters. The strange thing is why this message appears, I have set a breakpoint at line 260 of nrf_ble_gatt.c

Fullscreen
1
· · err_code = sd_ble_gatts_exchange_mtu_reply(conn_handle, p_link->att_mtu_desired);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// <h> BLE Stack configuration - Stack configuration parameters
// <i> The SoftDevice handler will configure the stack with these parameters when calling @ref nrf_sdh_ble_default_cfg_set.
// <i> Other libraries might depend on these values; keep them up-to-date even if you are not explicitely calling @ref nrf_sdh_ble_default_cfg_set.
//==========================================================
// <o> NRF_SDH_BLE_GAP_DATA_LENGTH <27-251>
// <i> Requested BLE GAP data length to be negotiated.
#ifndef NRF_SDH_BLE_GAP_DATA_LENGTH
#define NRF_SDH_BLE_GAP_DATA_LENGTH 251
#endif
// <o> NRF_SDH_BLE_PERIPHERAL_LINK_COUNT - Maximum number of peripheral links.
#ifndef NRF_SDH_BLE_PERIPHERAL_LINK_COUNT
#define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 1
#endif
// <o> NRF_SDH_BLE_CENTRAL_LINK_COUNT - Maximum number of central links.
#ifndef NRF_SDH_BLE_CENTRAL_LINK_COUNT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Will this notification affect my device?

When I use nRF Connect on PC or Smartphone, I do not receive this message from the periphery

I'm using NRF52832 SDK 15.3 Softdevice 6.1.1

Thank you

Parents
  • Hi,

    It looks like the GATT module hasn't been properly initialized based on your first screenshot. Please verify that nrf_ble_gatt_init() is called on startup and that the gatt instance is defined globally through the NRF_BLE_GATT_DEF() macro.

    Regards,

    Vidar

  • I checked m_gatt, it is still assigned a normal value. When connecting m_gatt does not change the value. After a day with no results, I forced to copy the old project and deploy it from scratch. Fortunately it no longer reported this error. Thanks

  • Thanks for the update, glad to hear that it works now. 

Reply Children
No Data