<?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>cannot receive message</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34129/cannot-receive-message</link><description>Hi all, 
 I am using nRF SDK for Mesh v1.0.1 and I want to implement following as in picture: 
 
 
 I am publishing to group address (group address because in the future I want to use more nodes with simple OnOff server model). I send the message from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 May 2018 14:20:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34129/cannot-receive-message" /><item><title>RE: cannot receive message</title><link>https://devzone.nordicsemi.com/thread/131732?ContentTypeID=1</link><pubDate>Fri, 11 May 2018 14:20:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c529f74-50df-450b-ad19-193e8edd402d</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;1) If I were you, I would definitely take a look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/24997/confusion-about-server-count-and-client-count-in-ble-mesh"&gt;this devzone case&lt;/a&gt;. I agree with you that on first sight, it doesn&amp;#39;t make sense why you should initialize the simple_on_off_client model more than once. What is happening though is that for each client &amp;amp; server, a single simple_on_off_client model is initialized on the client to enable the light switch functionality (i.e. turning on/off the lights on the server).&amp;nbsp;Since you have one client &amp;amp; one server, two elements (i.e. controllable part of a node, e.g. an LED) will be initialized with one OnOffClient model each. The first element sets up communication to the server to turn on &amp;amp; off the server LED, while the second element will handle communication to the group address (to turn off the light on multiple servers).&lt;/p&gt;
&lt;p&gt;2) If you take a look at the mesh sdk v1.0.1 light switch client code, you can see that the server node needs to be configured before&amp;nbsp;access_model_publish_address_set() is called inside provisioner_config_successful_cb(). This could well be a reason why your code is not working.&lt;/p&gt;
&lt;p&gt;3) You are correct that the unicast addresses are set in increments of one. Take a look at:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    provisioner_init();
    if (m_configured_devices &amp;lt; m_provisioned_devices)
    {
        provisioner_configure(UNPROV_START_ADDRESS + m_configured_devices);
    }
    else if (m_provisioned_devices &amp;lt; SERVER_COUNT)
    {
        provisioner_wait_for_unprov(UNPROV_START_ADDRESS + m_provisioned_devices);
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;inside access_setup() of the light switch client example. The unicast address arguments (m_configured_devices &amp;amp; m_provisioned_devices) inside provisioner_configure() &amp;amp; provisioner_wait_for_unprov() get&amp;nbsp;incremented&amp;nbsp;inside&amp;nbsp;provisioner_config_successful_cb() &amp;amp;&amp;nbsp;provisioner_prov_complete_cb().&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v1.0.1/md_doc_getting_started_getting_started.html?cp=4_1_1_3"&gt;Getting Started link&lt;/a&gt; in the Nordic Infocenter has some useful information for understanding the light switch example &amp;amp; the Mesh SDK better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot receive message</title><link>https://devzone.nordicsemi.com/thread/131523?ContentTypeID=1</link><pubDate>Wed, 09 May 2018 12:45:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc84b032-a353-4e5d-a263-f0221eb8cec6</guid><dc:creator>Patrik</dc:creator><description>&lt;p&gt;oh yes, many things are hardcoded with the purpose to examine my understanding of bluetooh mesh speification. My mistake, in the future for better understanding I will post with using macros :)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) change from i &amp;lt; client_count to i &amp;lt; 1 .....&amp;nbsp; - hardcoded part and I wanted to call the simple_on_off_client_init() just once because on node1 (as in the picture above) I have just one simple OnOff client model. In node 2 there is simple OnOff server model called with&amp;nbsp;simple_on_off_server_init().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2) should I have declared - #define GROUP_CLIENT_INDEX (0) . In 1) in for loop I have declared just one (the for loop cycles just once with condition i &amp;lt; 1)&amp;nbsp;simple_on_off_client_t structure, i.e. m_clients[0] and&amp;nbsp; that structure contains the necessary parameters for controlling one server model in node2 which is subscribing to group address (it likely makes no sense to publish to group address to one server model which is subscribing to that group address, but in the future i want to add more server models to subscribe to that group address)&lt;/p&gt;
&lt;p&gt;Yes I erased the function&amp;nbsp;&lt;span&gt;access_model_publish_address_set() from the callback function provisioner_config_successful_cb, because with this step I would change the publish address to the particular server model (and I am trying to publish to group address).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;3) again hardcoded part. but it is the same in my case,&amp;nbsp;PROVISIONER_ADDRESS + m_target_address - UNPROV_START_ADDRESS ==&amp;nbsp;PROVISIONER_ADDRESS + 1. From the picture above there you can see the exact addresses for my elements used in code, from there that PROVISIONER_ADDRESS + 1 (the address for element in which is OnOff client model - I also suppose that the function dsm_local_unicast_addresses_set() sets the addresses in increments of 1 beginning with the addres we declare in dsm_local_unicast_address_t structure)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot receive message</title><link>https://devzone.nordicsemi.com/thread/131477?ContentTypeID=1</link><pubDate>Wed, 09 May 2018 10:43:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:702e0b51-6118-46e4-8df7-c4170e32c384</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Why did you change the for loop in&amp;nbsp;access_setup() from i &amp;lt; CLIENT_COUNT to:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    for (uint32_t i = 0; i &amp;lt; 1; ++i)
    {
        m_clients[i].status_cb = client_status_cb;
        ERROR_CHECK(simple_on_off_client_init(&amp;amp;m_clients[i], i+1));//i+1 because i dont want to have together
                                                                   //in element0 OnOff model with control model and health model
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;From what I understand, you want to&amp;nbsp;call the simple_on_off_client_init() function twice if you have one client &amp;amp; one server.&lt;/p&gt;
&lt;p&gt;Also, in your access_setup() function, you changed these three functions from m_clients[GROUP_CLIENT_INDEX] to:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        ERROR_CHECK(access_model_application_bind(m_clients[0].model_handle, m_appkey_handle));
        ERROR_CHECK(access_model_publish_application_set(m_clients[0].model_handle, m_appkey_handle));
        ERROR_CHECK(access_model_publish_address_set(m_clients[0].model_handle, m_group_handle));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;What was the reason for this? I believe the idea there is to set the publish address for the group address. The publish address for the configured server is set in the&amp;nbsp;access_model_publish_address_set() function in provisioner_config_successful_cb() in the main.c file of the light switch client example.&lt;/p&gt;
&lt;p&gt;Also, you changed the code in the&amp;nbsp;PROV_STATE_CONFIG_PUBLICATION_ONOFF case inside do_config_step() from:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;pubstate.publish_address.value = PROVISIONER_ADDRESS + m_target_address - UNPROV_START_ADDRESS;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;pubstate.publish_address.value = PROVISIONER_ADDRESS + 1; &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;What was the reason for this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>