<?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>Heartbeat publication set sets wrong parameters using interactive pyaci</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33545/heartbeat-publication-set-sets-wrong-parameters-using-interactive-pyaci</link><description>Hi Folks, 
 I found that the interactive pyaci is setting wrong parameters if I try to set the heartbeat publication. 
 What I did: 
 Python: 
 cc.heartbeat_publication_set(0xfffe,0xdd,0xcc,0x64,0x0000,0x0000) Response: ttyACM0.ConfigurationClient: Heartbeat</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Apr 2018 11:53:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33545/heartbeat-publication-set-sets-wrong-parameters-using-interactive-pyaci" /><item><title>RE: Heartbeat publication set sets wrong parameters using interactive pyaci</title><link>https://devzone.nordicsemi.com/thread/129547?ContentTypeID=1</link><pubDate>Tue, 24 Apr 2018 11:53:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2de556c8-c332-47cc-a04f-89038802092f</guid><dc:creator>a.wallwitz</dc:creator><description>&lt;p&gt;Thanks it works &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Answer was marked as solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heartbeat publication set sets wrong parameters using interactive pyaci</title><link>https://devzone.nordicsemi.com/thread/129451?ContentTypeID=1</link><pubDate>Tue, 24 Apr 2018 06:49:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:460738a9-7181-445b-bd34-ea46e11d2377</guid><dc:creator>Thomas Stenersen</dc:creator><description>&lt;p class="part"&gt;Hi Andrej,&lt;/p&gt;
&lt;p class="part"&gt;Inspecting the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;heartbeat_publication_set()&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;method, I see you&amp;rsquo;ve uncovered a small bug. I&amp;rsquo;ve reported (and fixed) this internally, here&amp;rsquo;s the diff:&lt;/p&gt;
&lt;pre class="part"&gt;&lt;code class="diff hljs"&gt;modified   scripts/interactive_pyaci/models/config.py
@@ -387,7 +387,7 @@ class ConfigurationClient(Model):
                                   feature_bitfield=0, netkey_index=0):
         message = bytearray()
         message += struct.pack(
&lt;span class="hljs-deletion"&gt;-            &amp;quot;&amp;lt;HBBBHH&amp;quot;, dst, log2b(count), log2b(count), ttl, feature_bitfield, netkey_index)&lt;/span&gt;
&lt;span class="hljs-addition"&gt;+            &amp;quot;&amp;lt;HBBBHH&amp;quot;, dst, log2b(count), log2b(period), ttl, feature_bitfield, netkey_index)&lt;/span&gt;
         self.send(self._HEARTBEAT_PUBLICATION_SET, message)
&lt;/code&gt;&lt;/pre&gt;
&lt;p class="part"&gt;Notice that this method takes&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;count&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;period&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and packs them according to spec (p. 147 of the Mesh Profile specification v1.0) using the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;log2b()&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;function. This limits the list of valid values to only be those that is a power of 2. Your 0xdd (221) is rounded down to 0x80 (2&lt;sup&gt;(8-1)&lt;/sup&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;= 128). In the data sent to the mesh device, you&amp;rsquo;ll see that the count and period is sent as 0x08 and 0x08, this gives 2&lt;sup&gt;8-1&lt;/sup&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;= 128.&lt;/p&gt;
&lt;p class="part"&gt;Please let me know if anything is unclear.&lt;/p&gt;
&lt;p class="part"&gt;Hope this helps,&lt;br /&gt;Thomas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heartbeat publication set sets wrong parameters using interactive pyaci</title><link>https://devzone.nordicsemi.com/thread/129082?ContentTypeID=1</link><pubDate>Fri, 20 Apr 2018 07:11:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9614c96c-6711-44aa-85ad-dd60468c78a5</guid><dc:creator>a.wallwitz</dc:creator><description>&lt;p&gt;No it&amp;#39;s not. I just added the information to let you know that the opcode is correct and which sdk version I&amp;#39;m using. The problem itself still exists.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heartbeat publication set sets wrong parameters using interactive pyaci</title><link>https://devzone.nordicsemi.com/thread/128956?ContentTypeID=1</link><pubDate>Thu, 19 Apr 2018 11:40:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7de7554-8ebe-4cb6-9c7e-0ec1fdcef954</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;is it working ok in the latest release? if that is the case, then i can mark your reply as valid answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heartbeat publication set sets wrong parameters using interactive pyaci</title><link>https://devzone.nordicsemi.com/thread/128807?ContentTypeID=1</link><pubDate>Wed, 18 Apr 2018 13:00:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03c4ca61-7e7e-47c8-80a8-7e76099321c4</guid><dc:creator>a.wallwitz</dc:creator><description>&lt;p&gt;I&amp;#39;m using Mesh SDK 2.0 that got released today.&lt;br /&gt;&lt;br /&gt;And the OpCode I receive on the device side is:&lt;br /&gt;&amp;lt;t: 8134821&amp;gt;, access.c, 291, RX: [aop: 0x8039]&lt;br /&gt;which is&amp;nbsp;Config Heartbeat Publication Set and looks ok.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>