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
  • Dear Susheel,

    I wanted to update you on the progress I have made in optimizing the peripheral code. I have managed to make it send regular packets every 16.66 ms, as can be seen in the following images. It is worth noting that these measurements were taken with only one peripheral sending data to the central device, despite the central device being configured to support up to 16 peripherals.

    However, the central device is still receiving irregular packets, even when only one peripheral is sending data (as shown in the following images).

    I should mention that in the first set of images (showing regular packets from the peripheral), the GPIO pin is set when the Kalman filter and BLE sending start and then cleared when the BLE module returns "NRF success". Does this mean that the sending (and consequently receiving on the central side) has been completed successfully and that the irregularities may be due to the BLE_NUS_C_EVT_NUS_TX_EVT event occurring irregularly?

    I hope this update helps us narrow down the issue further.

    Best regards, Vahid Foroutan

Reply
  • Dear Susheel,

    I wanted to update you on the progress I have made in optimizing the peripheral code. I have managed to make it send regular packets every 16.66 ms, as can be seen in the following images. It is worth noting that these measurements were taken with only one peripheral sending data to the central device, despite the central device being configured to support up to 16 peripherals.

    However, the central device is still receiving irregular packets, even when only one peripheral is sending data (as shown in the following images).

    I should mention that in the first set of images (showing regular packets from the peripheral), the GPIO pin is set when the Kalman filter and BLE sending start and then cleared when the BLE module returns "NRF success". Does this mean that the sending (and consequently receiving on the central side) has been completed successfully and that the irregularities may be due to the BLE_NUS_C_EVT_NUS_TX_EVT event occurring irregularly?

    I hope this update helps us narrow down the issue further.

    Best regards, Vahid Foroutan

Children
No Data
Related