<?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 SDK light switch example combining client and server</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62340/mesh-sdk-light-switch-example-combining-client-and-server</link><description>Hi all, I am combining MESH SDK 3.0.0 light switch example client and server with SDK 15.2. I have combined some server code to client and there are no error. And I can use nrfmesh to setup the network successfully. However, there are no respond on other</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Jun 2020 03:57:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62340/mesh-sdk-light-switch-example-combining-client-and-server" /><item><title>RE: Mesh SDK light switch example combining client and server</title><link>https://devzone.nordicsemi.com/thread/254866?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 03:57:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9073fde-29d9-4b2c-bdbb-0ee66ef4797b</guid><dc:creator>MLai</dc:creator><description>&lt;p&gt;Yes, with add this in models_init_cb, the code works well.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void models_init_cb(void)
{
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Initializing and adding models\n&amp;quot;);

    for (uint32_t i = 0; i &amp;lt; CLIENT_MODEL_INSTANCE_COUNT; ++i)
    {
        m_clients[i].settings.p_callbacks = &amp;amp;client_cbs;
        m_clients[i].settings.timeout = 0;
        m_clients[i].settings.force_segmented = APP_CONFIG_FORCE_SEGMENTATION;
        m_clients[i].settings.transmic_size = APP_CONFIG_MIC_SIZE;

        ERROR_CHECK(generic_onoff_client_init(&amp;amp;m_clients[i], i + 1));
    }
    ERROR_CHECK(app_onoff_init(&amp;amp;m_onoff_server_0, APP_ONOFF_ELEMENT_INDEX));
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh SDK light switch example combining client and server</title><link>https://devzone.nordicsemi.com/thread/254761?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 13:48:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd3ac265-cd3c-42e2-ad3f-4c2c05af2174</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It looks like you never instantiate the onoff server. This is done using the function app_onoff_init() in the light switch server example. Among other things, this function is responsible for setting up the onoff server callbacks.&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: Mesh SDK light switch example combining client and server</title><link>https://devzone.nordicsemi.com/thread/254127?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2020 01:48:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31b0b4d0-db10-4669-92f1-083b4aa3c3a6</guid><dc:creator>MLai</dc:creator><description>&lt;p&gt;Thank you for your answer. In my case, the switch itself is also a light bulb. The devices I have are some nordic dk boards. I want the boards can control and respond to other boards. I know that server can send back a status message, but in my case, I am not asking for a status message. What I want is to light up the dk led when button is pressed from another boards, and all boards support this function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh SDK light switch example combining client and server</title><link>https://devzone.nordicsemi.com/thread/254064?ContentTypeID=1</link><pubDate>Tue, 09 Jun 2020 13:49:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e34a459d-d325-4842-bc98-67cf2be1bc72</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not sure if you are looking for the same thing as the creator of that other thread. What does the communication between your devices look like? What do you need a device that is both client and server for?&lt;/p&gt;
&lt;p&gt;If you have a light bulb device (on/off server) and several light switches (on/off clients), then the communication between server and clients goes like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;One client is sending an on/off message, to turn the server on or off.&lt;/li&gt;
&lt;li&gt;The server gets the on/off message, turns on or off, then publish a status message.&lt;/li&gt;
&lt;li&gt;All clients receive the status message, and now they know that the server state has changed.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Notice how in this example, while the true state is only in the server, communication goes first from client to server, then from server to clients. All clients gets notified when the state of the server is changed, and the clients can store a copy of this server state. (But the only way for clients to actually change the state, is to send a message to the server, asking the server to change the state. The server is always in charge of keeping and updating the state.)&lt;/p&gt;
&lt;p&gt;The key to Bluetooth mesh communication is often how you configure the nodes. What address each model publish to, and what addresses each model subscribes to. In the above example, the server needs to publish to a group address that all of the clients subscribe to.&lt;/p&gt;
&lt;p&gt;So, what is your use case? What kind of devices do you have, and what kind of communication do you need between them?&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>