<?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>How to get the unicast address of all nodes on the provisioner&amp;#39;s side (one device acts as the provisioner, not  APP)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72996/how-to-get-the-unicast-address-of-all-nodes-on-the-provisioner-s-side-one-device-acts-as-the-provisioner-not-app</link><description>Hi Experts, 
 
 Recently, I am developing the mesh project based on the latest nRF mesh SDK, everything is running well. But I encountered one issue, that is how can provisioner (one device acts as provisioner) obtain the unicast address of all nodes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Apr 2021 12:50:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72996/how-to-get-the-unicast-address-of-all-nodes-on-the-provisioner-s-side-one-device-acts-as-the-provisioner-not-app" /><item><title>RE: How to get the unicast address of all nodes on the provisioner's side (one device acts as the provisioner, not  APP)</title><link>https://devzone.nordicsemi.com/thread/303157?ContentTypeID=1</link><pubDate>Tue, 06 Apr 2021 12:50:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f900c5a1-51e6-44c2-b8a0-d8af492cd299</guid><dc:creator>xiaolongba</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/mttrinh"&gt;Mttrinh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;sorry for the late response many thanks for your replies. I will have a try and then feedback to you soon. pls close this ticket first, I will reopen it if the issue is still present.&lt;/p&gt;
&lt;div class="ms-editor-squiggler" style="background:initial;border:initial;border-collapse:initial;border-radius:initial;border-spacing:initial;box-shadow:initial;color:initial;clear:initial;cursor:initial;display:block;float:initial;font:initial;height:0px;letter-spacing:initial;list-style:initial;margin:initial;overflow:initial;padding:initial;table-layout:initial;text-align:initial;text-decoration:initial;text-indent:initial;text-overflow:initial;text-shadow:initial;text-transform:initial;vertical-align:initial;white-space:initial;width:initial;"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get the unicast address of all nodes on the provisioner's side (one device acts as the provisioner, not  APP)</title><link>https://devzone.nordicsemi.com/thread/302148?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 13:43:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b629b46-94a6-493f-b3c8-a759aa8dfddd</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Maybe you can try out this function &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v5.0.0/group__DEVICE__STATE__MANAGER__ADDRESSES.html#ga983f4d3e0bd84eccb1f80cfe7bfbf181" rel="noopener noreferrer" target="_blank"&gt;dsm_address_publish_remove()&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get the unicast address of all nodes on the provisioner's side (one device acts as the provisioner, not  APP)</title><link>https://devzone.nordicsemi.com/thread/301929?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 13:55:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37b3dab1-a925-4f87-a8c0-685fb5e253f1</guid><dc:creator>xiaolongba</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/mttrinh"&gt;Mttrinh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Many thanks for your detailed replies. unfortunately,&amp;nbsp; the answer you mentioned cannot meet my requirements. the way you mentioned above is to update the NetKey of the mesh network. of course, it can remove the unwanted node indirectly. However, that is not a good solution if there are 100 or 200 nodes as you need to transmit the update net key request to all the nodes one by one, excluding the unwanted node. But what I wanted as below:&lt;/p&gt;
&lt;p&gt;1. provisioner can know the unicast address of all nodes in the mesh network via the &lt;strong&gt;dsm_address_get_all()&amp;nbsp;&lt;/strong&gt;function or other functions&lt;/p&gt;
&lt;p&gt;2. provisioner can update the unicast address list when adding or removing the nodes&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;regarding point1, I can get the unicast address of all nodes, However, as I said above, this unicast address list cannot be updated after removing the node from the mesh network. so to implement this, I tried to check if there is one API or way to delete the unicast address from DSM directly. and then the unicast address will be updated when calling the&amp;nbsp;&lt;strong&gt;dsm_address_get_all()&amp;nbsp;&lt;/strong&gt;&lt;span&gt;function next time.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;so is it possible to implement this purpose?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;thanks in advance.&lt;/span&gt;&lt;/p&gt;
&lt;div class="ms-editor-squiggler" style="background:initial;border:initial;border-collapse:initial;border-radius:initial;border-spacing:initial;box-shadow:initial;color:initial;clear:initial;cursor:initial;display:block;float:initial;font:initial;height:0px;letter-spacing:initial;list-style:initial;margin:initial;overflow:initial;padding:initial;table-layout:initial;text-align:initial;text-decoration:initial;text-indent:initial;text-overflow:initial;text-shadow:initial;text-transform:initial;vertical-align:initial;white-space:initial;width:initial;"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get the unicast address of all nodes on the provisioner's side (one device acts as the provisioner, not  APP)</title><link>https://devzone.nordicsemi.com/thread/301920?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 13:26:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9e437c2-2161-4f8e-b3d8-c94ec0ebd2d6</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is suggestions/tips from our developer for you to get started:&lt;/p&gt;
&lt;p&gt;To remove the address and the device key of a node from DSM, you can to do the following:&lt;br /&gt; nrf_mesh_address_t address_to_remove = { NRF_MESH_ADDRESS_TYPE_UNICAST, unicast_address, NULL };&lt;br /&gt; dsm_handle_t address_handle = DSM_HANDLE_INVALID;&lt;br /&gt; dsm_handle_t devkey_handle = DSM_HANDLE_INVALID;&lt;/p&gt;
&lt;p&gt;NRF_MESH_ASSERT(dsm_address_handle_get(&amp;amp;address_to_remove, &amp;amp;address_handle) == NRF_SUCCESS);&lt;br /&gt; NRF_MESH_ASSERT(dsm_devkey_handle_get(unicast_address, &amp;amp;devkey_handle) = NRF_SUCCESS);&lt;br /&gt; NRF_MESH_ASSERT(dsm_address_publish_remove(address_handle) == NRF_SUCCESS);&lt;br /&gt; NRF_MESH_ASSERT(dsm_devkey_delete(dev_handle) == NRF_SUCCESS);&lt;/p&gt;
&lt;p&gt;Please note, before doing that, you MUST to perform the node removal procedure defined in the mesh profile specification v1.0.1, section 3.10.7. Node reset is not the correct way of doing that.&lt;br /&gt;You can use the following Configuration Client API to do that:&lt;/p&gt;
&lt;p&gt;0. If the node you need to remove is not part of the primary subnet, you can obtain the netkey index using dsm_subnet_handle_to_netkey_index().&lt;br /&gt; For the primary subnet, the netkey index is 0.&lt;br /&gt; 1. To Update NetKey:&lt;br /&gt; uint8_t new_netkey[NRF_MESH_KEY_SIZE] = { ... }; // New NetKey&lt;br /&gt; config_client_netkey_update(NETKEY_INDEX, new_netkey); // Where NETKEY_INDEX is 0 for the primary subnet&lt;br /&gt; 2. To change Key Refresh phase to 2&lt;br /&gt; config_client_key_refresh_phase_set(NETKEY_INDEX, NRF_MESH_KEY_REFRESH_PHASE_2);&lt;br /&gt; 3. To change Key Refresh phase to 3&lt;br /&gt; config_client_key_refresh_phase_set(NETKEY_INDEX, NRF_MESH_KEY_REFRESH_PHASE_3);&lt;/p&gt;
&lt;p&gt;Each operation must be performed sequentially for each device (including provisioner), but excluding the device you want to remove from the network.&lt;/p&gt;
&lt;p&gt;Remember to configure Configuration Client publication for each operation:&lt;br /&gt; nrf_mesh_address_t address_to_update = { NRF_MESH_ADDRESS_TYPE_UNICAST, unicast_address, NULL };&lt;br /&gt; dsm_handle_t address_handle = DSM_HANDLE_INVALID;&lt;br /&gt; dsm_handle_t devkey_handle = DSM_HANDLE_INVALID;&lt;/p&gt;
&lt;p&gt;NRF_MESH_ASSERT(dsm_address_handle_get(&amp;amp;address_to_update, &amp;amp;address_handle) == NRF_SUCCESS);&lt;br /&gt; NRF_MESH_ASSERT(dsm_devkey_handle_get(unicast_address, &amp;amp;devkey_handle) = NRF_SUCCESS);&lt;br /&gt; config_client_server_set(devkey_handle, address_handle);&lt;br /&gt; config_client_server_bind(devkey_handle);&lt;/p&gt;
&lt;p&gt;Please also note that the provisioner can reuse the remove address ONLY after IV index is updated so that the new node can reuse the SEQ numbers.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get the unicast address of all nodes on the provisioner's side (one device acts as the provisioner, not  APP)</title><link>https://devzone.nordicsemi.com/thread/301517?ContentTypeID=1</link><pubDate>Tue, 23 Mar 2021 16:08:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d317b95-1f4f-414a-a937-330820b608ef</guid><dc:creator>xiaolongba</dc:creator><description>[quote userid="15475" url="~/f/nordic-q-a/72996/how-to-get-the-unicast-address-of-all-nodes-on-the-provisioner-s-side-one-device-acts-as-the-provisioner-not-app/301506#301506"] It is something you have to implement yourself unfortunately. [/quote]
&lt;p&gt;Hi, Mttrinh&lt;/p&gt;
&lt;p&gt;Ok, that is no problem. But I don&amp;#39;t know how to remove the unicast address from the database. Could you give me tips about it?&lt;/p&gt;
[quote userid="15475" url="~/f/nordic-q-a/72996/how-to-get-the-unicast-address-of-all-nodes-on-the-provisioner-s-side-one-device-acts-as-the-provisioner-not-app/301506#301506"]There is a Node Removal procedure defined in the mesh specification under section 3.10.7[/quote]
&lt;p&gt;Ok, removing the node is very easy, but the problem is that how to utilize the unicast address of them after removing from the network and how does the provisioner deletes these unicast addresses from DSM one by one. Could you give me more information about it?&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get the unicast address of all nodes on the provisioner's side (one device acts as the provisioner, not  APP)</title><link>https://devzone.nordicsemi.com/thread/301506?ContentTypeID=1</link><pubDate>Tue, 23 Mar 2021 15:36:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d7bda29-618e-4343-9ab1-3c69712f2b35</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1. In our examples there is no implementation that let a provisioner know when a node has been removed from the network. Like you said it possible to send a message to the provisioner before doing a node reset. Also, this should be implemented as an ACK message, so you get an ACK from the provisioner before the node resets.&lt;/p&gt;
&lt;p&gt;Another option is to for example ping each node in the database and after a certain time if th node don&amp;#39;t respond, you can consider the node removed from the network.&lt;/p&gt;
&lt;p&gt;2. There is no removal procedure implemented in our provisioner example that let you remove the address of a node. It is something you have to implement yourself unfortunately. There is a Node Removal procedure defined in the mesh specification under section 3.10.7.&lt;/p&gt;
&lt;p&gt;The function&amp;nbsp;&lt;strong&gt;dsm_devkey_delete&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;is for removing an existing device key&amp;nbsp;not an address.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>