<?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>Communication with a provisioner</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39794/communication-with-a-provisioner</link><description>Let&amp;#39;s have light-switch provisioner, server and client. 
 My question is, how to send a message from a client or a server to the provisioner? In order to send a message, client needs to have provisioner&amp;#39;s address (access_model_handle_t) but it doesn&amp;#39;t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Oct 2018 12:08:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39794/communication-with-a-provisioner" /><item><title>RE: Communication with a provisioner</title><link>https://devzone.nordicsemi.com/thread/154492?ContentTypeID=1</link><pubDate>Thu, 25 Oct 2018 12:08:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce4f4190-850b-474a-a7fd-4d9600ee8702</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I would take a good look at the health model if I were you. If you run the light switch example on mesh sdk v2.2.0 with one provisioner, one client &amp;amp; one (or more) servers, you should see that the provisioner receives logging information about the health status of all nodes. I am assuming you have a few 52 dev kits to test with. Just run a debug session for each example in Segger Embedded Studios.&lt;/p&gt;
&lt;p&gt;In the health_server.c file in the server example, take a look at the send_attention_status() function. The server knows the model_handle and is able to use that information to send a message back to the provisioner without knowing the unicast address of the provisioner directly:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;(void) access_model_reply(p_server-&amp;gt;model_handle, p_message, &amp;amp;packet);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The real work occurs inside packet_tx() in the access.c function. This is where the device state manager returns the local addresses &amp;amp; the model handle is used to find the correct address to send the message to.&lt;/p&gt;
&lt;p&gt;Also, note that the mesh sdk v2.2.0 requires the nRF5 SDK v15.0.0, not 15.2.0. Hence, the softdevice used is S140 v6.0.0, not 6.1.0. Hope that helps!&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>