Hi
I am having trouble changing the MTU size. I am using SDK 15.3 on nRF52832. I am developing a combined peripheral/central application, but I only need Data Length Extension on the peripheral part, which holds 3 custom services and 2 standard services.
In sdk_config.h I changed:
#define NRF_SDH_BLE_GAP_DATA_LENGTH 67
#define NRF_SDH_BLE_GAP_EVENT_LENGTH 200
#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 64
And bonding is enabled.
Log snippet:
| [00:00:08.493,000] <debug> nrf_ble_gatt: Updating data length to 67 on connection 0x1. [00:00:08.494,000] <info> app: Peripheral connected [00:00:08.772,000] <debug> nrf_ble_gatt: ATT MTU updated to 64 bytes on connection 0x1 (response). [00:00:08.822,000] <debug> nrf_ble_gatt: Data length updated to 67 on connection 0x1. [00:00:08.822,000] <debug> nrf_ble_gatt: max_rx_octets: 27 [00:00:08.822,000] <debug> nrf_ble_gatt: max_tx_octets: 67 [00:00:08.822,000] <debug> nrf_ble_gatt: max_rx_time: 328 [00:00:08.822,000] <debug> nrf_ble_gatt: max_tx_time: 2120 [00:00:09.761,000] <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 1, procedure: Encryption [00:00:09.761,000] <info> app: Link status. Role: 1. conn_handle: 1, Procedure: 0 [00:00:09.859,000] <debug> nrf_ble_gatt: Peer on connection 0x1 requested a data length of 27 bytes. [00:00:09.859,000] <debug> nrf_ble_gatt: Updating data length to 27 on connection 0x1. [00:00:09.866,000] <debug> nrf_ble_gatt: Data length updated to 27 on connection 0x1. [00:00:09.866,000] <debug> nrf_ble_gatt: max_rx_octets: 27 [00:00:09.866,000] <debug> nrf_ble_gatt: max_tx_octets: 27 [00:00:09.866,000] <debug> nrf_ble_gatt: max_rx_time: 328 [00:00:09.866,000] <debug> nrf_ble_gatt: max_tx_time: 2120 |
I do not understand why the central first acknowledges with the 27/67 bytes data length after a request on 67 bytes. And why does the central lower the acceptable data length?
I am using the "BLE scanner" App on Android phone for testing. It should support data length > 20.
Any one have some experience?
I have read some guides that tells that besides defining your needed data length, you also needs to enable data length extension. But how? Is this done automatically by the softdevice?
BR
Kasper