<?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 2.2.0 Light Switch Example combine the address</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39628/mesh-2-2-0-light-switch-example-combine-the-address</link><description>Hi, 
 In the Light Switch Example, on-off instruction was send to either even or odd address, may I know how can I cancel this action so that I can send the on-off instruction to both even and odd address. 
 I attempted to modify the provisioner by remove</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Oct 2018 08:57:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39628/mesh-2-2-0-light-switch-example-combine-the-address" /><item><title>RE: Mesh 2.2.0 Light Switch Example combine the address</title><link>https://devzone.nordicsemi.com/thread/153589?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 08:57:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a7f91f8-8e67-435c-beb0-ada34c0ed731</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Great to hear! Would you mind upvoting the answer if you thought it was good?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh 2.2.0 Light Switch Example combine the address</title><link>https://devzone.nordicsemi.com/thread/153546?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 02:30:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:540eb30a-1c78-4018-9169-785642001af2</guid><dc:creator>sophieyellow</dc:creator><description>&lt;p&gt;hi&amp;nbsp;&lt;span&gt;Bjørn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;the solution works well, thank you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh 2.2.0 Light Switch Example combine the address</title><link>https://devzone.nordicsemi.com/thread/153545?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2018 12:14:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69ee3cd2-a446-450f-895b-cd87c5e7f969</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Very sorry for the delayed response. If you take a look at Mesh SDK v2.1.1, you can see in the switch cases NODE_SETUP_CONFIG_PUBLICATION_ONOFF_CLIENT1 to&amp;nbsp;NODE_SETUP_CONFIG_PUBLICATION_ONOFF_CLIENT4 that the publication addresses are set for the client models (i.e. the buttons on the client dev kit) in the node_setup.c file of the provisioner example. &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v2.1.1/md_examples_light_switch_README.html?cp=4_1_1_4_0"&gt;In the documentation&lt;/a&gt; for the light switch example in Mesh SDK v2.1.1, you can see this line: &amp;quot;&lt;span&gt;The provisioner configures Button 1 on the client board to control the first server, Button 2 to control the second server, Button 3 to control the servers with Odd addresses, and Button 4 to control the servers with Even addresses.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As you can see from the four client switch cases, this is exactly what happens in the&amp;nbsp;client_pub_state_set() function. The reason I am mentioning an older mesh sdk is that they clearly defined the odd &amp;amp; even addresses there.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the latest mesh sdk v2.2.0, the provisioner only sets up two client models (instead of 4 in mesh sdk v2.1.1). Also beware that the v2.1.1 uses the simple on off model, a proprietary model developed by Nordic, whereas v2.2.0 uses the generic on off model.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;See the&amp;nbsp;NODE_SETUP_CONFIG_PUBLICATION_ONOFF_CLIENT1 &amp;amp;&amp;nbsp;NODE_SETUP_CONFIG_PUBLICATION_ONOFF_CLIENT2 cases. The first client model is set to the odd group address &amp;amp; the second is set to the even group address.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the&amp;nbsp;NODE_SETUP_CONFIG_SUBSCRIPTION_ONOFF_SERVER case in node_setup.c of the provisioner (mesh sdk v2.2.0), you can change these lines (or comment out this block):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;            if (m_current_node_addr % 0x02)
            {
                address.value  = GROUP_ADDRESS_ODD;
            }
            else
            {
                address.value  = GROUP_ADDRESS_EVEN;
            }
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;to address.value = GROUP_ADDRESS_EVEN;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then, looking at the light switch client example (v2.2.0), specifically the button_event_handler() function, you can see that pressing buttons 1 &amp;amp; 3 sends the APP_STATE_ON command, whereas pressing buttons 2 &amp;amp;4 sends the APP_STATE_OFF command.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The generic on off client #2 is set to the even group address from the provisioner. Therefore, pressing buttons 3 or 4 should set an unacknowledged (i.e. no response from server) message to the even group addresses to turn them on or off. However, since we commented out the code snippet, this should turn all of the provisioned servers on or off.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have tested this myself &amp;amp; it works very well. Could you please try that out &amp;amp; see if it works for you too?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bjørn&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>