BLE MTU size

Hi,

I’m working on an nRF5340 using nRF Connect SDK v2.7.99-cs2.
BLE security is configured as Just Works (Security Mode 1, Level 2) on the peripheral.

I want to increase the speed of HTTP communication over BLE. To achieve this, I tried increasing the MTU size from 247 bytes to 512 bytes. However, when I set the MTU to 512 bytes, the firmware upgrade doesn’t work. I also tested with an MTU size of 500 bytes, but the firmware upgrade still fails.

So, I want to know:

  1. Why does the firmware upgrade fail when using larger MTU sizes like 500 or 512 bytes?
  2. Besides MTU size, are there any other BLE configurations I can adjust to further increase the data transmission speed?
  • Check .config (build/zephyr subdir) for CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE. Must be bigger than BTLE MTU, try 1024 bytes.

    My samples here run CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=2475

    But that is rather big for shell command buffers (dummy backend is configured to use 2KB buffer).

    BTLE speed can be increased with lower connection interval parameters, but with a 512 MTU only up to a point. I've managed to push 100KByte/sec reading from an SD card (SPIM)  while transferring the data out via BTLE notifications in parallel. SoC is NRF5340.

    But that code does not use mcumgr transport, that one should be a bit slower.

Related