<?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 can I get the number of nodes (or devices) in the mesh network?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50928/how-can-i-get-the-number-of-nodes-or-devices-in-the-mesh-network</link><description>Hi there. 
 This is my first time to utilize BLE mesh of NRF5. 
 I just wonder that the library supports getting the number of nodes in the mesh network. 
 When utilizing the ble central and ble peripheral, getting rssi or physical address can be easily</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Aug 2019 09:39:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50928/how-can-i-get-the-number-of-nodes-or-devices-in-the-mesh-network" /><item><title>RE: How can I get the number of nodes (or devices) in the mesh network?</title><link>https://devzone.nordicsemi.com/thread/205249?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 09:39:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68907c66-e88d-400f-812c-daae25071e18</guid><dc:creator>MnP_Junho</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;It is really helpful to us :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the number of nodes (or devices) in the mesh network?</title><link>https://devzone.nordicsemi.com/thread/205218?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 08:46:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f7855ff-d590-4026-a0d5-16d77488c361</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, only the provisioner know how many nodes there is in the network. It is possible to have a single device be both a provisioner and a provisonee. We had an example where we combined the provsioner with client in Mesh SDK v1.0.1. I assume you want to combine them so that the node knows how many nodes there are in the network?&lt;/p&gt;
&lt;p&gt;I would suggest you have a look at the Heartbeat message for your use-case. It can be used to supervise the network. Heartbeat messages are transmitted by nodes periodically. A heartbeat message indicates to other nodes in the network that the node sending the heartbeat is still active. Also have a look at this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39270/ble-mesh-heartbeat-example" rel="noopener noreferrer" target="_blank"&gt;post&lt;/a&gt;, it is a good starting point.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the number of nodes (or devices) in the mesh network?</title><link>https://devzone.nordicsemi.com/thread/204375?ContentTypeID=1</link><pubDate>Fri, 16 Aug 2019 00:12:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f396ab93-5878-4651-986f-cf03533a5cc4</guid><dc:creator>MnP_Junho</dc:creator><description>&lt;p&gt;Thanks Mttrinh&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To my knowledge, only provisioner can know how many nodes and states of nodes in a network whereas provisionee can&amp;#39;t.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Then, Is it possible to make single device works as&amp;nbsp;provisonee&amp;nbsp;and provisioner at the same time?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In my guess there is two categories in the nodes; provisioner and provisionee(the client and server in the &lt;span&gt;light_switch example and the beaconing in the beaconing example&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For your information, I&amp;#39;d like to inform you our background.&lt;/p&gt;
&lt;p&gt;We&amp;#39; d like to install multiple BLE device of the same type in specific zones.&amp;nbsp;Since it&amp;nbsp;is hard to check whether each device is working by pairing individually, we&amp;#39; d like to use BLE mesh for&amp;nbsp;checking it.&lt;br /&gt; Our idea is simple. If we install five devices in the same space, we periodically check the number of the nodes in the network for maintenance. If one of the devices are broken or runned out of its internal battery, the number of the nodes will change.&amp;nbsp;Due to operational limitation, same types of devices can be installed in a zone rather than multiple kinds of devices.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the number of nodes (or devices) in the mesh network?</title><link>https://devzone.nordicsemi.com/thread/204065?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2019 12:23:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14c4ca09-1a28-4a3f-a1f9-f49a359e5d37</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can find the number of devices provisioned in this struct:&amp;nbsp;network_stats_data_stored_t.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/** Structure to store the state of the provisioning process of the network nodes */
typedef struct
{
    uint16_t provisioned_devices;
    uint16_t configured_devices;
    uint16_t last_device_address;
    uint16_t next_device_address;
    const char * p_client_uri;

    uint8_t  netkey[NRF_MESH_KEY_SIZE];
    uint8_t  appkey[NRF_MESH_KEY_SIZE];
    uint8_t  self_devkey[NRF_MESH_KEY_SIZE];
} network_stats_data_stored_t;

#endif /* NETWORK_SETUP_H__ */&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the number of nodes (or devices) in the mesh network?</title><link>https://devzone.nordicsemi.com/thread/203915?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 21:42:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fbf95d9-6f30-4444-8f7e-4287a98409cd</guid><dc:creator>MnP_Junho</dc:creator><description>&lt;p&gt;Thanks, BinderT&lt;/p&gt;
&lt;p&gt;As you stated, I understand that only the provisioned device in the mesh network knows&amp;nbsp;&lt;span&gt;which devices have been configured into the mesh network.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then, which function or structure includes the number of devices?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * Retrieves stored device state manager configuration.
 * The number of provisioned devices is calculated from the number of device keys stored. The device
 * key for each server is stored on provisioning complete in the `provisioner_prov_complete_cb()`.
 *
 * @returns Number of provisioned devices.
 */
static uint16_t provisioned_device_handles_load(void)
{
    uint16_t provisioned_devices = 0;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I was not able to find the function&amp;nbsp;provisioned_device_handles_load(void) in the mesh example and&lt;/p&gt;
&lt;p&gt;the code above seems returns 0 all the time.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the number of nodes (or devices) in the mesh network?</title><link>https://devzone.nordicsemi.com/thread/203821?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 12:39:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7d98c2b-2f19-4ab7-bc17-85c2cbf85ca4</guid><dc:creator>BinderT</dc:creator><description>&lt;p&gt;Have a look at this question might be of help:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/32953/how-many-device"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/32953/how-many-device&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&amp;quot;O&lt;span&gt;nly the Provisioner device is aware of which devices have been configured into the mesh network&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>