<?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>Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56889/friend-node-timeout-when-lpn-is-re-provisioned-with-same-address</link><description>There seems to be a bug in the mesh stack friendship code: the friend node times out infinitely when an LPN node is re-provisioned with the same address. 
 
 Steps to reproduce: 
 1. Program an nRF52-DK with the stock SDK light_switch_server: 
 2. Provision</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 May 2020 12:13:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56889/friend-node-timeout-when-lpn-is-re-provisioned-with-same-address" /><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/252402?ContentTypeID=1</link><pubDate>Fri, 29 May 2020 12:13:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44740caa-1317-41ff-bb3f-414f15f426bd</guid><dc:creator>sirio</dc:creator><description>&lt;p&gt;Ok, I see.&lt;/p&gt;
&lt;p&gt;Any tips or sample code on how to clear the replay cache would be much appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/252296?ContentTypeID=1</link><pubDate>Fri, 29 May 2020 05:48:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca83d6b3-a724-4a13-955f-a7b63e8548aa</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;There is no API call to do that. You will have to clear the replay cache manually.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/249532?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 14:47:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f14a884-e886-422d-8d7a-67c441174597</guid><dc:creator>sirio</dc:creator><description>&lt;p&gt;Thank you for the info.&lt;/p&gt;
&lt;p&gt;Is there a call to tell nodes that they should clear the replay list for a specific address (which has just been re-provisioned with the same address)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/248567?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 23:56:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d06d504-8d8f-4cb2-b192-14ca727f2bd1</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I currently don&amp;#39;t have any news about this. &lt;br /&gt;If you are having issues with this I would suggest to be sure to provision new devices using new addresses. &lt;br /&gt;If you need to use the same address you could manually clear the replay list, although it is not recommended due to security reasons.&lt;/p&gt;
&lt;p&gt;I will update the ticket if there is any new information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/247590?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 13:48:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f8e5217-b217-41fc-9df2-675dba06c9cb</guid><dc:creator>sirio</dc:creator><description>&lt;p&gt;Hello, any new information on this?&lt;/p&gt;
&lt;p&gt;Would be great to be able to resolve this issue, it shows up quite a bit when deploying mesh networks in the field.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/237745?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 12:56:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7b9ff6a-7818-4556-977d-2a6dbf96ecc5</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll forward this to our Mesh developers, so that they can comment on this. Will update the ticket when I get any feedback from them.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/237664?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 09:46:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef09a42f-feab-4262-be48-0ab0386efe3b</guid><dc:creator>sirio</dc:creator><description>&lt;p&gt;Thank you, response much appreciated.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I fear this problem is deeper than just &amp;quot;don&amp;#39;t use the nRF Mesh App for production&amp;quot; (we are not, but reporting issues with another app in the past I have been asked to reproduce with you nRF Mesh App).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As you have pointed out, once the mesh stack starts saving the replay list to flash, there will be NO way to re-provision a device with the same address and have it work reliably.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The problem goes deeper: there seems to be no key in the underlying JSON format to track previously-used addresses.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My understanding is that this JSON format follows a standard schema published by Buetooth SIG, yes?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, again, the question arises, we should be able to do something to preempt this replay list issue, should it be:&lt;/p&gt;
&lt;p&gt;1. Provisioner sets the correct sequence number on LPN when provisioning?&lt;/p&gt;
&lt;p&gt;2. Replay list is reset at provisioning-time somehow?&lt;/p&gt;
&lt;p&gt;3. JSON schema is extended to track all past addresses?&lt;/p&gt;
&lt;p&gt;4. Any other ideas?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We are looking for a hint about the proper approach to tackle this from our end.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/237345?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 09:20:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f80197b-d7da-4457-977a-9a5199caa71b</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;We do appreciate the feedback. and I&amp;#39;ll forward this internally so that it can be considered for any future releases.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would like to note that a power cycle of the device shouldn&amp;#39;t clear the replay list. For optimal security with regards to the replay protection, this should be saved to flash. I do believe this is going to be changed in a future release of the nRF5 SDK for Mesh.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, the nRF Mesh app isn&amp;#39;t actually supposed to be a used in a finalized product, but more as a development tool and a template for developing your own application. As a development tool, it might be good to have the option to provision a device with the same address. That way you can test that the replay protection actually works for your product.&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/236557?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 13:15:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27510f53-662e-42c1-ab8a-c6d91b779b86</guid><dc:creator>sirio</dc:creator><description>&lt;p&gt;I see what you are saying, but the net effect is:&lt;/p&gt;
&lt;p&gt;1. Device is removed and reprovisioned with nRF Mesh App&lt;/p&gt;
&lt;p&gt;2. Device can no longer talk to network&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I see how what the mesh stack is doing follows the specification, but the objective behavior for users is broken.&lt;/p&gt;
&lt;p&gt;Simply removing ONE device and adding a NEW, DIFFERENT device (which is given the same address by the nRF Mesh App) will trigger this bug - it is very easy to trigger in usual operations and results in &amp;quot;broken&amp;quot; behavior where the newly provisioned device cannot talk to the mesh.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Perhaps the nRF Mesh App might:&lt;br /&gt;1. Set the correct sequence number on LPN when provisioning?&lt;/p&gt;
&lt;p&gt;2. Track all past addresses and only provision never-before-used addresses?&lt;/p&gt;
&lt;p&gt;3. Any other ideas?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/236474?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 10:08:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2efdaa5-bf26-4dbc-929b-d81e428fcd8f</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;This can&amp;#39;t actually be classified as a bug, as this is the expected behavior of the replay protection. If a device with the same address starts sending messages with a lower sequence number than expected, the replay protection should filter these messages. This does not only affect the LPN.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can manually clear the replay list on the LSS. Note that this is not recommended as th&lt;span&gt;is will cause a security issue since a device will then allow all incoming messages –&amp;nbsp;&lt;/span&gt;&lt;em&gt;enabling an attacker to replay old messages&lt;/em&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you need to re-provision a device, I recommend that you provision it with a new address. This will allow your device to initiate the friendship.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/236273?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 14:00:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c3454b3-16ae-4a2c-8da4-ff179d7019c8</guid><dc:creator>sirio</dc:creator><description>&lt;p&gt;I see, thank you for looking into this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, how do we commission a device and have it be able to communicate from the start?&lt;/p&gt;
&lt;p&gt;Should we:&lt;/p&gt;
&lt;p&gt;- query LSS for the sequence number and then set this on the LPN when provisioning?&lt;/p&gt;
&lt;p&gt;- send a message to LSS to reset the sequence number?&lt;/p&gt;
&lt;p&gt;- some other mechanism?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is quite a noticeable bug when an LPN in a large network is re-provisioned, suddenly it &amp;quot;doesn&amp;#39;t work&amp;quot; and the only solution currently is to turn off breakers and reset devices in the ceiling.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/235168?ContentTypeID=1</link><pubDate>Wed, 19 Feb 2020 12:08:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:148026d0-d8d7-41de-89d3-f8b93201363f</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is actually expected behavior.&amp;nbsp;&lt;br /&gt;When you are testing the LPN / Light switch server (LSS) examples:&amp;nbsp;&lt;br /&gt;If the LPN is reset / unprovisioned from the app the sequence number on the LPN node will reset to zeros. Therefore, when the LPN is re-provisioned with the same address, all the messages sent by the LPN will get filtered by the replay protection mechanism of the LSS. This will continue to happen until the LPN starts sending messages with a higher sequence number than the one stored in the LSS replay list.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The reason that you are able to re-establish the friendship with the LSS when it&amp;#39;s power cycled / reset is that the replay list will be blank upon power cycle.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;br /&gt;Joakim Jakobsen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/235119?ContentTypeID=1</link><pubDate>Wed, 19 Feb 2020 10:07:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:482fe93d-32a3-4a68-ab21-8e729e9f895d</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry about the delay.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes, I&amp;#39;m seeing the same behavior as you do. Investigating what is causing this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Will get back to you with more information.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/234421?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2020 13:25:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f1f4abf-379c-4c2e-8f5e-ab956dd01e8e</guid><dc:creator>sirio</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;Were you able to reproduce? Any update?&lt;/p&gt;
&lt;p&gt;Help much appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Friend node timeout when LPN is re-provisioned with same address</title><link>https://devzone.nordicsemi.com/thread/231089?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 11:17:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:444aa049-9836-4a9d-8af7-494858e4e7d0</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the report. I&amp;#39;ll try to reproduce this from the steps you described and investigate the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you also tell me which version of the nRF5 SDK for Mesh you are working with?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll get back to you with more information.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;
&lt;p&gt;EDIT:&amp;nbsp;&lt;br /&gt;Just noticed that you listed the version at the bottom of your question.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>