<?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>Trouble Logging Heartbeat</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110146/trouble-logging-heartbeat</link><description>Hi everyone, 
 I am curretly struggling with displaying the heartbeat messages trough UART in mesh. 
 I used the bt mesh sensor example as a starting point. I set up a mesh sensor server on a nrf52840dongle which sends some random data periodically to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Apr 2024 07:45:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110146/trouble-logging-heartbeat" /><item><title>RE: Trouble Logging Heartbeat</title><link>https://devzone.nordicsemi.com/thread/479613?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 07:45:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38de5d50-c6ab-404e-b7da-b0c1e7a2aea8</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Toni,&lt;/p&gt;
&lt;p&gt;I agree that what you notice about memory partition&amp;nbsp;sounds like a possible root cause for the NetKey issue.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s good to hear things are otherwise working as expected.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble Logging Heartbeat</title><link>https://devzone.nordicsemi.com/thread/479610?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 07:40:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:331ffcb3-33ed-4d7b-b8fe-53f0599446b9</guid><dc:creator>toni95</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;br /&gt;No problem! Thank you for this answer. Now it&amp;#39;s working properly. &lt;br /&gt;Although I have not checked your suggestions reagrding the NetKey I think I might know where this is coming from. Since I use nrf52840dongles besides one nrf52840DK I have custom memory partitions. This might be the case, but for now this is not a problem since everthing is working as supposed.&lt;br /&gt;&lt;br /&gt;Best&lt;br /&gt;Toni&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble Logging Heartbeat</title><link>https://devzone.nordicsemi.com/thread/479228?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 12:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0fce480-6400-4848-99ee-3300f96013e5</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Toni,&lt;/p&gt;
&lt;p&gt;My apology for taking such&amp;nbsp;a while. I believe the reason the callback was not properly registered is because you put&amp;nbsp;BT_MESH_HB_CB_DEFINE() inside a function instead of outside. See how it&amp;#39;s used in the Mesh Demo sample:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.5.99-ncs1/samples/bluetooth/mesh_demo/src/main.c#L162-L164"&gt;sdk-zephyr/samples/bluetooth/mesh_demo/src/main.c at v3.5.99-ncs1 · nrfconnect/sdk-zephyr (github.com)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regarding your new issue with the Unknown Netkey error log, the error indicates that the BT Mesh stack cannot find the NetKey with index 0x00. &lt;br /&gt;Given the context, could you check if it can be one of these more likely cases?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Calling Hearbeat APIs that requires the NetKey before the NetKey is restored from non-volatile memory, most often with settings_load().&lt;/li&gt;
&lt;li&gt;The Settings partition being corrupted, most often from accidental/incorrect Settings/NVS flash writes, i.e. when you have custom flash memory write operations.&lt;/li&gt;
&lt;li&gt;Calling Heartbeat APIs on an unprovisioned node.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble Logging Heartbeat</title><link>https://devzone.nordicsemi.com/thread/479151?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 08:56:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10165622-daa9-427b-92f2-bc94e0ed7ec2</guid><dc:creator>toni95</dc:creator><description>&lt;p&gt;I noticed that at initialization there is an error regarding the hb feature:&lt;br /&gt;&lt;br /&gt;[00:00:00.022,613] &amp;lt;inf&amp;gt; bt_hci_core: No ID address. App must call settings_load() &lt;br /&gt;Bluetooth initialized&lt;br /&gt;[00:00:00.022,827] &amp;lt;inf&amp;gt; sensor_client: Heartbeat callback structure defined&lt;br /&gt;&lt;br /&gt;[00:00:00.295,257] &lt;span style="color:#ff0000;"&gt;&amp;lt;err&amp;gt; bt_mesh_hb: Unknown NetKey 0x0000&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;I don&amp;#39;t know where this is coming from...&lt;br /&gt;Best,&lt;br /&gt;Toni&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble Logging Heartbeat</title><link>https://devzone.nordicsemi.com/thread/478573?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2024 13:37:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76ca2d34-4183-4606-aa47-7c591a3860a7</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Toni,&lt;/p&gt;
&lt;p&gt;Sorry but it has been a bit of time since I went into the Heartbeat feature.&amp;nbsp;My apology but I will need some time to refresh my knowledge.&lt;/p&gt;
&lt;p&gt;I will get back to you soon.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>