<?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-server Model</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74546/coap-client-server-model</link><description>I am using NRF52840dk boards to make an openThread mesh network with CoAP. There is an example in NRF-SDK for coap client and another example for coap server. I used them and did the example project given Nordic documents. One board is server and others</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Apr 2021 12:27:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74546/coap-client-server-model" /><item><title>RE: CoAP Client-server Model</title><link>https://devzone.nordicsemi.com/thread/307480?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 12:27:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c123b8bb-9525-4d52-845e-abe1bd75624e</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;orkunsengur,&lt;/p&gt;
[quote user=""]I want reverse of exampel project. There will be one client and others will be server. [/quote]
&lt;p&gt;&amp;nbsp;I am not sure if I understand you correctly, the original &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/openthread/coap_client/README.html#thread-coap-client"&gt;Thread: CoAP Client&lt;/a&gt;&amp;nbsp;and&amp;nbsp; &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/openthread/coap_server/README.html#coap-server-sample"&gt;Thread: CoAP Server &lt;/a&gt;samples already support this. With&amp;nbsp;&lt;span&gt;unicast, you can control all the CoAP servers inside the Tread network.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user=""]I want one client and four server. How many sockets&amp;nbsp;does my client need? Is it four? And,&amp;nbsp;&lt;span&gt;&amp;nbsp;How many sockets&amp;nbsp;&lt;/span&gt;&lt;span&gt;does&lt;/span&gt;&lt;span&gt;&amp;nbsp;my each server need?&lt;/span&gt;&amp;nbsp;İs it just one?[/quote]
&lt;p&gt;&amp;nbsp;if you want to use one client to control several servers &lt;span&gt;separately&lt;/span&gt;, for example, using four buttons on the client to control one led on each four server boards separately. You do not need to initialize four CoAP sockets on the client, because the CoAP client sends requests(&lt;span&gt;coap_send_request function&lt;/span&gt;) with a server address, so you can send to a different server address every time. Our example shows how to paired with one server through the provisioning process, which means how to get the unique IPv6 address from one server. You can modify it to pair with more different servers, then you would be able to control them as you want.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>