<?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 libraries</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74270/coap-libraries</link><description>Hi, 
 
 I am developing projects for street lightning system and I use in my projects many CoAP libraries. In my projects I use OpenThread and some peripherals like UART. 
 My question is, which library is best to use in my projects? Can I find some reference</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 Apr 2021 22:56:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74270/coap-libraries" /><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/307339?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 22:56:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8d32680-e6d5-4e45-b961-db837facba88</guid><dc:creator>František</dc:creator><description>&lt;p&gt;Thank You :)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306793?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2021 12:15:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76a43174-d266-4107-a8ba-8796a509f7b6</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am taking over this case from Øyvind.&lt;/p&gt;
[quote user="oys"] The latest SDK v4.1.0 should now be using Openthread CoAP I am told, and has a&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/thread_example_dfu.html"&gt;Thread Secure OTA DFU Example&lt;/a&gt;&amp;nbsp;which you should use instead.&amp;nbsp;[/quote]
&lt;p&gt;This is not true. The latest SDK v4.1.0 still uses IoT coap for Thread DFU, just as you pointed out, if you see the makefile in Thread_v4.1.0\examples\thread\dfu\client\pca10056\blank\armgcc\Makefile&lt;/p&gt;
&lt;div&gt;You can see it includes the following files:&lt;/div&gt;
&lt;div style="font-family:&amp;#39;Segoe UI&amp;#39;, system-ui, &amp;#39;Apple Color Emoji&amp;#39;, &amp;#39;Segoe UI Emoji&amp;#39;, sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;  $(SDK_ROOT)/components/iot/background_dfu/background_dfu_block.c \
  $(SDK_ROOT)/components/iot/background_dfu/background_dfu_operation.c \
  $(SDK_ROOT)/components/iot/background_dfu/background_dfu_state.c \
  $(SDK_ROOT)/components/iot/coap/coap.c \
  $(SDK_ROOT)/components/iot/coap/coap_block.c \
  $(SDK_ROOT)/components/iot/background_dfu/transport/coap/coap_dfu.c \
  $(SDK_ROOT)/components/iot/coap/coap_message.c \
  $(SDK_ROOT)/components/iot/coap/coap_option.c \
  $(SDK_ROOT)/components/iot/coap/coap_queue.c \
  $(SDK_ROOT)/components/iot/coap/coap_resource.c \
  $(SDK_ROOT)/components/iot/coap/coap_transport_ot.c \&lt;/pre&gt;&lt;/div&gt;
