<?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>Can device act as CoAP service and client at the same time?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108163/can-device-act-as-coap-service-and-client-at-the-same-time</link><description>Hi! I want to write some software utilizing OpenThread and CoAP. I&amp;#39;ve seen samples of coap server and coap client in NCS. However, I want to ask whether it&amp;#39;s possible or not for a device to act as CoAP server and client simultaneously? My nRF Connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Apr 2025 09:47:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108163/can-device-act-as-coap-service-and-client-at-the-same-time" /><item><title>RE: Can device act as CoAP service and client at the same time?</title><link>https://devzone.nordicsemi.com/thread/530773?ContentTypeID=1</link><pubDate>Mon, 07 Apr 2025 09:47:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97fb8c8b-435f-49c1-a185-5bea65aa2302</guid><dc:creator>ArunRuchir</dc:creator><description>&lt;p&gt;Thanks Achim.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can some one help if they have done or can do this combined CoAP Client and Server functionalities ? Pls help.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Arun&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can device act as CoAP service and client at the same time?</title><link>https://devzone.nordicsemi.com/thread/530537?ContentTypeID=1</link><pubDate>Fri, 04 Apr 2025 05:59:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:def50d7a-8c0d-4335-a549-24359c923488</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;In general, UDP sockets are always acting as server&amp;amp;client at the same time. CoAP messages are also designed to act as both request and response, the only difference is the contained code, 0.xy is a request, 2.xy a success response, 4.xy a client error, and 5.xy a server error. So, it&amp;#39;s easy to send&amp;amp;receive UDP massage with the same socket, you pass the received messages to the parser and then you check the code and split it.&lt;/p&gt;
&lt;p&gt;I just don&amp;#39;t know, if the zephyr&amp;#39;s coap client&amp;amp;server are able to do so, I mainly use the message encoding and parsing, but not the message handling of zephyr.&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can device act as CoAP service and client at the same time?</title><link>https://devzone.nordicsemi.com/thread/530533?ContentTypeID=1</link><pubDate>Fri, 04 Apr 2025 05:02:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:219be625-30da-44cc-8064-d890503d92db</guid><dc:creator>ArunRuchir</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Upon searching I got this and have some specific need to make CoAP Server send some very specific data to OTBR (or other server). This will be once in a while and not regular.&amp;nbsp;&lt;br /&gt;So,can some one guide how to make a CoAP Server becoming CoAP client momentarily and back to server ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Arun&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can device act as CoAP service and client at the same time?</title><link>https://devzone.nordicsemi.com/thread/468301?ContentTypeID=1</link><pubDate>Sun, 11 Feb 2024 10:59:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9c40c50-1d36-4976-9e4c-09ebdd807714</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;For CoAP in general, that&amp;#39;s possible and called &amp;quot;role-exchange&amp;quot;. The message format for request and responses is the same, only the &amp;quot;code&amp;quot; uses different values for requests and responses. But I don&amp;#39;t know, If the specific implementation used there supports it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>