<?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>Enable server-client role in a single node.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84625/enable-server-client-role-in-a-single-node</link><description>Hi, 
 In nRF_SDK_for_Thread_and_zigbee, we were using the following function to enable thread coap in both server and client role in a single node: 
 I want to implement the same in nRF_Connect_sdk. What should I do to enable both server and client roles</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Feb 2022 11:43:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84625/enable-server-client-role-in-a-single-node" /><item><title>RE: Enable server-client role in a single node.</title><link>https://devzone.nordicsemi.com/thread/352302?ContentTypeID=1</link><pubDate>Thu, 10 Feb 2022 11:43:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb788831-1cf7-44d2-bda8-6e1d2f95761d</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Bhumika&lt;/p&gt;
&lt;p&gt;In the nRF Connect SDK, we have some &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/samples/samples_thread.html"&gt;Thread samples&lt;/a&gt;. Among these are a CoAP Server and CoAP Client sample.&lt;/p&gt;
&lt;p&gt;From the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/samples/openthread/coap_server/README.html"&gt;CoAP Server docs&lt;/a&gt;: &lt;br /&gt;&amp;quot;This sample uses the native &lt;a href="https://openthread.io/reference/group/api-coap"&gt;OpenThread CoAP API&lt;/a&gt; for communication. For new application development, use &lt;a title="(in Zephyr Project v2.7.0)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/zephyr/reference/networking/coap.html#coap-sock-interface"&gt;&lt;span&gt;Zephyr’s CoAP API&lt;/span&gt;&lt;/a&gt;. For example usage of the Zephyr CoAp API, see the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/samples/openthread/coap_client/README.html#coap-client-sample"&gt;&lt;span&gt;Thread: CoAP Client&lt;/span&gt;&lt;/a&gt; sample.&amp;quot;&lt;/p&gt;
&lt;p&gt;So I recommend to start with the Thread CoAP Client and add code for the CoAP Server yourself from the Zephyr CoAP API.&lt;br /&gt;Do not mix code from the two examples, as they use different APIs.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/zephyr/samples/net/sockets/coap_server/README.html"&gt;Zephyr CoAP Server sample&lt;/a&gt; might give you some pointers on how to set up a server using the Zephyr CoAP API.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/ug_thread_configuring.html#additional-configuration-options"&gt;Thread additional configuration options&lt;/a&gt; might also be useful.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>