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

Streaming data over BLE without any ACK

Hello,

I'm trying to stream data at ~ 30KB/s rate. I use nRF52840 development board with S140 as peripherial and smartphone with "nRF Connect" app as central. UART example works fine and I can send mentioned data in short range, but data rate decrease after distance between phone and nRF board increases. As far as I understant UART example uses notifications to send data and notifications has ACK in Link Layer. So increasing range lower my data transfer speed.

In my case packet loss is tolerable and i'm even curious how distance between devices affect packet loss. Every packet has index so after streaming i want to calculate how many packets were lost.

So I wand to ask if there any way to stream data without any ACK?

Thanks.

Parents
  • Hi Rytis

    I think you've misunderstood here. Notifications do not need acknowledgments for each packet sent. A notification allows you to queue a certain number of packets before sending, and once the buffer is full, you get a NO_TX_BUFFERS error back from sd_ble_gatts_hvx(). When a packet has been sent you'll get a BLE_EVT_TX_COMPLETE event and should be able to queue further packets.

    Indications, however, must do an application layer ACK when sending data, making it slower than notifications.

    You can check out this great guide to see how to maximize throughput in your application.

    Best regards,

    Simon

Reply
  • Hi Rytis

    I think you've misunderstood here. Notifications do not need acknowledgments for each packet sent. A notification allows you to queue a certain number of packets before sending, and once the buffer is full, you get a NO_TX_BUFFERS error back from sd_ble_gatts_hvx(). When a packet has been sent you'll get a BLE_EVT_TX_COMPLETE event and should be able to queue further packets.

    Indications, however, must do an application layer ACK when sending data, making it slower than notifications.

    You can check out this great guide to see how to maximize throughput in your application.

    Best regards,

    Simon

Children
No Data
Related