<?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>how to get the data on server side in mesh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53102/how-to-get-the-data-on-server-side-in-mesh</link><description>hi ... 
 I am working on mesh 3.1 version . I have used light switch example . In this case , i am sending the character in generic_onoff_set_cb , and changed from bool to character on client side . Now what are the change on server side , in order to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Oct 2019 14:45:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53102/how-to-get-the-data-on-server-side-in-mesh" /><item><title>RE: how to get the data on server side in mesh</title><link>https://devzone.nordicsemi.com/thread/215983?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2019 14:45:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29814659-44ff-463f-986c-8c377daf8cf2</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;My mistake, you would need to make some changes on the server side too, to be able to send string/integer to the server.&amp;nbsp;Did you have a look at the links that Joakim mentioned in your other case?&lt;/p&gt;
&lt;p&gt;It included a custom&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/simple_5F00_message.zip" rel="noopener noreferrer" target="_blank"&gt;simple_message model example&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;that will let you send a string over the mesh network.&amp;nbsp;It is made for Mesh SDK v1.0.0 but I suggest you to use the example application as a reference/guidance on how you can make a custom model for Mesh SDK 3.1.0, that let you send a string/integer.&lt;/p&gt;
&lt;p&gt;Here is documentation on how to &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.1.0/md_doc_getting_started_how_to_models.html?cp=5_6_0_1_6" rel="noopener noreferrer" target="_blank"&gt;create a model.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also have a look at&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/31256/receiving-simple-message-mesh/123576"&gt;this&lt;/a&gt;&lt;span&gt;, it might be of help.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get the data on server side in mesh</title><link>https://devzone.nordicsemi.com/thread/214942?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2019 04:59:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0883444-651d-4ee5-8258-acad612e8275</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;but i am not received the integer in server side instead of that i am getting 1 always&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get the data on server side in mesh</title><link>https://devzone.nordicsemi.com/thread/214941?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2019 04:58:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ece5051-9622-4ecf-9c3c-2edf657f0857</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;how to pass 150 bytes from client to server for the latest version ..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get the data on server side in mesh</title><link>https://devzone.nordicsemi.com/thread/214885?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 14:08:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b44b76be-82d5-47da-8eac-6c9cd41b4c43</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;The code seems ok.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get the data on server side in mesh</title><link>https://devzone.nordicsemi.com/thread/214729?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 06:16:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2afe8e4-ff8f-4fbc-9093-fc61ff178b9b</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;hi&lt;/p&gt;
&lt;p&gt;mttrinh i am using mesh 3.1 version sdk . i have done somechanges please check here, correct me if i am wrong.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
static void button_event_handler(uint32_t button_number)
{
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Button %u pressed\n&amp;quot;, button_number);

    uint32_t status = NRF_SUCCESS;
    generic_onoff_set_params_t set_params;
    model_transition_t transition_params;
    static uint8_t tid = 0;

    /* Button 1: On, Button 2: Off, Client[0]
     * Button 2: On, Button 3: Off, Client[1]
     */

    switch(button_number)
    {
        case 0:
        case 2:
            set_params.on_off = 32;
            break;

        case 1:
        case 3:
            set_params.on_off = 8;
            break;
    }

    set_params.tid = tid++;
    transition_params.delay_ms = APP_CONFIG_ONOFF_DELAY_MS;
    transition_params.transition_time_ms = APP_CONFIG_ONOFF_TRANSITION_TIME_MS;
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Sending msg: ONOFF SET %d\n&amp;quot;, set_params.on_off);

    switch (button_number)
    {
        case 0:
        case 1:
            /* Demonstrate acknowledged transaction, using 1st client model instance */
            /* In this examples, users will not be blocked if the model is busy */
            (void)access_model_reliable_cancel(m_clients[0].model_handle);
            status = generic_onoff_client_set(&amp;amp;m_clients[0], &amp;amp;set_params, &amp;amp;transition_params);
            hal_led_pin_set(BSP_LED_0, set_params.on_off);
            break;

        case 2:
        case 3:
            /* Demonstrate un-acknowledged transaction, using 2nd client model instance */
            status = generic_onoff_client_set_unack(&amp;amp;m_clients[1], &amp;amp;set_params,
                                                    &amp;amp;transition_params, APP_UNACK_MSG_REPEAT_COUNT);
            hal_led_pin_set(BSP_LED_1, set_params.on_off);
            break;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;then generic_onoff_common.h file changed the bool to uint8_t and generic_onoff_client.c&amp;nbsp; file modified the&amp;nbsp;&amp;nbsp;message_set_packet_create&amp;nbsp;&lt;/p&gt;
&lt;p&gt;p_set-&amp;gt;on_off = p_params-&amp;gt;on_off ;&lt;br /&gt; p_set-&amp;gt;tid = p_params-&amp;gt;tid;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thats all . it is correct or wrong ?&lt;/p&gt;
&lt;p&gt;explanation for above , i want to sent the integer from client to server when i press the button the respective integer has to go .&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;
&lt;p&gt;pspavi&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get the data on server side in mesh</title><link>https://devzone.nordicsemi.com/thread/214592?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 11:58:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ca0c92e-da28-439c-8485-c30824f59ad5</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;You shouldn&amp;#39;t need to change anything on the server side to receive the message from the client.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have a look at&amp;nbsp;this callback on the server: mesh_evt_cb. Whenever&amp;nbsp;the&amp;nbsp;NRF_MESH_EVT_MESSAGE_RECEIVED event occurs, the mesh_msg_handle() function gets called. This function, which is defined in access.c, handles all incoming mesh messages on the server side.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/31256/receiving-simple-message-mesh/123576"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/31256/receiving-simple-message-mesh/123576&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get the data on server side in mesh</title><link>https://devzone.nordicsemi.com/thread/214588?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 11:44:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5585c9f4-2eb5-4848-aeb2-3a8279933ee1</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;this is different from that question .&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get the data on server side in mesh</title><link>https://devzone.nordicsemi.com/thread/214582?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 11:41:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e5b6ea2-b98e-48ea-b2d3-2264ce5a12bf</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I noticed that you already created a ticket with the same question:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/53053/how-to-send-string-from-client-to-particular-server-in-mesh"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/53053/how-to-send-string-from-client-to-particular-server-in-mesh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Have you taken a look at the thread that Joakim suggested?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would also suggest you to continue in that thread instead of creating multiple threads about same question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>