<?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>Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47075/mesh-models-in-a-gateway</link><description>Hey, 
 I&amp;#39;m developing a gateway using NRF52832 &amp;amp; ESP12 (UART Communication). Write now what i do is I have a one model (in the client example) for each type of devices in the mesh network (1 RGB Light + 1 Switch + 1 Roller Door + etc..). In this way the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Jul 2019 02:14:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47075/mesh-models-in-a-gateway" /><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/200632?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2019 02:14:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfc7c5d3-81aa-4391-9e0d-5727a95eaf3a</guid><dc:creator>Dilanka Asiri</dc:creator><description>&lt;p&gt;Thanks for your clarification and help throughout the case.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Asiri&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/200339?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2019 16:12:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f66b545b-fca6-4fac-b191-6bc8275ae4ca</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Flash wearout means the contents in flash is not what it should be, and that might lead to error at any point in time when data has been read from flash and then used.&lt;/p&gt;
&lt;p&gt;Feedback from our mesh team is that flash wearout is less of a problem than what I expected. It will happen after much more than 10 000 reconfigurations, as flash manager writes new records to the flash page until the page is full. Typically there will be more than 300 address changes for DSM, before a flash erase is needed. The number for the access layer is more than 400. This means model publication can typically be changed more than 3 million times before flash starts to wear out. Increasing number of pages for access layer and/or dsm will increase number of publication changes linearly.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/199908?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 04:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37793738-c67e-4e74-a1e1-6b05cf8487ce</guid><dc:creator>Dilanka Asiri</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What if the flash wears out, the assert happens when loading data at the startup or when saving?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Asiri&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/199755?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 11:30:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23f523c6-097f-4eee-86eb-bb06138fde3a</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have sent a request to the Mesh team, to see if either we can get reconfiguration of models without the need to write to flash, or if they have other solutions to your use case.&lt;/p&gt;
&lt;p&gt;Due to summer vacation season here in Norway, it might take some time to get a response. I am sorry for any inconvenience.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/199642?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 03:57:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cee4ad2f-506b-4303-8b08-2ae88d584483</guid><dc:creator>Dilanka Asiri</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;Could you come up with a solution for reconfiguring models without the need for flash writes?&lt;/p&gt;
&lt;p&gt;Thanks&lt;br /&gt;Asiri&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/196461?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 09:30:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b277d96b-0f7b-44b2-b552-dc56fce30ec1</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no practical way to avoid asserts like that from happening, given that after an asserts all bets are off as to the overall working of the Mesh stack.&lt;/p&gt;
&lt;p&gt;Dynamically reconfiguring models (without the need for flash writes) is something that I can report to the Mesh team in order to look into for further improvements.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/187071?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 16:50:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39a3398f-3122-44d7-8c5f-727085430999</guid><dc:creator>Dilanka Asiri</dc:creator><description>&lt;p&gt;Hey,&lt;br /&gt;&lt;br /&gt;I get you, but as a company our product (gateway) will have a limited lifetime in that case even if we have more models, given that the write cycles on the NRF52832 is 10000. &lt;br /&gt;If the number of cycles exceed and gets corrupted, would it run to a mesh assert in the startup, because as I said earlier, I could set the publication address each time I publish data and the retrieved publication address from the flash memory is of no use in my application. If it does run into an mesh assert (because of the corrupted data in the flash) is there a way of ignoring it, and continue the normal operation of the mesh stack.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Asiri&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/187064?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 16:22:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf7f3715-afae-4291-b8c7-28e9be3a0591</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Any configuration of the models, including publish addresses and subscription addresses, are supposed to survive a reset. For that reason, all such configuration values are to be stored in non-volatile memory.&lt;/p&gt;
&lt;p&gt;In our bt mesh stack, the responsibility of storing configuration data to non-volatile memory is partly covered by the stack and partly covered by the model implementation. While the DSM part is done in the stack, the access layer part is done in the model implementation. As such, you only control the access part of it.&lt;/p&gt;
&lt;p&gt;Since the stack is provided as source code you technically have access to disabling flash writes in DSM, but do note that since that constitutes a change of the stack you cannot use our qualification ID for the stack any more if you do so.&lt;/p&gt;
&lt;p&gt;You are not the first customer to ask for this (or similar) scenario, and we are aware of the use case. Hopefully we can do something to better suit this use case in the future, but for the time being I am afraid using several models is the way to go. (Unless you want to qualify the stack yourself, at which point modifying the behavior of DSM becomes a valid option.)&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/186948?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 11:48:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c3c1b45-7501-4552-bad4-2ddca17d051f</guid><dc:creator>Dilanka Asiri</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;For the runtime environment, only the volatile memory is used right. (Say setting the publication address of an element, and then publishing it). This depends on the volatile memory or does it depend on the flash memory aswell. Isn&amp;#39;t the &lt;strong&gt;flash memory used to get data back to the voltaile memory after the reset&lt;/strong&gt;, or does it have other purposes throughout the code?&lt;br /&gt;&lt;br /&gt;You see for my application, I don&amp;#39;t necessarily require saving the publication address of the module of the flash, because each time a message gets published, i could set the publication address of the element. Considering this fact is there a workaround other than having more models? (Even having more models, the cycles of the gateway would be limited, this is what I&amp;#39;m trying to clarify from my end).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Asiri&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/186903?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 09:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37c9f6d4-b47a-4c5f-b8c1-f7b473e671bf</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The suggestion to have a pool of several models is intended to be a caching mechanism. I.e. that if you use the same few models often then you don&amp;#39;t need to configure those addresses all the time. I.e. preferably you use a heuristic that minimizes the need for publish address reconfigurations.&lt;/p&gt;
&lt;p&gt;While you do have control over flash storage done by the access module, you do not have control over flash storage done by the device state manager (dsm) module. If you do not update the data stored for the access module (but dsm is updated behind the scenes) then you are likely to end up in a bad state after a reset. (Akin to a dangling pointer in c.)&lt;/p&gt;
&lt;p&gt;You may recover from dsm/access inconsistencies by removing the gateway node from the network and reprovision it again on every reset, or at least when you get the mesh assert because of dsm/access being out of sync, but that again would put more strain on the mesh network, involves the provisioner, and leads to more flash erase cycles... This is the reason why it is generally better to have more models (to avoid reconfigurations leading to more flash usage.)&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/186751?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 13:54:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13ee3650-a75a-4f4a-a292-3b29dbddeacb</guid><dc:creator>Dilanka Asiri</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you take the function&amp;nbsp;&lt;strong&gt;handle_config_model_publication_set&amp;nbsp;&lt;/strong&gt;in config_server.c. There is a function&lt;strong&gt;&amp;nbsp;access_flash_config_store.&amp;nbsp;&lt;/strong&gt;In the documentation it is said that this is line of code where the access layer information gets stored in the flash. So if i comment out this, since i don&amp;#39;t actually want to save the publication address (before publishing data i set the address of the model always), I won&amp;#39;t have to worry about the flash memory issue as you have said in the earlier reply (~&lt;span&gt;which means you run the risk of wearing out the flash&lt;/span&gt;). WiFi module always sent the state and respective element address to which the publication address of the NRF node in the gateway is updated before publishing data. So this would solve the issue right?&lt;/p&gt;
&lt;p&gt;And you said earlier to use like 10 models and do round robin when publishing data. (is it just because of the wearing out flash issue?). If the above flow is okay (comment out the &lt;strong&gt;access_flash_config_store()&lt;/strong&gt;), then is it fine to use one model. Will there be any performance hits compared to using 10 models?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Asiri&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/186685?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 11:57:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7baa7206-29bc-49e6-bb8d-68001b1de6e4</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, in that case that would be the best option. (And of course if a model is already configured with the correct publication address then that one is reused instead of reconfiguring the next one round-robin.)&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/186254?ContentTypeID=1</link><pubDate>Thu, 09 May 2019 16:32:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7622141d-50f3-4c64-984b-493218a84151</guid><dc:creator>Dilanka Asiri</dc:creator><description>&lt;p&gt;Grouping is the option for the customer right. We have no control over it. The customer can group the devices as per his/her needs. (say all the lights in the room as a group, he/she can group them from the mobile application that we are developing which in that case we have no control over the group, its totally the customers requirement.)&lt;/p&gt;
&lt;p&gt;In that case what you recommend is to have several elements having the same model in the gateway publish data to the nodes. (like round robin)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/186252?ContentTypeID=1</link><pubDate>Thu, 09 May 2019 15:58:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:902f7c76-b988-4d8d-808e-3b84f279ca66</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;While one client model of each type would technically work, it may not be a good option in the long run. The reason is that there will be a couple of flash writes every time you reconfigure the publish address, which means you run the risk of wearing out the flash. Because of that it might be a better idea to use more clients. I suggest that you do some calculations based on what will be the usage scenario, and figure out how many reconfigurations you would expect over time. If you reach tens of thousands during the product life time then you probably want to do some changes.&lt;/p&gt;
&lt;p&gt;In general, you should organize your network so that several server models subscribe to the same group address. Then you control the group, and not individual servers. E.g. all the lighting fixtures in a room. That also makes it easier to replace light bulbs, as you only need to reconfigure the new light bulb to subscribe to the group address.&lt;/p&gt;
&lt;p&gt;Regarding publishing data, there is a limit for any mesh node on the network of publishing 100 messages during a moving 10 second time frame. I.e. peak throughput will be ten messages per second. This means using group addresses (controling multiple nodes together) is better than individually controlling multiple nodes.&lt;/p&gt;
&lt;p&gt;Getting messages from multiple nodes should not be an issue, other than the general issue of packet collisions if the network gets congested. While there is a limit on throughput originating from a node, there is no limit on relaying or receiving packets.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh Models in a gateway</title><link>https://devzone.nordicsemi.com/thread/186143?ContentTypeID=1</link><pubDate>Thu, 09 May 2019 10:40:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e78b4bc-5733-459a-a77e-541a94bf48fe</guid><dc:creator>Dilanka Asiri</dc:creator><description>&lt;p&gt;Also say in a RGB light, and if there are 100 RGB lights, all the messages from those 100 lights will publish to a single element in the gateway. Will this be a problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>