<?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>Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46092/send-string-in-a-mesh-with-nrf52dk</link><description>Hello: 
 
 I have to nRF52DK boards and I am able to run the ligth_switch example, but the thing that I want to do is send a message, &amp;quot;hello&amp;quot; from one node to other. I saw the example in the Q&amp;amp;A, here but the example talks about the Mesh SDK v1.0.0. and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Nov 2019 09:46:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46092/send-string-in-a-mesh-with-nrf52dk" /><item><title>RE: Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/thread/218999?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2019 09:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70fb2c54-b645-4029-b33b-80f4f1ba7719</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Please create new tickets with more details if you have new questions. If they are related to this thread, you can link to it in your ticket.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/thread/218994?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2019 09:31:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0077d710-e69c-4759-8d1b-80bb3a56bb95</guid><dc:creator>samatha</dc:creator><description>&lt;p&gt;Hi JEFT,&lt;/p&gt;
&lt;p&gt;Thanks, I want to send an integer from client to server, and i&amp;nbsp;modified every bool variable data to unit8_t in both client and server code..&lt;/p&gt;
&lt;p&gt;And iam getting below errors in client.&lt;/p&gt;
&lt;p&gt;main.c,&amp;nbsp; 156, Acknowledged transfer cancelled.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;main.c,&amp;nbsp; 152, Acknowledged transfer timeout.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;please help out..&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sam&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/thread/215235?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2019 09:19:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed922192-8ad9-4d0c-b9c5-bbe32be18cb6</guid><dc:creator>Krupashankar</dc:creator><description>&lt;p&gt;Hi Pspavi,&lt;/p&gt;
&lt;p&gt;Even i am trying to send a string from client to server have you got any solution if so can you please share&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Krupa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/thread/214052?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 07:45:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31122ae8-99e4-4ddb-ab34-c8a7110b4952</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;hi ..JEFT&amp;nbsp; ...&amp;nbsp; i want to send a string from client to server ... same as you ... can you tell me where you set a data ?&lt;/p&gt;
&lt;p&gt;please help out&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&amp;amp;Regards ,&lt;/p&gt;
&lt;p&gt;pspavi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/thread/210611?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 07:42:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:691cdb21-5ff3-4f5d-bc11-af9e3fb5fc7d</guid><dc:creator>ran</dc:creator><description>&lt;p&gt;Hi JEFT&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks , I&amp;#39;m also looking to do the same , but sending an Integer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you share your project \ modified files ?&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see where you set the msg &amp;quot;hello&lt;span&gt;&amp;quot; in your example.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,Ran&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/thread/201356?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2019 19:49:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90941f55-7daa-4cf9-996e-389642af13a4</guid><dc:creator>JEFT</dc:creator><description>&lt;p&gt;Hello Sir&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/viper1983"&gt;viper1983&lt;/a&gt;&amp;nbsp;I got the messages to be&amp;nbsp;sent and received over the light_switch example by modifying the type of every data variable to&amp;nbsp;&lt;em&gt;uint8_t * (you can notice that every data variables have the same&amp;nbsp;&lt;strong&gt;bool&amp;nbsp;&lt;/strong&gt;type).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;After that, I force the message to be unsegmented, that means that the message will only support like 9 characters, so, it&amp;#39;s good to be aware about that.&lt;/p&gt;
&lt;p&gt;then, I used a new opcode for receiving and sending string data over there.&lt;/p&gt;
&lt;p&gt;These are the functions to be changed over the Generic OnOff client code on the generic_onoff_client.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
static uint8_t message_set_packet_create(generic_onoff_set_msg_pkt_t *p_set, const generic_onoff_set_params_t * p_params,
                                      const model_transition_t * p_transition)
{
        p_set-&amp;gt;on_off= p_params-&amp;gt;on_off;
        p_set-&amp;gt;tid = p_params-&amp;gt;tid;

        if (p_transition != NULL)
        {
            p_set-&amp;gt;transition_time = model_transition_time_encode(p_transition-&amp;gt;transition_time_ms);
            p_set-&amp;gt;delay = model_delay_encode(p_transition-&amp;gt;delay_ms);
            return GENERIC_ONOFF_SET_MAXLEN; //I put a value of 9 over there
        }
        else
        {
            return GENERIC_ONOFF_SET_MINLEN;
        }
}

