<?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>ANT dynamic device ID</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77649/ant-dynamic-device-id</link><description>Dear Nordic team, 
 We are deveopping BLE &amp;amp; ANT enabled display. Because it is a mass production product we need to do an automation for asigning devices destinguesed ID. For BLE we manadge to do that, but for ANT we are struggling. 
 It doesn&amp;#39;t let us</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Jul 2021 06:51:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77649/ant-dynamic-device-id" /><item><title>RE: ANT dynamic device ID</title><link>https://devzone.nordicsemi.com/thread/321699?ContentTypeID=1</link><pubDate>Mon, 26 Jul 2021 06:51:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c0662d2-d71e-47b1-9b36-f7034e07b925</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Ram&lt;/p&gt;
&lt;p&gt;I would recommend single stepping through the code then, and double check what the&amp;nbsp;&lt;span&gt;&lt;em&gt;p_config&lt;/em&gt; struct is set to before&amp;nbsp;&lt;em&gt;ant_channel_init()&lt;/em&gt; is called.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;br /&gt;Torbjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT dynamic device ID</title><link>https://devzone.nordicsemi.com/thread/321527?ContentTypeID=1</link><pubDate>Fri, 23 Jul 2021 09:42:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7d13522-d6da-48e0-a06f-5f7ff7e6305d</guid><dc:creator>roar</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure what went wrong, but when scanning with ANT display, I see same number as defined in config, without any change.&lt;/p&gt;
&lt;p&gt;Regards, Ram&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT dynamic device ID</title><link>https://devzone.nordicsemi.com/thread/321500?ContentTypeID=1</link><pubDate>Fri, 23 Jul 2021 08:07:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72fd4fbb-7e67-43df-af85-c8667ebc6962</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Ram&lt;/p&gt;
&lt;p&gt;Why didn&amp;#39;t it work?&lt;/p&gt;
&lt;p&gt;Is the device_number field overwritten by some of the ant_hrm functions?&lt;br /&gt;I tried to look through the code, but couldn&amp;#39;t find any point where this appears to happen.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you end up having no other choice than to change one of the SDK functions I recommend making a local copy of the source file, and applying the changes there. Then it will not affect any of the other projects.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just make sure to remove the original file and add the local copy in your project settings.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT dynamic device ID</title><link>https://devzone.nordicsemi.com/thread/321286?ContentTypeID=1</link><pubDate>Thu, 22 Jul 2021 09:37:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8955c03b-c112-441e-831f-c506dde81551</guid><dc:creator>roar</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn&lt;/p&gt;
&lt;p&gt;Thenx for suggestion (a small typo - .device_number, not channel). But that didn&amp;#39;t work. I had another look in the code and managed to &amp;quot;solve&amp;quot; the problem by changing follow function:&lt;/p&gt;
&lt;p&gt;- in ant_channel_config.c&lt;br /&gt;- uint32_t ant_channel_init(ant_channel_config_t const * p_config)&lt;br /&gt;- change &amp;quot;Set Channel ID&amp;quot; -&amp;nbsp; &amp;quot;p_config-&amp;gt;device_number&amp;quot; to whatever you like&lt;/p&gt;
&lt;p&gt;But keep in mind thatt this file is shared with other projects, so it isn&amp;#39;t an elegant solution. I will be happy to hear from you for a better one.&lt;/p&gt;
&lt;p&gt;Regards, Ram&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT dynamic device ID</title><link>https://devzone.nordicsemi.com/thread/321144?ContentTypeID=1</link><pubDate>Wed, 21 Jul 2021 13:20:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e29817f4-c34e-43e0-ade5-e6a0b6fe002a</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Ram&lt;/p&gt;
&lt;p&gt;It is possible to assign the result of the HRM_SENS_CHANNEL_CONFIG makro into a variable, so that you can change the values dynamically as you want.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can do this in the &lt;em&gt;profile_setup()&lt;/em&gt; function, before the call to &lt;em&gt;ant_hrm_sens_init(..)&lt;/em&gt;, as shown here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// Write the static config into a variable
ant_channel_config_t *channel_config = HRM_SENS_CHANNEL_CONFIG(m_ant_hrm);

