<?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>CoAP Client using nRF9160: proxy-uri length issues</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69738/coap-client-using-nrf9160-proxy-uri-length-issues</link><description>Hi Nordic Team, 
 I am developing a CoAP client on the nRF9160 DK, and am having trouble with longer proxy-uri&amp;#39;s; short URIs ( 268 characters and below ) work fine and the coap message reaches the server as expected. However, messages with longer proxy</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 10 Jan 2021 09:58:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69738/coap-client-using-nrf9160-proxy-uri-length-issues" /><item><title>RE: CoAP Client using nRF9160: proxy-uri length issues</title><link>https://devzone.nordicsemi.com/thread/288271?ContentTypeID=1</link><pubDate>Sun, 10 Jan 2021 09:58:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a89baa3f-cd35-40f6-9738-464ba939dafe</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;That seems to be an bug in coap.c of v 1.4.1. It affect options with lengths larger than 268.&lt;/p&gt;
&lt;div class="s-prose js-post-body" itemprop="text"&gt;
&lt;p&gt;coap.c, line 221, uses &amp;quot;delta_size&amp;quot; instead of &amp;quot;len_size&amp;quot;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (len_size == 1U) {
    res = append_u8(cpkt, (uint8_t)len_ext);
    if (!res) {
        return -EINVAL;
    }
} else if (delta_size == 2U) {
    res = append_be16(cpkt, len_ext);
    if (!res) {
        return -EINVAL;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;See &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/31206"&gt;github.com/.../31206&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>