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

Nrf8001 data events

Hi. I'm currently using nrf8001 and i need to send data consecutively and as fast as possible.

Connection interval used: 20ms

Data payload: 20bytes

Service pipe used: 3

When i send a data command, is it 100% sure that I'll receive the data event in the next connection interval? And what if I send another data command during receiving of the event? Will i receive the data event in the next connection interval?

I tried doing this when sending twenty 20-byte packets. However, rhe connection intervals used for the whole sending and receiving process is not consistent. Sometimes 23, or 26, or 28 etc. Why is it not consistent? Ideally, it should be like this right:

Send data

send data and receive event simultaneously (19 times)

Receive event

So counting the connection intervals, it should only take 21 intervals right?

  • Notifications are acknowledged on the link layer so you know the will be transmitted eventually. But there is no warranty it will be received in the next connection event. There could be re-transmissions, the peer could nack the packet or there could be packet errors all of which requires re-transmissions. apart from that you should be able to send 1 packet in each connection event on average. checking the data credits will tell you if the packet was successfully transmitted, as that will only be freed once a packet is acknowledged on the Link Layer. Note that this is lazy ack so the data-credit will not be freed before the next connection event.

Related