<?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 serial problem , robust  issue ,bug?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46363/mesh-serial-problem-robust-issue-bug</link><description>hi, nordic engineers Now I am using the meshSDKv3.1.0 ,nrf52832 . When i test the mesh serial module , it seems not so good, is it a problem? reference to the documents , to test it i send buffer like below: 1.The first byte is the length of the uart</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 May 2019 11:58:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46363/mesh-serial-problem-robust-issue-bug" /><item><title>RE: mesh serial problem , robust  issue ,bug?</title><link>https://devzone.nordicsemi.com/thread/188542?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 11:58:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1b58ef3-4309-4cbd-8bcd-ca52cec2f19e</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Sorry for the delayed response. No, I do not believe there is a timeout. Have you checked what the&amp;nbsp;packet_in.opcode value is for the transfer that did not work (i.e.&amp;nbsp;1c 20 aa 18 03 01 01 7B 22 70 6C 75 67 5F 73 74 61 74 75 73 22 3A 22 6F 66 66 22 7D)?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (m_cmd_handlers[i].range_start &amp;lt;= packet_in.opcode &amp;amp;&amp;amp;
                m_cmd_handlers[i].range_end &amp;gt;= packet_in.opcode)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;does not check the length of the packet, so maybe something there could also be wrong? If you print out the packet_in.opcode value &amp;amp; packet_in.length, do these values change or are they similar from the different received packets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh serial problem , robust  issue ,bug?</title><link>https://devzone.nordicsemi.com/thread/186841?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 07:10:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f515747-8163-4119-a589-94ccb393977b</guid><dc:creator>ycp</dc:creator><description>[quote userid="25682" url="~/f/nordic-q-a/46363/mesh-serial-problem-robust-issue-bug/185951"]Are you wondering whether there is a timeout if the whole package is not received within a timeframe?[/quote]
&lt;p&gt;yes, it is exactly what i want .is it have a timeout? how long?can i custom the time?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh serial problem , robust  issue ,bug?</title><link>https://devzone.nordicsemi.com/thread/185951?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 11:56:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e14fa618-93dd-4d56-87cc-1fa84ee3ad5c</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Very sorry for the delayed response.&amp;nbsp;&lt;/p&gt;
[quote user="ycp"]the function char_rx_simple() in serial_bearer.c take the first byte as the buffer length ,is this the reason cause the stops ?[/quote]
&lt;p&gt;It may be. Have you tried to add more logging to see if this is where the serial stops?&lt;/p&gt;
[quote user="ycp"]will it always wait the bytes not&amp;nbsp; recived yet?[/quote]
&lt;p&gt;&amp;nbsp;You end the reception in char_rx_simple() once the whole package is received:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    if (NULL != mp_current_rx_packet &amp;amp;&amp;amp; *p_rx_index == packet_received-&amp;gt;length + 1) /* We have received the complete packet */
    {
        end_reception(p_rx_index);
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Are you wondering whether there is a timeout if the whole package is not received within a timeframe?&lt;/p&gt;
[quote user="ycp"]3.when stops , i send more buffer ,it will print &amp;quot;No handler for 0x%02x\n&amp;quot; in serial.c in function serial_process_cmd();[/quote]
&lt;p&gt;&amp;nbsp;It seems that the for loop does not enter the if statement&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (m_cmd_handlers[i].range_start &amp;lt;= packet_in.opcode &amp;amp;&amp;amp;
                m_cmd_handlers[i].range_end &amp;gt;= packet_in.opcode)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;because the handled boolean does is not set to true.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh serial problem , robust  issue ,bug?</title><link>https://devzone.nordicsemi.com/thread/184180?ContentTypeID=1</link><pubDate>Sun, 28 Apr 2019 08:38:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fab778e0-bf84-47a8-a857-5dab8b84c784</guid><dc:creator>ycp</dc:creator><description>&lt;p&gt;1.able to send right buffer 2 times ,send wrong buffer stops. 2.the function char_rx_simple() in serial_bearer.c take the first byte as the buffer length ,is this the reason cause the stops ?, will it always wait the bytes not&amp;nbsp; recived yet? 3.when stops , i send more buffer ,it will print &amp;quot;No handler for 0x%02x\n&amp;quot; in serial.c in function serial_process_cmd();&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh serial problem , robust  issue ,bug?</title><link>https://devzone.nordicsemi.com/thread/184080?ContentTypeID=1</link><pubDate>Fri, 26 Apr 2019 12:48:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b6b6d2d-1f99-4096-9c70-2d59f1cdf0a4</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Are you able to send the right buffer length two times in a row? Or is it only when you send a wrong buffer length that the serial example stops working correctly? Have you tried adding more logging information to see where the error is occuring? Maybe it&amp;#39;s in the&amp;nbsp;serial_packet_buffer_get() function inside serial.c?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh serial problem , robust  issue ,bug?</title><link>https://devzone.nordicsemi.com/thread/183610?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 01:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab0b3913-eaa5-4a4e-b3e3-717a21cbaa5a</guid><dc:creator>ycp</dc:creator><description>&lt;p&gt;no,&amp;nbsp; I have used the python script to test DFUaready , now I follow this &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v3.1.0%2Fmd_examples_serial_README.html&amp;amp;cp=5_1_3_4"&gt;serial format doc , &lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and test result is like below:&lt;/p&gt;
&lt;p&gt;----------------if send this right format buffer, it is works as i want ,&lt;/p&gt;
&lt;p&gt;1c 20 aa 18 03 01 01 7B 22 70 6C 75 67 5F 73 74 61 74 75 73 22 3A 22 6F 66 66 22 7D B5&lt;/p&gt;
&lt;p&gt;----------------if send this wrong format buffer, it is not works as i want , and stucked &lt;/p&gt;
&lt;p&gt;1c 20 aa 18 03 01 01 7B 22 70 6C 75 67 5F 73 74 61 74 75 73 22 3A 22 6F 66 66 22 7D&lt;/p&gt;
&lt;p&gt;--THE only different is the longth of the payload , and i send the right buffer again , it can not run again .what i want to know is the mesh serial module can fault-tolerant ? if not , what should I do to implement this feature?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh serial problem , robust  issue ,bug?</title><link>https://devzone.nordicsemi.com/thread/183477?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 12:57:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0463b00-b428-4065-a5ee-1de1bb596f30</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Due to Easter holidays, response time is a bit slower on DevZone. Sorry for any inconvenience caused. Regarding your question, the mesh serial example works out of the box with the interactive python script, like mentioned in &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.1.0/md_examples_serial_README.html?cp=5_1_3_4"&gt;the documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For your own testing guidelines, did you consult &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/serial_example.html?cp=5_0_4_6_35"&gt;this documentation&lt;/a&gt;? Could you please explain a bit more in detail how you set up the testing, which command(s) work fine &amp;amp; which command(s) lead to errors?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>