BLE MTU size



  • Is it possible to increase BLE MTU size?
    From some one year old posts, I've saw that at that time it wasn't implemented. What is current state of that feature?

    For now limitation is 20 bytes? Am I right?



  • I have the same opinion as @jcaron . MTU size is something that has to be configurable. We should be able to set MTU size of Pycom. Changing is not going to break anything in case of good implementation (I've already tried it with Pycom).

    @Emmanuel-Florent the reason I've started this topic is that I've experience with ESP32-DevKitC and BLE MTU size changing, on that size everything worked fine, so I'm just requesting the same functionality on Pycom if possible.



  • @emmanuel-florent the BLE spec actually includes MTU negotiation, so it’s incorrect to state that you can’t change it without breaking things.

    However support for changing the MTU is not universal, and various types of devices may also have different default or maximum values, and that may change based on the role (central or peripheral) and possibly other parameters.

    Depending on the usage scenario (i.e. what devices are at each end and in which role), It may or may not be possible to negotiate a different MTU.

    I have no idea what the hardware and/or software support for this is in the ESP32 in general and the Pycom stack specifically, though.


  • Global Moderator

    @milan this is part of the BLE specification. If one would change the specification that could hurt client, server communication. What I once did to cancel the problem is to write to the characteristic chunks of 21 bytes and then write an empty byte b'' to let now the server message end and then crc check it. There is some kind of buffering that let you flood a characteristic and store incremental result with reliability. Hope that helps.



Pycom on Twitter