<?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>Add children to a Thread ressource</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79985/add-children-to-a-thread-ressource</link><description>Hello I am developing an application based on the &amp;quot;ble_thread_dyn_mtd_coap_cli&amp;quot; example. To create a Thread resource, I see that the &amp;quot;otCoapAddResource()&amp;quot; function is called. My question is: is it possible to create child resources with this function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Sep 2021 15:05:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79985/add-children-to-a-thread-ressource" /><item><title>RE: Add children to a Thread ressource</title><link>https://devzone.nordicsemi.com/thread/331131?ContentTypeID=1</link><pubDate>Fri, 24 Sep 2021 15:05:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9262d3a9-0b06-4652-84a1-3e761e6893ea</guid><dc:creator>GPereira</dc:creator><description>&lt;p&gt;Hello QuentinD!&lt;/p&gt;
&lt;p&gt;Your question seems to be related to &lt;a href="https://datatracker.ietf.org/doc/html/rfc7252"&gt;CoAP&amp;#39;s specification&lt;/a&gt; itself rather than an Thread related question.&lt;/p&gt;
&lt;p&gt;As you are probably aware, CoAP resources are defined by their path and the REST methods implemented. This architecture allows flexibility on path definition in such way that you can define a CoAP resource that listens on /led and three others that listen on /led/1, /led/2 and /led/3.&lt;/p&gt;
&lt;p&gt;The action you implement on a request to /led can call the three functions the other paths call. Does this solve your problem?&lt;/p&gt;
&lt;p&gt;As a final note I would advice against using the OpenThread&amp;#39;s implementation of CoAP since it is not as complete and not as actively maintained as &lt;a href="https://docs.zephyrproject.org/latest/reference/networking/coap.html"&gt;Zephyr&amp;#39;s CoAP implementation&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>