<?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>BT Mesh IV Update Parameters / Timers</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80558/bt-mesh-iv-update-parameters-timers</link><description>We have five nRF52840 DevKits (Mesh SDK 5.0.0) running to collect data. The devices don&amp;#39;t have a stable power supply and regularly turn on and off. (We are only interested in the data when the supply is there) 
 In general the setup works well. However</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Oct 2021 11:15:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80558/bt-mesh-iv-update-parameters-timers" /><item><title>RE: BT Mesh IV Update Parameters / Timers</title><link>https://devzone.nordicsemi.com/thread/335464?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 11:15:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1c7e1fe-bf58-4805-a361-e8d4cdf9d87b</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hey Damij!&amp;nbsp;&lt;br /&gt;I have gotten a little bit more info about some of the details in your case, in case it is helpful:&lt;/p&gt;
&lt;p&gt;- The nodes stopping and starting all of a sudden might be because those nodes wait until iv recovery timeout expires to run IV Index Recovery procedure: &lt;a title="https://github.com/nordicsemiconductor/nrf5-sdk-for-mesh/blob/master/mesh/core/src/net_state.c#l245" href="https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/core/src/net_state.c#L245" rel="noopener noreferrer" target="_blank"&gt;https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/core/src/net_state.c#L245&lt;/a&gt;. You may try to reduce &lt;strong&gt;NETWORK_MIN_IV_RECOVERY_INTERVAL_MINUTES &lt;/strong&gt;or even set it to zero for debugging purposes so that a node won&amp;#39;t wait for timeout to run the IV Index Recovery procedure.&lt;/p&gt;
&lt;p&gt;-When increasing the flash block size number, you need to have a look at &lt;strong&gt;NETWORK_MIN_IV_UPDATE_INTERVAL_MINUTES &lt;/strong&gt;parameter. The node will still try to use the same IV Index for the specified time: &lt;a title="https://github.com/nordicsemiconductor/nrf5-sdk-for-mesh/blob/master/mesh/core/src/net_state.c#l164" href="https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/core/src/net_state.c#L164" rel="noopener noreferrer" target="_blank"&gt;https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/core/src/net_state.c#L164&lt;/a&gt;. For debugging purposes,&amp;nbsp;you&amp;nbsp;may enable the IV Update Test Mode: &lt;a title="https://github.com/nordicsemiconductor/nrf5-sdk-for-mesh/blob/master/mesh/core/src/net_state.c#l661" href="https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/core/src/net_state.c#L661" rel="noopener noreferrer" target="_blank"&gt;https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/core/src/net_state.c#L661&lt;/a&gt;, which will force a node to move to the IV Update in Progress state if the node is going to run out of seqnums.&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;&lt;strong&gt;IV_UPDATE_TIMEOUT_PERIODIC_SAVE_MINUTES &lt;/strong&gt;is used to store the iv update timeout with the defined regularity so that after the boot-up a node can recover the timer that will move it to IV Update in Progress state. This parameter can be reduced, but this may increase the wear of the flash.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BT Mesh IV Update Parameters / Timers</title><link>https://devzone.nordicsemi.com/thread/334199?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 14:10:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7155b0c-8eef-4afc-82c6-4df798d807fb</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hey Domij! Sorry about the delay.&lt;/p&gt;
&lt;p&gt;Could you tell me more about this project? Are there more nodes in the network? With the nodes being offline that much it might be that mesh isn&amp;#39;t the best solution for you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]In general the setup works well. However after some seemingly random time of a few days/weeks one or multiple sensors randomly stop transmitting. Then it takes a few hours up to a few days until the nodes by themselves are able to transmit again. To me, that sounds like the IV update is not working as required.[/quote]
&lt;p&gt;In what way would you say it isn&amp;#39;t working as required? An IV update can take between 96-144 hours, and I would assume closer to 144 if the nodes are turning off and on frequently. So to me it seems that it might work the way it is meant to.&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;ul&gt;&lt;li&gt;We increased the flash block size number to reduce strain on the flash:&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left:30px;"&gt;&lt;/p&gt;&lt;div style="overflow:auto;"&gt;&lt;div&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;In general that might postpone the issue, but also push it forward (and in your case extremely much so). Increasing&amp;nbsp;the block size is a double edged sword, in that a higher value will give you a longer time until&amp;nbsp;you would need to write to flash, though a bigger jump on reboot. On reboot you wouldn&amp;#39;t know where to start the sequence number after all, so you start on the next block. Which is presumably what your nodes are doing on every reboot. This is a problem in and of itself, though increasing the block size will make that jump even&amp;nbsp;longer and the need for an IV update even faster.&amp;nbsp;&lt;/p&gt;
[quote user=""]What happens when a node runs out of sequence numbers when it has not yet updated the IV?[/quote]
&lt;p&gt;I am little bit uncertain about what concretely happens in our stack, though the node won&amp;#39;t be able to send messages until the IVI Update is finished.&lt;/p&gt;
[quote user=""]We overwrote the intervals specified in the net_state.c. Because our devices typically only stay on for maximum 12h at a time, we never reach the required 144h/192h timer values. [/quote][quote user=""]&lt;p style="padding-left:30px;"&gt;Are those timer values stored in flash at some stage or do they restart from 0 after a reboot?&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I don&amp;#39;t &lt;em&gt;think&lt;/em&gt; they are stored in flash. If they aren&amp;#39;t then this sounds like a problem. I will have to get back to you on that. Though I should mention that when you change these definitions, besides what is in the application, you also move away from the Bluetooth spec.&lt;/p&gt;
[quote user=""]&lt;p style="padding-left:30px;"&gt;&lt;span style="color:rgba(153, 51, 0, 1);"&gt;What exactly is the IV update timeout?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;This seems to be a way that the IV update progress is being stored, so &lt;em&gt;this timer&lt;/em&gt; is being stored atleast.&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;p&gt;Could you please help me understand the 144h limit described in the mesh profile specification &amp;quot;3.10.5 IV Update procedure&amp;quot;:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;It is the maximum time for it be in IV Update state. I think they justified it as being 96*1.5, not to match a specific number but so that it statistically turns out to work well.&amp;nbsp;&lt;/p&gt;
[quote user=""]What would be an appropriate setting for the NETWORK_MIN_IV_RECOVERY_INTERVAL_MINUTES?[/quote]
&lt;p&gt;The standard 30minutes sounds good, though for your situation I&amp;#39;d understand if you would want it more often.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>