Receive regular Ble packets from multiple peripherals

Dear Nordic support team,

We are currently working on a motion tracking project that involves sending quaternion matrices from 8 individual devices (custom boards with nRF52840) to a central device (nRF52840 dongle). The peripherals are programmed to send packets every 16.8ms (59.5 Hz refresh rate), and the central device receives these packets and prints them on the com port using the USB CDC ACM module. However, we have noticed that when only one device sends data, the data on the com port is regular, with delta_t~=15ms. But when multiple devices send data, the received data (two successive packets from one specific device) on the com port is irregular, and the timestamps vary from 1 to 80ms.

We do not believe that the issue is with the peripheral devices because they are programmed to send data regularly and independently from the central device (which does not send any data to the peripherals). We have also tested the USB module and found that it is rarely the cause of the issue, as it can write test data every 500us on the com port. However, we suspect that the problem is related to the central device's concurrent receive function, which may be affecting its performance.

We are currently using a code for the central device that can be found at https://github.com/NordicPlayground/nrf52-ble-app-uart-c-multilink. We have attached the main and configuration files for both the peripheral and central devices. We would greatly appreciate your help in resolving this issue, as we require the motion data to be received regularly. Is it possible to receive 8 packets every 15ms regularly?

Thank you for your support, help, and time.

Best regards.

Parents
  • Hi, 

    The bottleneck is most likely in your central device. You need to benchmark the postprocessing time of each packet received in central (from each peripheral) from the time your application receives it to the instance the processed packet info is sent to the USB_CDC ACM (inside the USB driver). 

    If 8 peripherals are sending packets each at ~16ms period, then the central is receiving these packets at the rate of ~2ms.  If the post processing of each packet from the time it is received by the BLE controller->application processing->USB_CDC handling is greater than 2ms, then you have a bottleneck in the post processing of the incoming packets. This is not a defect in the central, but a limitation on how much processing you can do on a single core MCU with a limited processing speed.

Reply
  • Hi, 

    The bottleneck is most likely in your central device. You need to benchmark the postprocessing time of each packet received in central (from each peripheral) from the time your application receives it to the instance the processed packet info is sent to the USB_CDC ACM (inside the USB driver). 

    If 8 peripherals are sending packets each at ~16ms period, then the central is receiving these packets at the rate of ~2ms.  If the post processing of each packet from the time it is received by the BLE controller->application processing->USB_CDC handling is greater than 2ms, then you have a bottleneck in the post processing of the incoming packets. This is not a defect in the central, but a limitation on how much processing you can do on a single core MCU with a limited processing speed.

Children
No Data
Related