<?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>Setting ACCESS_MODEL_COUNT and ACCESS_ELEMENT_COUNT dynamically druing run-time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79849/setting-access_model_count-and-access_element_count-dynamically-druing-run-time</link><description>Dear DevZone community, 
 I&amp;#39;m developing a Mesh application using nRF52840 Segger Embedded Studio (SES) onLinux. I&amp;#39;m using version 5.0.0 of the Mesh SDK. As desccribed in the Subject, i am trying to figure out how to set the #defines #define ACCESS_ELEMENT_COUNT</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Sep 2021 06:50:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79849/setting-access_model_count-and-access_element_count-dynamically-druing-run-time" /><item><title>RE: Setting ACCESS_MODEL_COUNT and ACCESS_ELEMENT_COUNT dynamically druing run-time</title><link>https://devzone.nordicsemi.com/thread/330573?ContentTypeID=1</link><pubDate>Wed, 22 Sep 2021 06:50:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ae2a5a6-928c-411c-a807-18742999896e</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You may have to do some other workarounds as well, such as exposing more elements and/or models on the node than what is actually used. I have not tested this locally, but brief code inspection shows that the stack uses ACCESS_ELEMENT_COUNT elements and ACCESS_MODEL_COUNT models several places, not only for buffer sizes. Worst case you may have to expose the full number of elements/models for provisioning, configuration, etc. to work.&lt;/p&gt;
&lt;p&gt;You also must handle the fact that the number of elements for a node is fixed once it is provisioned (this is per the Bluetooth mesh specification.) Changing the number of elements means you have to remove the node from the network, change the configuration of the device (while not part of the network), then provision it into the network as a new node.&lt;/p&gt;
&lt;p&gt;A full solution of runtime-configurable number of elements and models, as seen from other devices in the network, may require some rewriting of our Bluetooth mesh stack. Modification of the stack voids the Bluetooth SIG qualification, which means you need to qualify the (modified) stack on your own.&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: Setting ACCESS_MODEL_COUNT and ACCESS_ELEMENT_COUNT dynamically druing run-time</title><link>https://devzone.nordicsemi.com/thread/330545?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 20:30:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8eac24b-bf62-4b9c-931a-88356d31f3a3</guid><dc:creator>MKarl</dc:creator><description>&lt;p&gt;Hi Terje,&lt;/p&gt;
&lt;p&gt;thanks for your quick response. That means that as long as the actual numbers of models and elements does not exceed the maximum set values, it does not cause any problems?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;MKarl&lt;/p&gt;
&lt;div class="QmZWSe"&gt;
&lt;div class="DHcWmd"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="oSioSc"&gt;
&lt;div id="tw-target"&gt;
&lt;div class="g9WsWb" id="kAz1tf"&gt;
&lt;div class="tw-ta-container F0azHf tw-nfl" id="tw-target-text-container"&gt;
&lt;pre class="tw-data-text tw-text-large XcVN5d tw-ta" style="text-align:left;" id="tw-target-text" dir="ltr"&gt;&lt;span class="Y2IQFc" lang="en"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting ACCESS_MODEL_COUNT and ACCESS_ELEMENT_COUNT dynamically druing run-time</title><link>https://devzone.nordicsemi.com/thread/330502?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 13:30:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:220d893b-41b7-43d7-9b9d-b9ec717ac68d</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am afraid those settings must be provided compile time, as they control the size of various static buffers.&lt;/p&gt;
&lt;p&gt;One potential workaround is to set it to the highest value out of the options, as that way it would be high enough for any of the configurations. Then use the number of elements/models needed for a particular use case.&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></channel></rss>