Data length update not correct.

Hello DevZone,

I am using a nRF52840 with sdk 17.0.2 with Windows 10

I am trying to setup a connection to my Windows PC but I noticed data fragmentation and a queue buildup.

I changed the data length and MTU in the sdk config, data length to 251 and MTU to 500.

I am trying to transmit roughly 250 bytes each connection interval at 10 ms interval. Most of the times this works perfectly out of the box but sometimes I notice a buildup in the notification queue.

After using the nRF BLE sniffer and wireshark I saw that in the data length negotiation, the correct amount of bytes is negotiated (251) but the amount of time I get does not.

My request is RX 251B & 2120us TX 251B & 2120us and my response is TX 251B 9576us RX 251B 328us.

I do not know why Im only allowed to have 328us communication time to transmit my payload. Seeing the datastream in wireshark I notice that my 250 byte payload is fragmented in 4 frames to not exceed this time.


I started my project based on the blinky example so I thought nothing further about setting up the Bluetooth connection correctly.
I also noticed other BLE Periphertal examples having the same issue where the request is done for  RX 251B & 2120us TX 251B & 2120us  and the response always has the 328us time, limiting my thoughput.

This same behavior is seen on Windows 11, android phone and a macbook. Only Linux allows our request.


Is there a configuration set I am missing or how do I tackle this.

Kind regards

Parents
  • Hi

    If you want to maximize throughput I'd recommend checking out the ATT_MTU throughput example project here as reference at the least, as I assume you might have missed a step towards the extended data size, but I'm not able to see it right now. Are you using extended advertising for example, and what is the connection interval set to in your application?

    Best regards,

    Simon

  • I am not using extended advertising and my connection interval is set to 10ms.

    I'm not interested in fine tuning the throughput, I already have done this using two development kits.

    The problem I'm facing is that I want to have the same connection between my Windows PC instead of using a development kit I get issues with negotiating the data length.

    In the SDK config I have #define NRF_SDH_BLE_GAP_DATA_LENGTH 251 and #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 500

    This works perfectly when communicating between two development kits since they both accept the data length and the time to send/receive but not when I connect the same board to my PC.

Reply
  • I am not using extended advertising and my connection interval is set to 10ms.

    I'm not interested in fine tuning the throughput, I already have done this using two development kits.

    The problem I'm facing is that I want to have the same connection between my Windows PC instead of using a development kit I get issues with negotiating the data length.

    In the SDK config I have #define NRF_SDH_BLE_GAP_DATA_LENGTH 251 and #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 500

    This works perfectly when communicating between two development kits since they both accept the data length and the time to send/receive but not when I connect the same board to my PC.

Children
No Data
Related