<?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>Provisioner and server</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44174/provisioner-and-server</link><description>Hey 
 This is sumanth. I have worked on light switch example with server, client and mobile as provisioner. I would like to develop a mesh network where the server has to calculate the RSSI of client signal while receiving data and display it through</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Mar 2019 11:28:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44174/provisioner-and-server" /><item><title>RE: Provisioner and server</title><link>https://devzone.nordicsemi.com/thread/173942?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 11:28:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8418312-a70d-496f-a888-18f0a81e8467</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Oh. I see.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You need to use the function app_onoff_server_state_set_cb() in the app_onoff.c file. It looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void generic_onoff_state_set_cb(const generic_onoff_server_t * p_self,
                                       const access_message_rx_meta_t * p_meta,
                                       const generic_onoff_set_params_t * p_in,
                                       const model_transition_t * p_in_transition,
                                       generic_onoff_status_params_t * p_out)
{
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;msg: SET: %d\n&amp;quot;, p_in-&amp;gt;on_off);

    app_onoff_server_t   * p_server = PARENT_BY_FIELD_GET(app_onoff_server_t, server, p_self);

    /* Update internal representation of OnOff value, process timing */
    p_server-&amp;gt;value_updated = false;
    p_server-&amp;gt;state.target_onoff = p_in-&amp;gt;on_off;
    if (p_in_transition == NULL)
    {
        p_server-&amp;gt;state.delay_ms = 0;
        p_server-&amp;gt;state.remaining_time_ms = 0;
    }
    else
    {
        p_server-&amp;gt;state.delay_ms = p_in_transition-&amp;gt;delay_ms;
        p_server-&amp;gt;state.remaining_time_ms = p_in_transition-&amp;gt;transition_time_ms;
    }

    onoff_state_value_update(p_server);
    onoff_state_process_timing(p_server);

    /* Prepare response */
    if (p_out != NULL)
    {
        p_out-&amp;gt;present_on_off = p_server-&amp;gt;state.present_onoff;
        p_out-&amp;gt;target_on_off = p_server-&amp;gt;state.target_onoff;
        p_out-&amp;gt;remaining_time_ms = p_server-&amp;gt;state.remaining_time_ms;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So as you can see, it has a pointer p_meta in the function variables.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Provisioner and server</title><link>https://devzone.nordicsemi.com/thread/173865?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 03:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3d8fbd8-e47f-47f5-b1cc-e3b933203434</guid><dc:creator>P Sumanth</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/devzonedoubt1.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am getting this error..&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Provisioner and server</title><link>https://devzone.nordicsemi.com/thread/173708?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 13:09:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab2fe030-dd5f-41cd-87ba-4e523376d6c2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Well, the difference between app_onoff_server_state_set_cb() and app_onoff_server_set_cb() is that the first is the function that is called when the server receives a message from a client to turn on of off the lights, while the second is the function that decides which function that is the callback function.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You need to use app_onoff_server_state_set_cb(), and&amp;nbsp;&lt;strong&gt;not&lt;/strong&gt; app_onoff_server_set_cb().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Provisioner and server</title><link>https://devzone.nordicsemi.com/thread/173590?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 03:36:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46aa61fe-74cf-4cba-ac10-794307563594</guid><dc:creator>P Sumanth</dc:creator><description>&lt;p&gt;Hey thanks Edvin, I am able to find the RSSI of received packet from client when i wrote the code like below mentioned in the function&amp;nbsp;&lt;/p&gt;
&lt;p&gt;static void app_onoff_server_set_cb(const app_onoff_server_t * p_server, bool onoff ) {&lt;/p&gt;
&lt;p&gt;__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;RSSI: %d\n&amp;quot;,- ((int32_t) NRF_RADIO-&amp;gt;RSSISAMPLE));&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;I am getting an error like this&lt;/p&gt;
&lt;p&gt;&amp;#39;p_data&amp;#39; undeclared&amp;nbsp;&lt;/p&gt;
&lt;p&gt;when i am using this line in the same function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;rssi: %d\n&amp;quot;, p_meta-&amp;gt;p_core_metadata-&amp;gt;params.scanner.rssi);&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Provisioner and server</title><link>https://devzone.nordicsemi.com/thread/173515?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 14:26:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3da2cec-d771-4d11-bae1-b66b24883025</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Please see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/42545/light-switch-mesh-client-to-server-and-vica-versa-rssi-value"&gt;this ticket&lt;/a&gt; regarding RSSI in the Mesh SDK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You must use the UART peripheral. Look in the ble_app_uart example (from the normal SDK). Look for the function named uart_init(). This is the function you want to use. You must also include the files that this function&amp;#39;s internal functions uses. Give it a go, and let me know if you are stuck.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>