After I follow this post.
And I modify my source code succeed.
The data was separate by 64 bytes?
How to change or define this "64" bytes in SDK15.2?
Please help me. Thank you.
Could you try the following setting in the sdk_config.h?
#define NRF_SDH_BLE_GAP_DATA_LENGTH 68#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 64
Please refer to the picture below.
It looks like not config by this two parameter.
Did you call nrf_ble_gatt_att_mtu_periph_set() in main.c with the value set to 64 like
err_code = nrf_ble_gatt_att_mtu_periph_set(&m_gatt, 64);
No. I don't use this method.
Jax said:I don't use this method.
I think you should have nrf_ble_gatt_att_mtu_periph_set to setting the ATT_MTU size for the next connection that is established as peripheral.
In e.g. SDK 15.2 in the ble_app_uart example you can set the ATT_MTU with the nrf_ble_gatt_att_mtu_periph_set() function:
/**@brief Function for initializing the GATT library. */
err_code = nrf_ble_gatt_init(&m_gatt, gatt_evt_handler);
err_code = nrf_ble_gatt_att_mtu_periph_set(&m_gatt, NRF_SDH_BLE_GATT_MAX_MTU_SIZE);