This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What is the most efficient way to transmit hex bytes over BLE? I'm aiming for 1.1 Mbps

Hi,

I'm trying to write firmware for the nrf52840 that reads from a sensor and then sends data to a PC over BLE. Ultimately, I need the BLE link to achieve ~ 1.1 Mbps throughput (which is doable with BLE 5 from my understanding).

Right now I'm stuck at around 100 kbps and am looking for pointers on how to improve this. I've increased my NRF_SDH_BLE_GATT_MAX_MTU_SIZE to 251 and adjusted the memory appropriately on both my sending nrf52840 and the receiving nrf52840.  I've also lowered my connection time to 7.5 ms. Lastly, I've also set NRF_BLE_SCAN_SCAN_PHY to 2Mbps.

One thing that's interesting is that from my understanding, the MAX_MTU_SIZE is in 8 bit 'bytes' ... but if I try to send test strings greater than 248 chars... well I can't. Nothing goes through. This is odd because I thought by default, the nordic examples break large packets into smaller packets and sends them one after another.

For reference, I'm using soft device S140, SDK v16, and I've built my code off the USBD_BLE_UART central and peripheral examples. 

Any help/advice would be much appreciated, thank you!!

Parents Reply
  • So I've added the queued write module (m_qwr) an enabled the corresponding options in my sdk_config.h, but that didn't seem to fix anything.

    Also what data length extensions are referring to? I thought I'm already at the max.

    Lastly, I realized I made a mistake, I was actually sending 248 uint8_t bytes when I thought I was sending 248 chars. So right now I can send the full 248 bytes without an error but if I try to go over that then it breaks.

    Regardless, even if I send packets that are just 65 bytes in length I still can't get anywhere near 1Mbps throughput. I'm still stuck somewhere around 80 kbps...

    Thank you for your help/pointers!!

Children
Related