<?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>BLE Mesh LPN communication with friend node</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52073/ble-mesh-lpn-communication-with-friend-node</link><description>Hi, 
 MESH sdk: nRF5 SDK for Mesh v3.2.0 
 Example: &amp;quot;experimental_lpn&amp;quot; and &amp;quot;light_switch server&amp;quot; 
 Hardware: PCA10056 Board (nrf52840 Dev kit) 
 
 Question 1) 
 I want to calculate round trip delay(Latency) between LPN and Friend Node, (I am using &amp;quot; light_switch</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Oct 2019 13:13:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52073/ble-mesh-lpn-communication-with-friend-node" /><item><title>RE: BLE Mesh LPN communication with friend node</title><link>https://devzone.nordicsemi.com/thread/214177?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 13:13:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c40d4dd-476e-4253-b6d5-0da474b46a01</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sandip,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You would need to have a look at the &lt;a href="https://www.bluetooth.com/specifications/mesh-specifications/?utm_campaign=mesh&amp;amp;utm_source=internal&amp;amp;utm_medium=blog&amp;amp;utm_content=bluetooth-mesh-networking-the-packet"&gt;Bluetooth Mesh Profile spec&lt;/a&gt; to know the packet format. At section 2.3.3 you can find it&amp;#39;s mentioned that only 11 bytes left for the application. The reason for that is the overhead needed, for example addresses, flags, MIC, etc. The network PDU format can be found at 3.4.4&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3. Yes you can transfer more than 8 bytes payload. Then the packet need to be segmented (SAR). And that&amp;#39;s when it can take longer to transmit the whole packet.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Mesh LPN communication with friend node</title><link>https://devzone.nordicsemi.com/thread/214134?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 11:14:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:704ba76a-3568-4ebd-b652-45945722c730</guid><dc:creator>SciTER Development Team</dc:creator><description>&lt;p&gt;hi Hung Bui,&lt;/p&gt;
&lt;p&gt;Thanks for your reply. i can transfer &lt;span&gt;payload data(16-112 bytes) from LPN to &amp;quot;&lt;/span&gt;&lt;span&gt;light_switch server&lt;/span&gt;&lt;span&gt;&amp;quot; and &amp;quot;light_switch server&amp;quot; to&amp;nbsp;LPN. but it takes around 500msec to&amp;nbsp; 4000msec.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As per &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/36395/ble-mesh-stack-2-0-1-light-switch-demo-roundtrip-delay-getting-higher-between-client-and-server"&gt;this case&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1040x1240/__key/communityserver-discussions-components-files/4/Nordic-Case-BLE-Mesh-Packet.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In advertisement&lt;span&gt;&amp;nbsp;we can transfer payload of 8 Bytes ONLY...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1) Now question is we have 31 bytes is in advertisement packet then why 8 Bytes left for payload???..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2) what is the format of BLE Mesh Advertisement???.. Can you provide advertisement&amp;nbsp;packet detail&amp;nbsp;&lt;/span&gt;description so i can get idea about whole ADV Packet of BLE Mesh. and why 8 bytes left for payload.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;One more Question is,&lt;/p&gt;
&lt;p&gt;3) Can I transmit more Bytes instead of 8 Bytes payload in single ADV packet?? if yes then what will be the changes&amp;nbsp; required, or any other solution?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sandip&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Mesh LPN communication with friend node</title><link>https://devzone.nordicsemi.com/thread/212625?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 13:33:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:677fccd5-a4be-48cf-8308-fbde2ecdccdb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sandip,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you see an error return from a function, you can check the function&amp;#39;s description to find the issue description.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Error 8 means&amp;nbsp;NRF_ERROR_INVALID_STATE and it&amp;#39;s described :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;There&amp;#39;s already a segmented packet to this destination in&amp;nbsp;progress. Wait for it to finish before sending new segmented&amp;nbsp;packets.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If the packet payload&amp;#39;s (including the opcode and company id) is less than 11 bytes it will be sent as unsegmented message. If it&amp;#39;s about 11 bytes, it will be split to multiple messages. You can&amp;#39;t send 2 different segmented message at the same time. You would need to wait until it finish to send again. You can wait for the&amp;nbsp;NRF_MESH_EVT_TX_COMPLETE event to start sending again.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Mesh LPN communication with friend node</title><link>https://devzone.nordicsemi.com/thread/212547?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 11:34:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3315900-0ecc-4fe1-af52-79ddd5f83bb1</guid><dc:creator>SciTER Development Team</dc:creator><description>&lt;p&gt;hi Hung Bui,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;From RTT Log, I&amp;nbsp;have&amp;nbsp;observe that LPN send Payload data(4 bytes) using&amp;nbsp;&lt;span&gt;access_model_publish() and getting data(4 bytes) at &amp;quot;light_switch server&amp;quot; successful&amp;nbsp;without any change.(Example: &amp;quot;experimental_lpn&amp;quot; and &amp;quot;light_switch server&amp;quot;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now i want to send more data from LPN to&amp;nbsp;light_switch server,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;for sending 10 bytes of payload i have make changes in following function &amp;quot;generic_onoff_client_set_unack&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t generic_onoff_client_set_unack(generic_onoff_client_t * p_client, const generic_onoff_set_params_t * p_params,
                                        const model_transition_t * p_transition, uint8_t repeats)
{
    uint32_t status = NRF_ERROR_INTERNAL;

    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;
    }

