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

Nordic UART buffer status upon connection loss, is there an expiration on queued packets?

Hi All, I am polishing the code that we have, working out minor bugs, etc, we use Nordic UART to exchange data between our device and smartphone or tablet, sometimes data is only 1 packet, sometimes 100 packets, so in case of large packets count we utilize BLE_EVT_TX_COMPLETE event to keep track of buffer availability and stuff more packets into it when some availablity opens up and so on and on until we send all accumulated data. However, I came across couple minor bugs so I think I need to revise a code a little bit but for that I want to understand couple things that I cannot quite find answer using search. We use NRF52 with SD132 v.5.0.0

1. I noticed the it has been mentioned in some posts that BLE_EVT_TX_COMPLETE gets triggered when one or more packets have been send, I was under impression that it gets triggered individually per each sent packet? If this is true and BLE_EVT_TX_COMPLETE returned not individually per packet but per group of packets, how can I read how many packets have been sent?

2. When some packets in the buffer do not get sent out for some reason, for example a deliberate disconnect on the other side, or out reach signal loss, do those packets sit in the buffer until next connect happens and then they will be attempted to be sent out, or they have some kind of expiration?

3. Similar to #2 question, if packet cannot be sent with first try, how many times it retried by SoftDevice before it fails? 

Thank you.

 

Related