<?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>Commissioner stuck in petitioning when started by API call</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112230/commissioner-stuck-in-petitioning-when-started-by-api-call</link><description>Hi, 
 I can successfully start commissioning role when I use cli and the leader gets the commissioner active state. But when I try the same using API all, the leader gets stuck in the petition state. Following is what I did in my software. 
 
 I use a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Jun 2024 04:26:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112230/commissioner-stuck-in-petitioning-when-started-by-api-call" /><item><title>RE: Commissioner stuck in petitioning when started by API call</title><link>https://devzone.nordicsemi.com/thread/489616?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 04:26:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ec497e3-8243-4cfb-af22-8e828664bced</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;After having a discussion with OpenThread&amp;nbsp;git forum (thanks Jonathan ***), I managed to solve the issue.&amp;nbsp; OT API are not thread safe. So the issue was I invoked the&amp;nbsp;otCommissionerStart () function from within a separate thread. The solution was to register a call back to the openthread_set_state_changed_cb() and let that call back invoke the&amp;nbsp;&lt;span&gt;otCommissionerStart ().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I just noted it here in case someone else falls into the same pit.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Kaushalya&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Commissioner stuck in petitioning when started by API call</title><link>https://devzone.nordicsemi.com/thread/489604?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2024 23:30:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71f1a24a-32e9-482f-8f0d-9ea09b834583</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;Hi Charlie,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks, I have to following in my prj.conf&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_OPENTHREAD_FTD&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_OPENTHREAD_COMMISSIONER&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;This is how I got the commissioner cli command got enabled. I cant see anything like&amp;nbsp;OPENTHREAD_CONFIG_COMMISSIONER_ENABLE in my .config. I presume the&amp;nbsp;CONFIG_OPENTHREAD_COMMISSIONER is same.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Also I can use CLI to get the commissioner role to active without any problem, only API control has this issue.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Cheers,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Kaushalya&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Commissioner stuck in petitioning when started by API call</title><link>https://devzone.nordicsemi.com/thread/489498?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2024 12:06:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:714ae3ff-11d9-40ce-bc76-4e2c5bba176b</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Kaushalya,&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;The `commissioner` commands are available only when&amp;nbsp;&lt;/span&gt;&lt;span&gt;* `OPENTHREAD_CONFIG_COMMISSIONER_ENABLE` and `OPENTHREAD_FTD` are set.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Could you check if they are enabled?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Charlie&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>