//    uint8_t server_msg_length = message_set_packet_create(&amp;amp;p_client-&amp;gt;msg_pkt.set, p_params, p_transition);
//
//    message_create(p_client, GENERIC_ONOFF_OPCODE_SET_UNACKNOWLEDGED,
//                   (const uint8_t *) &amp;amp;p_client-&amp;gt;msg_pkt.set, server_msg_length,
//                   &amp;amp;p_client-&amp;gt;access_message.message);

    // Temp added buff (TODO: remove after testing)
    const uint8_t lu8_TempBuf[10] = {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09};

    message_create(p_client, GENERIC_ONOFF_OPCODE_SET_UNACKNOWLEDGED,
                   (const uint8_t *) &amp;amp;lu8_TempBuf, 10,
                   &amp;amp;p_client-&amp;gt;access_message.message);

    // Temp Added print (TODO: remove after testing)
    __LOG(LOG_SRC_ACCESS, LOG_LEVEL_DBG1, &amp;quot;generic_onoff_client_set_unack\n&amp;quot;);

    for (uint32_t i = 0; i &amp;lt;= repeats; ++i)
    {
        status = access_model_publish(p_client-&amp;gt;model_handle, &amp;amp;p_client-&amp;gt;access_message.message);
        if (status != NRF_SUCCESS)
        {
            break;
        }
    }
    return status;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;but problem is at &amp;#39;packet_tx&amp;#39; function&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1st time: Data sending OK and NO Error occur.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2nd time: I am getting error &amp;#39;8&amp;#39; in &amp;quot;nrf_mesh_packet_send&amp;quot; function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;please refer attached rtt log image.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1040x1240/__key/communityserver-discussions-components-files/4/3108.Capture.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1040x1240/__key/communityserver-discussions-components-files/4/5810.Capture1.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;What am I doing wrong?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there any other way to sending more payload data(Minimum 10-20 bytes) from LPN to &amp;quot;&lt;span&gt;light_switch server&lt;/span&gt;&amp;quot; then please suggest.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sandip&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Mesh LPN communication with friend node</title><link>https://devzone.nordicsemi.com/thread/209622?ContentTypeID=1</link><pubDate>Fri, 13 Sep 2019 12:42:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83fad22f-1121-4ebc-b36a-4bb8b96b38c9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sandip,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. The LPN was designed so that it&amp;#39;s transparent to the application make it easier to develop your application. So if you want to send data from a LPN to a friend node (or to any other node in the network) you simply send the data as normally, for example calling&amp;nbsp;access_model_publish() like what we have in the LPN example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to calculate the round trip time you can actually use our LPN example. Have a look &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.2.0/md_examples_experimental_lpn_README.html?cp=5_2_3_6_1"&gt;here&lt;/a&gt;. When you press button 1/2 on the LPN node it will send a set command and the server will send a reply. You can measure the time it take to get the reply.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. I don&amp;#39;t see any difference from your question 1. Please study the LPN example.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>