Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

NRF52840: How to resend packet immediately when send packet to peer failed?

Hello! This is my problem.

  • SDK:SDK17
  • Softdevice : S140
  • Board: nrf52840

The connect interval is 135ms. But the latency I test is larger than connect interval. So, I used sniffer to find the problem.  

I find the first packet was sent to slave, but no response. So, master sent it again after one interval. This made the latency large.

How to resend it immediately to reduce the latency? I can't reduce the interval because some reasons.

In addition, my SLAVE_LATENCY is 0. This picture looks like slave latency is 1.

Parents
  • Hi

    When a packet isn't received correctly, the master will wait out the connection interval for a response before trying to send a new packet if it doesn't get a response. After the event lengths was added to the BLE specification, if there is room for an event within the event length of the connection interval, the next event can fit if the same interval if another event fits within your connection interval. The other option would be to mitigate the number of missed packets somehow by increasing TX/RX power and maybe physically reduce the range between the two devices, but these missed packets will still happen now and again, as the BLE specification won't provide a 100% packet success rate.

    Best regards,

    Simon

Reply
  • Hi

    When a packet isn't received correctly, the master will wait out the connection interval for a response before trying to send a new packet if it doesn't get a response. After the event lengths was added to the BLE specification, if there is room for an event within the event length of the connection interval, the next event can fit if the same interval if another event fits within your connection interval. The other option would be to mitigate the number of missed packets somehow by increasing TX/RX power and maybe physically reduce the range between the two devices, but these missed packets will still happen now and again, as the BLE specification won't provide a 100% packet success rate.

    Best regards,

    Simon

Children
No Data
Related