<?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>Thread device to automatically start commissioning when it starts</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68955/thread-device-to-automatically-start-commissioning-when-it-starts</link><description>Hi All, 
 
 If I want a Thread device to automatically start commissioning when it starts, is there a code example in Nordic SDK? 
 
 Now I just found the API interface, called otJoinerStart, which also returned OK, but never got to the callback function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Dec 2020 13:16:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68955/thread-device-to-automatically-start-commissioning-when-it-starts" /><item><title>RE: Thread device to automatically start commissioning when it starts</title><link>https://devzone.nordicsemi.com/thread/282890?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 13:16:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f2a8419-4c43-4ac3-93af-2f42a19b5ca4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Try using otThreadSetPskc(). Description from thread_ftd.h:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * Set the Thread PSKc
 *
 * This function will only succeed when Thread protocols are disabled.  A successful
 * call to this function will also invalidate the Active and Pending Operational Datasets in
 * non-volatile memory.
 *
 * @param[in]  aInstance   A pointer to an OpenThread instance.
 * @param[in]  aPskc       A pointer to the new Thread PSKc.
 *
 * @retval OT_ERROR_NONE           Successfully set the Thread PSKc.
 * @retval OT_ERROR_INVALID_STATE  Thread protocols are enabled.
 *
 * @sa otThreadGetPskc
 *
 */
otError otThreadSetPskc(otInstance *aInstance, const otPskc *aPskc);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Does it work if you don&amp;#39;t add the pre shared key?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Try checking the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/thread_border_router.html?cp=7_3_2_9_0_2#thread_border_router_setup"&gt;OpenThread Border Router test description&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread device to automatically start commissioning when it starts</title><link>https://devzone.nordicsemi.com/thread/282776?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 01:33:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:443d36b9-1cf2-4bb4-9eca-ca7fac8128ec</guid><dc:creator>taoyinzhou</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;The SDK version is &amp;quot;nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8&amp;quot;.&lt;/p&gt;
&lt;p&gt;I am going to use OTBR to form a Thread network with the Thread device by commssioning. So if I use the method thread_instance_init() in main.c with .autocommissioning = true on the Thread device, where should I set pskd?&lt;/p&gt;
&lt;p&gt;The process I want to implement is that I run the command on the OTBR.&lt;br /&gt;ot-ctl commissioner start&lt;br /&gt;ot-ctl commissioner joiner add eui64 pskd.&lt;br /&gt;Then let the Thread device boot up and commissioning will be done automatically.&lt;/p&gt;
&lt;p&gt;Best, &lt;br /&gt;Tao&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread device to automatically start commissioning when it starts</title><link>https://devzone.nordicsemi.com/thread/282696?ContentTypeID=1</link><pubDate>Tue, 01 Dec 2020 13:58:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45b937f3-8792-4e7f-a441-94725f0f5661</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Tao,&lt;/p&gt;
&lt;p&gt;What SDK version do you use?&lt;/p&gt;
&lt;p&gt;Regardless you can check out the simple_coap_server and simple_coap_client examples, which will form a network. In the nRF5 SDK for Thread and Zigbee, it uses thread_instance_init() in main.c with .autocommissioning = true.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If that is not what you are looking for, please let me know.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>