Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Rx Fail - Unpredictable message delivery

Rank

Total Posts: 3

Joined 2015-07-20

PM

I am seeing some very strange behavior when using an ANT channel with the sd_ant_acknowledge_message_tx call to guarantee message deliveries between a master and slave. The behavior is observed between two nRF51422 devices running the 310 softdevice and using bidirectional auto synchronous channels.

My implementation on both the master and slave is as follows:

If event->eventCode == EVENT_TRANSFER_TX_COMPLETED send a new message.

else if event->eventCode == EVENT_TRANSFER_TX_FAILED resend the same message.

This setup mostly works fine, however whenever a slave receives an EVENT_RX_FAIL, the master may receive a message other than the last message sent to the softdevice (on the slave device).

I have attempted to clear the pending transfer on the EVENT_RX_FAIL event, but this does not stop incorrect messages from being sent.

Has anyone had any experience with this type of error before? Any help would be appreciated.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Just to be clear, you are seeing that when the slave sees an "EVENT_RX_FAIL", you expect the master to resend that failed message but instead it's sending the new message because it saw "EVENT_TRANSFER_TX_COMPLETED" instead of "EVENT_TRANSFER_TX_FAILED"?

Or also vice versa, if the master does not see a message from the slave after an "EVENT_TX", you expect the slave to resend the failed message but it sends a new message instead?      
Rank

Total Posts: 3

Joined 2015-07-20

PM

Actually neither. I have found a solution to the problem though:

The behavior I was seeing actually was a result of a single master being connected to two different slaves over the same channel. When one slave A would get an EVENT_RX_FAIL, it would have been because slave B had successfully transmitted. This is why the master seemed to get an out of sequence message when the first slave received an EVENT_RX_FAIL.

Hope this helps anyone who stumbles across this issue in the future smile