Maximum NUS packet payload with BLE data length extension.

Hi!

I am confused regarding NUS, L2CAP, ATT and GATT.

We are using NUS with data length extension to communicate between two nRF52840 boards and want to maximize packet size to increase transfer efficiency. Question is what is the maximum payload so that the BLE packet doesn't get fragmented?

So far I have arrived to number 247, based on the following information. Is that correct?

  • - BLE specification limits payload to 251
  • - GPT claims that NUS-handled data are always enclosed in a L2CAP packet, thus adding 4 byte header and reducing effective payload to 247
  • - NUS operates within GATT, but that is supposed to somehow not eat up any more data of the packet

Related