<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>First ANT message ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90638/first-ant-message</link><description>Dear Members, 
 
 How can we determine the first ANT message from my transmitter ? 
 We saw from ant_parameters.h, 
 
 Which variable is being used ? 
 
 
 
 Kind regards, 
 Rixtronix</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Aug 2022 11:24:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90638/first-ant-message" /><item><title>RE: First ANT message ?</title><link>https://devzone.nordicsemi.com/thread/381545?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2022 11:24:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f08b3107-9e98-455c-9310-ad504e521475</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I suggest to read from the ANT Message Protocol and Usage document to understand ANT and Burst transfer:&lt;br /&gt;&lt;a href="https://www.thisisant.com/resources/ant-message-protocol-and-usage/"&gt;https://www.thisisant.com/resources/ant-message-protocol-and-usage/&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The api naming and event may have slightly changed over time, but the low level implemenation and consept is still the same as in the document.&lt;/p&gt;
&lt;p&gt;In specific chapter 5.4.3, 9.5.5.3 and 9.5.5.4 describes implementation.&lt;/p&gt;
&lt;p&gt;It may also be a good idea to run the advanced burst example for better understanding:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ant_advanced_burst.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ant_advanced_burst.html&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Looking at the implementation of ant_evt_handler() in ant_advanced_burst.c you can find handling of EVENT_RX and check for MESG_BURST_DATA_ID. It is extraxting the sequence number of the burst packet from&amp;nbsp;&lt;/p&gt;
&lt;p&gt;m_sequence_number =&amp;nbsp;SEQUENCE_NUMBER_MASK &amp;amp; p_ant_evt-&amp;gt;message.ANT_MESSAGE_ucChannel;&lt;/p&gt;
&lt;p&gt;From chapter 9.5.5.3 you can find:&lt;/p&gt;
&lt;p&gt;&amp;quot;The upper three bits of the channel number field are used as a sequence number to ensure transfer integrity. The transmit MCU must ensure that the sequence numbers are generated correctly in order for the ANT burst state machine to function correctly. The first packet of a burst transfer will have a sequence number of %000. The sequence number is then incremented with %001 for each successive packet in the transfer rolling over back to %001, when a value of %011 is reached. The most significant bit of the sequence bits %100 is used as a flag to indicate the last packet in a Burst Transfer.&amp;quot;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>