<?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>App key does not bind in Mesh provisioner in nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97366/app-key-does-not-bind-in-mesh-provisioner-in-nrf52840</link><description>Hi, i am using &amp;quot;mesh provisioner&amp;quot; example in nrf52840. ncs v2.2.0 i am trying to provision nearby device, that is also nrf52840 running &amp;quot;ble_periphera_lbsl_coex&amp;quot; example. And i manually set publish group address and subscribtion on mesh provisioner but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Mar 2023 15:22:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97366/app-key-does-not-bind-in-mesh-provisioner-in-nrf52840" /><item><title>RE: App key does not bind in Mesh provisioner in nrf52840</title><link>https://devzone.nordicsemi.com/thread/415284?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 15:22:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9315959e-0c2d-4b00-9003-6faf5f1025aa</guid><dc:creator>Vignesh R</dc:creator><description>&lt;p&gt;I tried the provisioner example on nrf52832 DK and it works fine,&lt;/p&gt;
&lt;p&gt;but when i try to add publication and subscription config&amp;#39;s, the provisioner reboots multiple times and only after a few reboots the configurations has been set on the provisionee&lt;/p&gt;
&lt;p&gt;I have added the pub &amp;amp; sub config in function configure_node():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;for (int i = 0; i &amp;lt; elem.nvnd; i++)
		{
			struct bt_mesh_mod_id_vnd id =
				bt_mesh_comp_p0_elem_mod_vnd(&amp;amp;elem, i);

			printk(&amp;quot;Binding AppKey to model 0x%03x:%04x:%04x\n&amp;quot;,
				   elem_addr, id.company, id.id);

			err = bt_mesh_cfg_mod_app_bind_vnd(net_idx, node-&amp;gt;addr, elem_addr,
											   app_idx, id.id, id.company, &amp;amp;status);
			printk(&amp;quot;Vnd Key bind (err: %d, status: %d)\n&amp;quot;, err,
				   status);
			if (err || status)
			{
				printk(&amp;quot;Failed (err: %d, status: %d)\n&amp;quot;, err,
					   status);
			}
			err = bt_mesh_cfg_mod_pub_set_vnd(net_idx, node-&amp;gt;addr, elem_addr, id.id,
												  id.company, &amp;amp;pub, &amp;amp;status);
			printk(&amp;quot;Pub set (err: %d, status: %d)\n&amp;quot;, err,
				   status);
			if (err || status)
			{
				printk(&amp;quot;Failed (err: %d, status: %d)\n&amp;quot;, err,
					   status);
			}
			uint16_t sub_addr = 0xC000;
			err = bt_mesh_cfg_mod_sub_add_vnd(net_idx, node-&amp;gt;addr, elem_addr, sub_addr, id.id,
												  id.company, &amp;amp;status);
			printk(&amp;quot;Sub add (err: %d, status: %d)\n&amp;quot;, err,
				   status);
			if (err || status)
			{
				printk(&amp;quot;Failed (err: %d, status: %d)\n&amp;quot;, err,
					   status);
			}
		}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;publication parameters:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;struct bt_mesh_cfg_mod_pub pub = {
	.addr = 0xC000,
	.uuid = NULL,
	.ttl = 4,
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Following is the LOG of the mesh_provisioner:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Waiting for unprovisioned beacon...
Waiting for unprovisioned beacon...
Device a5752069b9df48bb8000000000000000 detected, press button 1 to provision.
Provisioning a5752069b9df48bb8000000000000000
Waiting for node to be added...
Added node 0x0004
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: 0, status: 0)
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Initializing...
Bluetooth initialized
Mesh initialized
Loading stored settings
Using stored CDB
Using stored settings
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: 0, status: 0)
Pub set (err: 0, status: 0)
Sub add (err: 0, status: 0)
Element @ 0x0005: 1 + 1 models
Binding AppKey to model 0x005:0059:000a
Vnd Key bind (err: 0, status: 0)
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Initializing...
Bluetooth initialized
Mesh initialized
Loading stored settings
Using stored CDB
Using stored settings
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: 0, status: 0)
Pub set (err: 0, status: 0)
Sub add (err: 0, status: 0)
Element @ 0x0005: 1 + 1 models
Binding AppKey to model 0x005:0059:000a
Vnd Key bind (err: -116, status: 0)
Failed (err: -116, status: 0)
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Initializing...
Bluetooth initialized
Mesh initialized
Loading stored settings
Using stored CDB
Using stored settings
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: 0, status: 0)
Pub set (err: 0, status: 0)
Sub add (err: 0, status: 0)
Element @ 0x0005: 1 + 1 models
Binding AppKey to model 0x005:0059:000a
Vnd Key bind (err: 0, status: 0)
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Initializing...
Bluetooth initialized
Mesh initialized
Loading stored settings
Using stored CDB
Using stored settings
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: 0, status: 0)
Pub set (err: 0, status: 0)
Sub add (err: 0, status: 0)
Element @ 0x0005: 1 + 1 models
Binding AppKey to model 0x005:0059:000a
Vnd Key bind (err: 0, status: 0)
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Initializing...
Bluetooth initialized
Mesh initialized
Loading stored settings
Using stored CDB
Using stored settings
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: 0, status: 0)
Pub set (err: 0, status: 0)
Sub add (err: 0, status: 0)
Element @ 0x0005: 1 + 1 models
Binding AppKey to model 0x005:0059:000a
Vnd Key bind (err: 0, status: 0)
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Initializing...
Bluetooth initialized
Mesh initialized
Loading stored settings
Using stored CDB
Using stored settings
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: 0, status: 0)
Pub set (err: 0, status: 0)
Sub add (err: 0, status: 0)
Element @ 0x0005: 1 + 1 models
Binding AppKey to model 0x005:0059:000a
Vnd Key bind (err: 0, status: 0)
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Initializing...
Bluetooth initialized
Mesh initialized
Loading stored settings
Using stored CDB
Using stored settings
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: 0, status: 0)
Pub set (err: 0, status: 0)
Sub add (err: 0, status: 0)
Element @ 0x0005: 1 + 1 models
Binding AppKey to model 0x005:0059:000a
Vnd Key bind (err: 0, status: 0)
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Initializing...
Bluetooth initialized
Mesh initialized
Loading stored settings
Using stored CDB
Using stored settings
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: 0, status: 0)
Pub set (err: 0, status: 0)
Sub add (err: 0, status: 0)
Element @ 0x0005: 1 + 1 models
Binding AppKey to model 0x005:0059:000a
Vnd Key bind (err: 0, status: 0)
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Initializing...
Bluetooth initialized
Mesh initialized
Loading stored settings
Using stored CDB
Using stored settings
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: 0, status: 0)
Pub set (err: 0, status: 0)
Sub add (err: 0, status: 0)
Element @ 0x0005: 1 + 1 models
Binding AppKey to model 0x005:0059:000a
Vnd Key bind (err: 0, status: 0)
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Initializing...
Bluetooth initialized
Mesh initialized
Loading stored settings
Using stored CDB
Using stored settings
Configuring node 0x0004...
Element @ 0x0004: 2 + 1 models
Binding AppKey to model 0x004:0002
Binding AppKey to model 0x004:0059:000a
Vnd Key bind (err: -116, status: 0)
Failed (err: -116, status: 0)
Pub set (err: -116, status: 0)
Failed (err: -116, status: 0)
Sub add (err: -116, status: 0)
Failed (err: -116, status: 0)
Element @ 0x0005: 1 + 1 models
Binding AppKey to model 0x005:0059:000a
Vnd Key bind (err: 0, status: 0)
Pub set (err: -116, status: 0)
Failed (err: -116, status: 0)
Sub add (err: 0, status: 0)
Configuration complete
Waiting for unprovisioned beacon...
Waiting for unprovisioned beacon...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Why does this reboot happens??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>