Unable to Transmit Sensor Data at the Configured Sampling Rate

I successfully read accelerometer data at 3000 samples per second. However, when transmitting the data over Bluetooth Low Energy (BLE), I am only able to send 200 samples per second.

  • The system has separate threads for:
    1. Reading sensor data at the desired rate (3000 Hz).
    2. Transmitting data via BLE.

Despite this, BLE transmission is significantly slower than the sensor sampling rate.

Request for Help

  • How can I optimize BLE transmission to handle a higher data rate?
  • Are there Zephyr BLE configurations that need to be adjusted?
  • Would notifications, PHY settings, or MTU size help improve throughput?

Any insights on improving BLE throughput would be greatly appreciated!

  

  • Hello,

    Let's say each sample is 4 bytes. Then you would need to achieve a throughput of 4 bytes * 8 bits/byte * 3000 samples = 93.75 kbps, which I expect should be possible for most connections with a decent link quality. But you will definitely need to include multiple samples in each notification packets to be able to transfer  >3000 samples / second.

    Here is a demo project you can use to test how many number of samples you can send from your device to a client:

    send_sensor_samples.zip

    Best regards,

    Vidar

Related