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

Notification frequency

Hi

I'm using nrf51 to notify some data to an andriod device. I set the connection interval of my nrf51 program to 7.5ms. And I need to send 100 packets per second (20 bytes per packet). However, sometimes there are packets loss and I cannot receive 100 packets per second. So what could I do wrong to cause the packets loss? Thank you!

  • I checked the error code and it's the tx buffer problem as you said. Thanks a lot!

    I solved the problem by this way: resent the packet if error code is returned until NRF_SUCCESS is returned. But in this way, 100 packets per second may not be able to achieve when there are tx buffer problems in 1 second. Is there any better solution to send 100 packets per second?

  • It should be easily achievable if your receiver is in good range. It is possible to send 133 notifications (assuming one packet per connection interval, 7.5ms interval), so even when there are some retransmissions, 100 packets should be send.

  • OK. I will do more test on it. Thank you a lot Wojtek!

  • Oh, just one more thought: if you are trying connection with android device, it is highly propable that you dont have 7.5ms connection interval! many smartphones dont accept that. However, they often allow more than one packet/connection interval. But you should not depend on that if you are developing public app, because it is not standarized between phones and some accept long connection interval and ex. only 2 packets/connection, and some allow shorter interval and for example 4 packets/connection. So, achieving high throughput between bluetooth smart device and smartphone could be quite problematic. as far as i know (i am not really into mobile development...) it also depends of android version installed - in 7.0 shorter connection intervals could be rejected.

  • Yes. I was considering about the connection interval problem on android when I posted this question. Actually I'm developing a private android application and a ble application on nrf51. In current stage, the client didn't require a public application but the problem should be considered if they want it to be public in the future. Thank you wojtek! You helped me a lot!

Related