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

ble_app_uart_pca10040 with high data rate

I want to increase ble_app_uart_pca10040 app sample rate. I have my own board with microcontroller and use nrf52832 as uart to ble.

I made pack length to 20bytes, I have questions; Can we make uart active while ble send pack. How we make ble send time to 7.5ms And i see soft device send 6 pack one time, how to do this.

  1. Fill a buffer 6x20 than call "ble_nus_string_send" six time sequentialy.
  2. Fill a buffer 120byte and call "ble_nus_string_send" one for all 120byte.
Parents
  • Hi

    To take advantage of the capability in the SoftDevice to send multiple packets in the same connection interval you simply have to buffer several packets quickly. In other words, you can just call ble_nus_string_send() multiple times one after the other, that is correct. Please be aware that if the buffers in the SoftDevice fill up you will get an error message when you try to send more data, and you have to check this in the code to make sure you don't lose any data.

    What kind of BLE device are you using on the central side? Is it Nordic in both ends, or are you only using a Nordic device in the peripheral?

    If the BLE central device supports Bluetooth 4.2 then you probably want to take advantage of the extended MTU option, that allows you to send more than 20 bytes in each payload. For an example of this you could take a look at the mtu throughput example in the SDK: \nRF5_SDK_13.0.0\examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput

    The following example is also similar to ble_app_uart, while trying to push the data throughput to the maximum: github.com/.../nrf52-ble-image-transfer-demo

    Best regards
    Torbjørn

  • It's good to hear you figured it out :)
    Best of luck on the project.

Reply Children
No Data
Related