// Make your changes here
channel_config-&amp;gt;channel_number = 12;

// Point to channel_config here
err_code = ant_hrm_sens_init(&amp;amp;m_ant_hrm, channel_config,
                             HRM_SENS_PROFILE_CONFIG(m_ant_hrm));
APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT dynamic device ID</title><link>https://devzone.nordicsemi.com/thread/320866?ContentTypeID=1</link><pubDate>Tue, 20 Jul 2021 11:01:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:802eedf3-da52-464c-8eb4-25c5ae99fb37</guid><dc:creator>roar</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn,&lt;/p&gt;
&lt;p&gt;first thank you for your response.&lt;/p&gt;
&lt;p&gt;I agree with you that it should be possible to change to regular. The simplest thing will be if we have a look in HRM example.&lt;/p&gt;
&lt;p&gt;We are using:&lt;br /&gt;- \nRF5_SDK_&lt;strong&gt;17.0.2&lt;/strong&gt;_d674dde&lt;br /&gt;- s332 (but for simplicity sake we can test HRM with &lt;strong&gt;s212&lt;/strong&gt;)&lt;br /&gt;- Dev kit, pca10040&lt;br /&gt;- example location, nRF5_SDK_17.0.2_d674dde\examples\ant\ant_plus\ant_hrm\hrm_tx\pca10040\s212\ses&lt;/p&gt;
&lt;p&gt;Short explanation:&lt;br /&gt;- Dev ID is in -&amp;gt;&amp;nbsp; sdk_config.h&amp;nbsp;&amp;nbsp; -&amp;gt;&amp;nbsp;&amp;nbsp; //#define CHAN_ID_DEV_NUM&amp;nbsp; (I think it is something around 50)&lt;br /&gt;- This number should be uint16_t&amp;nbsp; long&lt;br /&gt;-&amp;nbsp; We are using it in main.c at beginning (code bellow)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;HRM_SENS_CHANNEL_CONFIG_DEF(m_ant_hrm,
                            HRM_CHANNEL_NUM,
                            CHAN_ID_TRANS_TYPE,
                            CHAN_ID_DEV_NUM,
                            ANTPLUS_NETWORK_NUM);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;- Which is called in ant_hrm.h (code bellow)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static const ant_channel_config_t   CONCAT_2(NAME,_channel_hrm_sens_config) =   \
    {                                                                           \
        .channel_number    = (CHANNEL_NUMBER),                                  \
        .channel_type      = HRM_SENS_CHANNEL_TYPE,                             \
        .ext_assign        = HRM_EXT_ASSIGN,                                    \
        .rf_freq           = HRM_ANTPLUS_RF_FREQ,                               \
        .transmission_type = (TRANSMISSION_TYPE),                               \
        .device_type       = HRM_DEVICE_TYPE,                                   \
        .device_number     = (DEVICE_NUMBER),                                   \
        .channel_period    = HRM_MSG_PERIOD_4Hz,                                \
        .network_number    = (NETWORK_NUMBER),                                  \
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;Regards, Ram&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT dynamic device ID</title><link>https://devzone.nordicsemi.com/thread/320835?ContentTypeID=1</link><pubDate>Tue, 20 Jul 2021 07:57:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37b33352-d615-403e-af3e-fe417e8ccceb</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately the ANT experts in the group are on holiday this month, but I will do my best to help you in the mean time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you able to show me&amp;nbsp;your ANT initialisation code?&lt;/p&gt;
&lt;p&gt;I would assume it should be possible to replace the constant values with dynamic values (or vice versa), but I am not very familiar with these API&amp;#39;s.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also can you let me know which nRF device you are using, and which SDK and SoftDevice?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>