uint32_t generic_onoff_client_set(generic_onoff_client_t * p_client, const generic_onoff_set_params_t * p_params,
                                  const model_transition_t * p_transition)
{
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;%x\n&amp;quot;, p_client-&amp;gt;model_handle);

    if (p_client == NULL || p_params == NULL)
    {
        return NRF_ERROR_NULL;
    }
    if (p_transition != NULL &amp;amp;&amp;amp;
        (p_transition-&amp;gt;transition_time_ms &amp;gt; TRANSITION_TIME_MAX_MS ||
         p_transition-&amp;gt;delay_ms &amp;gt; DELAY_TIME_MAX_MS))
    {
        return NRF_ERROR_INVALID_PARAM;
    }

    if (access_reliable_model_is_free(p_client-&amp;gt;model_handle))
    {
        uint8_t server_msg_length = message_set_packet_create(&amp;amp;p_client-&amp;gt;msg_pkt.set, p_params, p_transition);
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;p_params.onoff: %s\n&amp;quot;, p_client-&amp;gt;msg_pkt.set.on_off);
        message_create(p_client, GENERIC_ONOFF_OPCODE_SET, p_client-&amp;gt;msg_pkt.set.on_off,
                       server_msg_length, &amp;amp;p_client-&amp;gt;access_message.message);
        reliable_context_create(p_client, GENERIC_ONOFF_OPCODE_STATUS, &amp;amp;p_client-&amp;gt;access_message);
        return access_model_reliable_publish(&amp;amp;p_client-&amp;gt;access_message);
    }
    else
    {
        return NRF_ERROR_BUSY;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This code is part of the Generic OnOff Server&amp;#39;s code and should be modified.&lt;pre class="ui-code" data-mode="c_cpp"&gt;//This one is the new function that I use with the operational code
static void handle_send_status(access_model_handle_t model_handle, const access_message_rx_t * p_rx_msg, void * p_args){
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;A/C state: %s\n&amp;quot;, p_rx_msg-&amp;gt;p_data);
}

static const access_opcode_handler_t m_opcode_handlers[] =
{
    {ACCESS_OPCODE_SIG(GENERIC_ONOFF_OPCODE_SET), handle_set},
    {ACCESS_OPCODE_SIG(GENERIC_ONOFF_OPCODE_SET_UNACKNOWLEDGED), handle_set},
    {ACCESS_OPCODE_SIG(GENERIC_ONOFF_OPCODE_GET), handle_get},
    {ACCESS_OPCODE_SIG(OPCODE_SEND_STATUS), handle_send_status}, //I added this one
};

&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/thread/196699?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 06:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9acfa88b-b703-41a1-8404-28d0b6deddfa</guid><dc:creator>viper1983</dc:creator><description>&lt;p&gt;hello ，Did you do it? I had the same problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/thread/184956?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 14:44:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9ca4a89-6496-4991-8fbf-ea868314570f</guid><dc:creator>JEFT</dc:creator><description>&lt;p&gt;Hello, did you have some success on this? I have the same problem too.&lt;br /&gt;I was trying to implement a Library called &amp;#39;simple message&amp;#39; but it only works with the old Mesh SDK 1.0&lt;br /&gt;If anyone could help me showing me some tutorial for sending and receiving strings in mesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/thread/182435?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 15:06:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52ac0774-9c26-4f54-b597-066e80cc69e1</guid><dc:creator>Guille</dc:creator><description>&lt;p&gt;Hi Simonr:&lt;br /&gt;&lt;br /&gt;Don&amp;#39;t worry it is Easter Holiday in my country too.&lt;br /&gt;&lt;br /&gt;I will check and I give you some feedback as soon as I try it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send string in a Mesh. With nRF52DK</title><link>https://devzone.nordicsemi.com/thread/182090?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2019 12:02:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85fe2208-1b07-4ee0-b590-e85e2c9e6c4a</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Guillermo&lt;/p&gt;
&lt;p&gt;Due to the Easter holiday you will have to expect a delay in replies, sorry for the inconvenience!&lt;/p&gt;
&lt;p&gt;We do not have any examples of this for Mesh 3.1. But I suggest you have a look at or&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.1.0/md_doc_getting_started_how_to_models.html"&gt;Getting started&lt;/a&gt;&amp;nbsp;guide on how to creale your own models in mesh. Alternatively, it is possible to use the nrf_mesh_packet_send() API for access to the lower layers in the spec, found &lt;a href="https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/core/api/nrf_mesh.h#L521"&gt;here on our GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>