Page 1 of 1

How to set the MTU for BLE Nimble

Posted: Sun Nov 07, 2021 3:15 am
by dazzalicious
Hi,

I have adapted the NIMBLE BLE examples blecent and bleprph and have a situation where my blecent ESP32-C3 chip is trying to write 192 values in a

Code: Select all

uint16_t [192]
array to the bleprph chip with the

Code: Select all

ble_gattc_write_flat()
function. At the moment only 20 of the values are being received. I think that I need to increase the MTU, but changing the skconfig file with

Code: Select all

idf.py menuconfig
from

Code: Select all

CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU=256
to 512 has no effect I still only receive the first 20 values.

Is there a way to increase the MTU to solve this? I would prefer to send the 192 values in one packet so I would prefer not to use the long write function.

I'm sorry if this is question asked often, I can't seem to get the search button on the forum posts to show any similar posts.

Thanks
Darren

Re: How to set the MTU for BLE Nimble

Posted: Mon Oct 17, 2022 11:32 am
by toljatyr
It is not enough to set your local MTU size but the App also has to request an increased MTU size