Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 4 months ago.
requestMtu ?
Hello,
I'am using the dev kit STM Discovery Node A1 (target DISCO_L475VG_IOT01A).
I want to increase the Mtu but the reply is always 23...
Is it possible to increase Mtu size ?
D/RxBle#ConnectionOperationQueue: STARTED MtuRequestOperation(216468032) D/BluetoothGatt: configureMTU() - device: DE:32:43:33:0F:D3 mtu: 158 D/BluetoothGatt: onConfigureMTU() - Device=DE:32:43:33:0F:D3 mtu=23 status=0 D/RxBle#BluetoothGatt: onMtuChanged mtu=23 status=0 D/RxBle#ConnectionOperationQueue: FINISHED MtuRequestOperation(216468032) in 81 ms
Thanks a lot for your help.
2 Answers
5 years, 2 months ago.
Hi.
How can I change it for the nRF52-DK device? And, how can I configure it using the mbed-app.json file?
Thank you.
5 years, 4 months ago.
Hi Anthony,
For configuring MTU size, there are two change needed.
mbed-os\features\FEATURE_BLE\targets\TARGET_CORDIO\stack\cordio_stack\ble-host\sources\stack\cfg\cfg_stack.c
/* Configuration structure */ attCfg_t attCfg = { 15, /* ATT server service discovery connection idle timeout in seconds */ 158, /* desired ATT MTU */ ATT_MAX_TRANS_TIMEOUT, /* transcation timeout in seconds */ 4 /* number of queued prepare writes supported by server */ };
and
mbed-os\features\FEATURE_BLE\targets\TARGET_CORDIO\source\CordioBLE.cpp
void BLE::stack_setup() { ... HciSetMaxRxAclLen(158); ... }
With above two changes, you should be able to request MTU size=158.
- Desmond, team Mbed