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

Sending acknowledged message always get NRF_ANT_ERROR_TRANSFER_IN_PROGRESS

Just want to know how acknowledged message works.

ANT document says there is no retry logic for acknowledged message. According to ANT protocol, acknowledged message should know it is failed for succeeded right away, but why it is hanging on NRF_ANT_ERROR_TRANSFER_IN_PROGRESS?

Thanks

  • By default when you call sd_ant_broadcast_message_tx() you will get EVENT_TX after next radio transfer.

    If you call sd_ant_acknowledge_message_tx() you will get either EVENT_TRANSFER_TX_COMPLETED or EVENT_TRANSFER_TX_FAILED depending on the message was received or not after next radio transfer.

    If you call sd_ant_acknowledge_message_tx() and get error return NRF_ANT_ERROR_TRANSFER_IN_PROGRESS, that is a response on attempt to communicate on a channel while a TX transfer is in progress. This is something that can occur since the ANT stack run asynchronous to the application code, the workaround when it occurs can be to retry until NRF_SUCCESS.

  • Thanks Kenneth. I got it working after read your answer. All good. Can you also have some thoughts about this question? Why sd_ant_acknowledge_message_tx() gives much more NRF_ANT_ERROR_TRANSFER_IN_PROGRESS than sd_ant_broadcast_message_tx?

Related