<?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>Openthread message queue problem on router</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25843/openthread-message-queue-problem-on-router</link><description>Hello!
I&amp;#39;m developing thread application with COAP communication. I&amp;#39;ve got problem with message queue on router. Everything works fine when operating as a child. I have cyclic interrupt for data sending. When my device is in DETACHED state, the message</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Oct 2017 06:10:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25843/openthread-message-queue-problem-on-router" /><item><title>RE: Openthread message queue problem on router</title><link>https://devzone.nordicsemi.com/thread/101795?ContentTypeID=1</link><pubDate>Mon, 16 Oct 2017 06:10:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e3b6430-5fc2-4bc8-878f-0c1dff9e789a</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;Hi!
Thanks for your answer. When device is in DETACHED state I assume that it is disconnected from the rest of mesh including border router. Am i wrong? I will try to add some delay in send function to be sure that routes are built correctly.&lt;/p&gt;
&lt;p&gt;Best regards, Wojciech Rzepecki&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Openthread message queue problem on router</title><link>https://devzone.nordicsemi.com/thread/101794?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2017 08:36:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2815d72-dcd4-4d76-abdd-896f2ec13200</guid><dc:creator>Lukasz Duda</dc:creator><description>&lt;p&gt;Hello Wojciech!&lt;/p&gt;
&lt;p&gt;Unfortunatelly I don&amp;#39;t have enough information to solve the problem.&lt;/p&gt;
&lt;p&gt;However i have some suspicious. When device operates as an end-device, it is enough for it to attach to the network in order to start sending data (since it always sends data via the parent).&lt;/p&gt;
&lt;p&gt;Router however participants in mesh forwarding, it has to gather knowledge about current topology in order to route packets. If you try to send all message from your application queue right after its state is changed, then probably packets will be dropped on mesh_forwarder layer.
The whole process of route discovery should be very fast, but it is not instant.&lt;/p&gt;
&lt;p&gt;Do I correctly assume that you stop Thread (by &lt;code&gt;otThreadSetEnabled&lt;/code&gt; function) on router and reenable it some time after - this is why you expirience DETACHED state on router? If this is the case, do you also call this function when you want to sleep as sleepy end device (this is not needed)?&lt;/p&gt;
&lt;p&gt;What you can do is to build OpenThread libraries with logs enabled. You need to change the log level here: &lt;a href="https://github.com/openthread/openthread/blob/master/src/core/openthread-core-default-config.h#L519"&gt;github.com/.../openthread-core-default-config.h&lt;/a&gt; to &lt;code&gt;OT_LOG_LEVEL_DEBG&lt;/code&gt;. After that, you can observe all logs on RTT.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>