<?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>NRF Connect SDK: Bluetooth mesh config server model callback</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91070/nrf-connect-sdk-bluetooth-mesh-config-server-model-callback</link><description>Dear all, 
 When the provisioner add appkey or bind appkey for the node&amp;#39;s model, I want to be informed and run a callback function. 
 Can I set callback for config server model ?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Aug 2022 08:05:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91070/nrf-connect-sdk-bluetooth-mesh-config-server-model-callback" /><item><title>RE: NRF Connect SDK: Bluetooth mesh config server model callback</title><link>https://devzone.nordicsemi.com/thread/382161?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 08:05:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6c496a7-cb2d-4207-823e-ff049597a0c2</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Since there are no callbacks for configuration changes on the device, the way to do this would be to use the configuration client. Along with providing the AppKey, the configuration device should do the rest of the configuration. If you need special functionality (where the device does a lot of self-configuration), you could trigger this through a custom model (which would require the configuration device to trigger this through use of that custom model.)&lt;/p&gt;
&lt;p&gt;If you want a user attention then you could use the attention timer through the health server, although there is no way to differentiate a reason for the attention.&lt;/p&gt;
&lt;p&gt;In case you want to try to poll the configuration state through directly accessing the internal structures: The key index is stored in the bt_mesh_model struct here: &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/84f3a0a8c6a930f0252d9ceca6adf8c3b1284af0/include/zephyr/bluetooth/mesh/access.h#L536"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/84f3a0a8c6a930f0252d9ceca6adf8c3b1284af0/include/zephyr/bluetooth/mesh/access.h#L536&lt;/a&gt;. When no keys are bound, they are BT_MESH_KEY_UNUSED. I highly recommend only using the public API instead, though, as internal structures may change without further notice.&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: NRF Connect SDK: Bluetooth mesh config server model callback</title><link>https://devzone.nordicsemi.com/thread/382124?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 01:59:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:683a18d8-f661-49e6-9505-924cde173524</guid><dc:creator>binhla</dc:creator><description>&lt;p&gt;Thank you for your prompt response.&lt;/p&gt;
&lt;p&gt;I want to be informed when the node is added an appkey.&lt;/p&gt;
&lt;p&gt;So that, I can :&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Make some led indicator&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Local bind the appkey for some models&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Set publish for these models&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Binh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect SDK: Bluetooth mesh config server model callback</title><link>https://devzone.nordicsemi.com/thread/382101?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2022 17:00:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a454dc5a-de6c-4828-acb6-91af4ef535e2</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am afraid there are no callbacks for this.&lt;/p&gt;
&lt;p&gt;May I ask what you need it for? There may be a different way to do what you want. It usually shouldn&amp;#39;t be necessary to keep track of key bindings from the application layer, since for instance for API calls requiring an address you can check the return code in order to handle missing keys.&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>