<?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>Thread GET response issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46019/thread-get-response-issue</link><description>Hello every one ! 
 I am trying to use the GET_CODE to ask information from one of my device. 
 I have a ressource called RES1 to which I send a GET request with the following fonction. 
 
 First of all : could any one tell me if a CONFIRMABLE header</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Apr 2019 12:13:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46019/thread-get-response-issue" /><item><title>RE: Thread GET response issue</title><link>https://devzone.nordicsemi.com/thread/184062?ContentTypeID=1</link><pubDate>Fri, 26 Apr 2019 12:13:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6470d32-3612-49e4-82c2-9ef820a95843</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Sorry for the very delay response. I am quite new to the Thread SDK and needed some time to dig into it.&lt;/p&gt;
&lt;p&gt;Firstly, I don&amp;#39;t know if you are aware of but a new version of the Zigbee &amp;amp; Thread SDK has been released (v3.0.0). I strongly recommend switching to the new version.&lt;/p&gt;
&lt;p&gt;I found some discrepancies between your code and the way request send and response send functions are implemented in the examples in our SDK.&lt;/p&gt;
&lt;p&gt;In your thread_coap_TRYGET_request_send function you are calling otCoapHeaderSetPayloadMarker, this function adds a Payload Marker indicating the beginning of the payload. This is not necessary to do when doing sending a get request, as you are not appending any payload.&lt;/p&gt;
&lt;p&gt;From &lt;a href="https://tools.ietf.org/html/rfc7252"&gt;RFC7252,&lt;/a&gt; page 16: &amp;quot; The presence of a marker followed by a zero-length payload MUST be processed as a message format error.&amp;quot; So this why you are getting OT_ERROR_PARSE when no data was appended.&lt;/p&gt;
&lt;p&gt;Then in the request response you want to send a payload, but you haven&amp;#39;t set a payload marker before otMessageAppend and otCoapSendRequest. For SDK v3.0.0 you should add:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;error = otCoapMessageSetPayloadMarker(p_response);
ASSERT(error == OT_ERROR_NONE);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;think this two things should be able to fix your problem. Let me know how it goes.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread GET response issue</title><link>https://devzone.nordicsemi.com/thread/181885?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2019 14:28:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:641741c3-1e16-4266-a745-5a0de8b22b47</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Unfortunately we have reduce staffing during next week due to Easter holiday. We will try to answer as soon as possible, unless someone in the community are able to help you in the meantime &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>