<?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>Is there an API for manually scanning potential Friend nodes?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111340/is-there-an-api-for-manually-scanning-potential-friend-nodes</link><description>Hello, 
 we are trying to implement a custom Friend node research policy, before the friendship is established. 
 Since bt_mesh_lpn_poll() works only when the frienship is active, we are looking for something similar in bluetooth/mesh/main.h when the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Jul 2024 08:33:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111340/is-there-an-api-for-manually-scanning-potential-friend-nodes" /><item><title>RE: Is there an API for manually scanning potential Friend nodes?</title><link>https://devzone.nordicsemi.com/thread/491510?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 08:33:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a963a60c-37df-43dc-a22d-c5fd61016918</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Happy to help,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s also important to consider the network constellation (range, placement of routers, etc) when validating if packet loss is caused by configs, constellation or other&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API for manually scanning potential Friend nodes?</title><link>https://devzone.nordicsemi.com/thread/491379?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2024 13:58:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c68bfe8-e1a8-4524-9499-d10469592f39</guid><dc:creator>enrico papi</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;yes, probably we set other config options that causes this frequently missed reception of get/set request on mesh models.&lt;/p&gt;
&lt;p&gt;thanks for the support&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API for manually scanning potential Friend nodes?</title><link>https://devzone.nordicsemi.com/thread/491346?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2024 13:13:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a38f014a-9847-4bf5-a69e-5d262fb093d9</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user="enrico papi"]We would like to share that in our setup, enabling CONFIG_BT_MESH_LPN_ESTABLISHMENT, causes high ble mesh packet receive loss in general, both when friendship state is established or not[/quote]
&lt;p&gt;Mesh is not a lossless protocol, which is why retransmissions are used. Could you specify what you consider a high ble mesh packet receive loss?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API for manually scanning potential Friend nodes?</title><link>https://devzone.nordicsemi.com/thread/491328?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2024 12:32:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ef31160-2ad2-4099-9a0d-c3bf4ba5d75a</guid><dc:creator>enrico papi</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;thank you. We are tweaking the configs you suggested:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;CONFIG_BT_MESH_LPN_RETRY_TIMEOUT=6&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/kconfig/index.html#config_bt_mesh_lpn_retry_timeout" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_MESH_LPN_RETRY_TIMEOUT" rel="noopener noreferrer" target="_blank"&gt;CONFIG_BT_MESH_LPN_RETRY_TIMEOUT&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/kconfig/index.html#config_bt_mesh_lpn_rssi_factor" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_MESH_LPN_RSSI_FACTOR" rel="noopener noreferrer" target="_blank"&gt;CONFIG_BT_MESH_LPN_RSSI_FACTOR&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We would like to share that in our setup, enabling CONFIG_BT_MESH_LPN_ESTABLISHMENT, causes high ble mesh packet receive loss in general, both when friendship state is established or not&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API for manually scanning potential Friend nodes?</title><link>https://devzone.nordicsemi.com/thread/485463?ContentTypeID=1</link><pubDate>Wed, 22 May 2024 14:35:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a52da25d-f12f-4924-8e0a-ab998633764a</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;So a couple more pointers here after a discussion with the Mesh team.&lt;/p&gt;
&lt;p&gt;You &lt;i&gt;can &lt;/i&gt;call &lt;code&gt;bt_mesh_lpn_set()&lt;/code&gt; whenever you want since this is a run-time feature, though they would have to toggle it off and then on again due to &lt;a title="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#l510-l513" href="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#L510-L513" rel="noopener noreferrer" target="_blank"&gt;early return if it&amp;#39;s already toggled on&lt;/a&gt;. Toggling off, however, will clear all existing friendships and do some cleanup, which&amp;nbsp;does not initially feel like it would benefit the current consumption.&lt;/p&gt;
&lt;p&gt;We&amp;nbsp;think a better approach would be to look at some acceptance criteria for accepting the friend offer. You have the &lt;a title="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#l80-l82" href="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#L80-L82" rel="noopener noreferrer" target="_blank"&gt;LPN_CRITERIA&lt;/a&gt;, which are &lt;a title="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#l671" href="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#L671" rel="noopener noreferrer" target="_blank"&gt;not utilized&lt;/a&gt; as far as&amp;nbsp;we can see, but can possibly be modified to do some filtering. Alternatively, you can for instance use the rssi of the &lt;a title="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#l628" href="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#L628" rel="noopener noreferrer" target="_blank"&gt;friend offer&lt;/a&gt; as a criteria for accepting the friend offer.&lt;/p&gt;
&lt;p&gt;Our first go-to for reducing power consumption for the LPN in the looking-for-friend phase would be to set CONFIG_BT_MESH_LPN_ESTABLISHMENT=y, which you&amp;#39;ve already done. Other than that we would recommend that you try to tweak all the configurations we&amp;#39;ve provided to improve the current consumption before spending too much time on creating your own friend acceptance policy through&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/kconfig/index.html#config_bt_mesh_lpn_auto_timeout" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_MESH_LPN_AUTO_TIMEOUT" rel="noopener noreferrer" target="_blank"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_MESH_LPN_AUTO_TIMEOUT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/kconfig/index.html#config_bt_mesh_lpn_retry_timeout" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_MESH_LPN_RETRY_TIMEOUT" rel="noopener noreferrer" target="_blank"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_MESH_LPN_RETRY_TIMEOUT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/kconfig/index.html#config_bt_mesh_lpn_rssi_factor" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_MESH_LPN_RSSI_FACTOR" rel="noopener noreferrer" target="_blank"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_MESH_LPN_RSSI_FACTOR&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API for manually scanning potential Friend nodes?</title><link>https://devzone.nordicsemi.com/thread/485120?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 12:42:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f07be056-36d0-4e54-9186-a8e520db3140</guid><dc:creator>enrico papi</dc:creator><description>&lt;p&gt;Hello Andreas,&lt;/p&gt;
&lt;p&gt;thanks for the clarifications. As for the question: we would like to scan for potential friends manually.&lt;/p&gt;
&lt;p&gt;Since this is done automatically by the stack once the feature is enabled at runtime with &amp;#39;bt_mesh_lpn_set()&amp;#39; we were considering a possibility of calling this function with On, Off arguments at the rate we need our intended policy for long term friend research in case no one are found in the first 5 seconds.&lt;/p&gt;
&lt;p&gt;Looking at &amp;#39;bt_mesh_lpn_set()&amp;#39; implementation we don&amp;#39;t know if it is feasible to call it quite frequently (let&amp;#39;s say once in a minute for example) or it is too risky.&lt;/p&gt;
&lt;p&gt;thanks for the support,&lt;/p&gt;
&lt;p&gt;enrico&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API for manually scanning potential Friend nodes?</title><link>https://devzone.nordicsemi.com/thread/485107?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 12:21:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c26d1679-7bfd-48b7-bc28-71fc3838e36d</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Just to be safe, could you clarify if you want to scan for potential friends manually (as the title implies) or if you want to poll a recently established friend (as the last sentence in your description implies)?&lt;/p&gt;
&lt;p&gt;In general: Friend polling and friendship establishment is handled automatically by the stack when a LPN is provisioned and ready to scan for friends.&amp;nbsp;&lt;span&gt;&lt;span dir="ltr"&gt;When the LPN state is enabled, the node itself will send a friend request (granted it is provisioned) with possible &lt;a title="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#l80-l82" href="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#L80-L82" rel="noopener noreferrer" target="_blank"&gt;criterias for determining which friend node it may choose&lt;/a&gt;. Capable friend nodes in range will respond with a friend offer, and the LPN will attempt to poll the friend once friendship is established. If no friendships were established, the LPN node will retry sending a friend request after a &lt;a title="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#l56" href="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#L56" rel="noopener noreferrer" target="_blank"&gt;specified time&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;From what I can see,&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#L537"&gt;send_friend_req&lt;/a&gt;&amp;nbsp;is called within&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/32b69f53aa3af9a6efd366ac9dc0b1775609154d/subsys/bluetooth/mesh/lpn.c#L506"&gt;bt_mesh_lpn_set()&lt;/a&gt;&amp;nbsp; (&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/connectivity/bluetooth/api/mesh/core.html"&gt;Mesh core API&lt;/a&gt;) which you can use to change the LPN (and similarly Friend through bt_mesh_friend_set()) at runtime. The send_friend_req is not a part of the API. I&amp;#39;m not 100% sure if this is what you&amp;#39;re looking for, but it should be enough to get you started.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Kind regards,&lt;br /&gt;Andreas&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>