How to set the MTU for BLE Nimble

dazzalicious
Posts: 1
Joined: Sun Nov 07, 2021 2:53 am

How to set the MTU for BLE Nimble

Postby dazzalicious » Sun Nov 07, 2021 3:15 am

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

toljatyr
Posts: 13
Joined: Mon Mar 07, 2022 10:39 am

Re: How to set the MTU for BLE Nimble

Postby toljatyr » Mon Oct 17, 2022 11:32 am

It is not enough to set your local MTU size but the App also has to request an increased MTU size

Who is online

Users browsing this forum: Majestic-12 [Bot] and 260 guests