&lt;div style="font-family:&amp;#39;Segoe UI&amp;#39;, system-ui, &amp;#39;Apple Color Emoji&amp;#39;, &amp;#39;Segoe UI Emoji&amp;#39;, sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="font-family:&amp;#39;Segoe UI&amp;#39;, system-ui, &amp;#39;Apple Color Emoji&amp;#39;, &amp;#39;Segoe UI Emoji&amp;#39;, sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;/div&gt;
&lt;div&gt;I am sorry for the misunderstanding there for a moment. Back to your question. If you are using nRF5 for Thread &amp;amp; Zigbee v4.1.0 I recommend you keep using the IoT CoAP library, as we found in the earlier ticket you linked to that there was problem when using both CoAP libraries simulteaneously, and IoT CoAP is the only one supported by Thread DFU.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;On a side note, there are no plans to have new releases of nRF5 SDK for Thread at the present moment, as we hare focusing on developing using nRF Connect SDK (NCS for short) for Thread instead. All new Thread features to come will most likely only be available in NCS, but we still have full support for nRF5 SDK.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;In NCS updates work a bit different than Thread DFU, you can read more about updates for Thread NCS in the documentation for the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/samples/subsys/mgmt/updatehub/README.html"&gt;UpdateHub embedded Firmware Over-The-Air (FOTA) sample&lt;/a&gt; (see step 4.4 for building for IEEE 802.15.4/Thread)&lt;/div&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: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306367?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 13:38:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:678536cf-a1e2-41f8-ad71-e4a00ab8eb83</guid><dc:creator>František</dc:creator><description>&lt;p&gt;Because if I try init&amp;nbsp; OT CoAP library for my message communication in DFU client project it fails. That&amp;#39;s why I use IoT CoAP library in DFU client project&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306364?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 13:30:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38bc2c24-63b2-4fb0-9368-230619e1a288</guid><dc:creator>František</dc:creator><description>&lt;p&gt;I mean recomended from this(&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/50036/dfu-project))"&gt;devzone.nordicsemi.com/.../dfu-project))&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306363?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 13:28:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3048567-13fe-47d9-b90d-6671f0dde90e</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="fero.masiar"] use recomended CoAP IoT library for my coap communication between devices[/quote]
&lt;p&gt;&amp;nbsp;I&amp;#39;m confused. I have not recommended using CoAP from the IoT component.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306352?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 13:18:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e2f3089-8117-40cb-a63a-8d7d5905d619</guid><dc:creator>František</dc:creator><description>&lt;p&gt;I get new SDK project&amp;nbsp;&lt;strong&gt;4.1.0\examples\thread\dfu\client&amp;nbsp;&lt;/strong&gt;and use recomended CoAP IoT library for my coap communication between devices.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306348?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 13:09:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b784944e-4779-4291-a807-3807f1970980</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Are you using your old code in the new SDK version or have you started with a clean project?&lt;br /&gt;&lt;br /&gt;-Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306293?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 10:49:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49fb2ff7-66f8-4ad9-bde1-9a6e165d8fdf</guid><dc:creator>František</dc:creator><description>&lt;p&gt;Yes I updated my project to new SDK. But&amp;nbsp;&lt;span&gt;&lt;strong&gt;4.1.0\examples\thread\dfu\client&lt;/strong&gt; still use IoT CoAP library for CoAP DFU messages...&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306274?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 10:01:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aebf8ad-e536-4e0d-84f0-1aa415cfbfad</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Thank you for clarifying.&amp;nbsp;I see that the ticket you linked to is two years old, and that you were using nRF5 SDK for Thread and Zigbee v3.1.0. The latest SDK v4.1.0 should now be using Openthread CoAP I am told, and has a&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/thread_example_dfu.html"&gt;Thread Secure OTA DFU Example&lt;/a&gt;&amp;nbsp;which you should use instead.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please update to nRF5 SDK for Zigbee and Thread v4.1.0, and &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/thread_client_server_example.html"&gt;try the CoAP samples&lt;/a&gt;:&lt;/p&gt;
&lt;div&gt;4.1.0\examples\thread\simple_coap_client&amp;nbsp;&lt;/div&gt;
&lt;div&gt;4.1.0\examples\thread\simple_coap_server&amp;nbsp;&lt;br /&gt;4.1.0\examples\thread\dfu (&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/thread_example_dfu.html"&gt;Documentation&lt;/a&gt;)&lt;/div&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306263?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 09:19:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46f13736-d261-40f0-8595-c9b67e96c488</guid><dc:creator>František</dc:creator><description>&lt;p&gt;OK and what about project based on Thread DFU client. DFU uses IoT CoAP library and in other branche I get information that I may use in DFU project IoT CoAP library to communication. (&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/50036/dfu-project)"&gt;devzone.nordicsemi.com/.../dfu-project)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes I&amp;#39;m shure that I&amp;#39;m using Thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306258?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 09:12:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56c19918-8ecc-464a-a89b-5264d0f036da</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="fero.masiar"]Are you recommended to use Nordic CoAP API from &lt;strong&gt;SDKforThread\components\iot\coap\coap_api.h&amp;nbsp;&amp;nbsp;&lt;/strong&gt;in all my projects?&amp;nbsp;&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;No, you should not use the IoT component. You should use &amp;lt;sdk root&amp;nbsp;&lt;span&gt;4.1.0&amp;gt;\external\openthread\include\openthread\coap.h&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You should &lt;strong&gt;not&lt;/strong&gt; use&amp;nbsp;&lt;strong&gt;SDKforThread\components\iot&amp;nbsp;&lt;/strong&gt;at all. If you have based any project based &lt;/span&gt;&lt;span&gt;on the &lt;strong&gt;outdated&lt;/strong&gt; IoT compoent, you should start over again. Are you sure you are using Thread?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There sere several examples that use the Openthread CoAP e.g. &amp;lt;sdk root&amp;nbsp;4.1.0&amp;gt;\examples\thread\simple_coap_server. Please &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/thread_client_server_example.html?cp=7_3_2_10_4_2_7#thread_client_server_example_testing"&gt;see this link&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306118?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 12:42:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebb95937-7362-4c2d-9e78-14184ec6714b</guid><dc:creator>František</dc:creator><description>&lt;p&gt;I have 3 types of firmvares:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- DFU OTA client + CoAP client &amp;amp; server&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- CoAP client &amp;amp; server + UART&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-CoAP client + GPIO&amp;nbsp; connected sensor&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are you recommended to use Nordic CoAP API from &lt;strong&gt;SDKforThread\components\iot\coap\coap_api.h&amp;nbsp;&amp;nbsp;&lt;/strong&gt;in all my projects?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP libraries</title><link>https://devzone.nordicsemi.com/thread/306104?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 12:26:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf81329f-412a-42ce-bda7-0f4008a094ed</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
[quote user=""]Is native OpenThread libraries best to use?&amp;nbsp; Some examples use this librarby.&amp;nbsp;[/quote]
&lt;p&gt;The nRF5 SDK for Zigbee and Thread includes CoAP library based on the OpenThread project.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://openthread.io/reference/group/api-coap"&gt;https://openthread.io/reference/group/api-coap&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thus, if you intend to use our Thread SDK we highly encourage to use the CoAP libryar included in the SDK&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;a title="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__api-coap-group.html" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__api-coap-group.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__api-coap-group.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
[quote user=""]Is native OpenThread libraries best to use?&amp;nbsp; Some examples use this librarby.&amp;nbsp;[/quote]
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Please see the following example:&lt;/div&gt;
&lt;div&gt;SDK_for_T&amp;amp;Z\4.1.0\examples\thread\simple_coap_client&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
[quote user=""]Which library is best to use in DFU project?[/quote]
&lt;p&gt;&amp;nbsp;We do have an example for this. Have a look at &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/thread_example_dfu.html"&gt;Thread Secure OTA DFU Example&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know how that works for you.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>