<?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>SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23250/sdk13-s132-peripherial-mode-how-bonding-does-work-in-hrs-example</link><description>Hi all!
I write for nRF52 but I can&amp;#39;t to understand it. There are two cases: 
 first- I want bound my peripherial with central. And in future I want connect only between those 2 devices. How should I do? Use whitelist on the central? And when first</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Jul 2017 12:26:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23250/sdk13-s132-peripherial-mode-how-bonding-does-work-in-hrs-example" /><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91432?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2017 12:26:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8d937fe-081f-477d-a343-a30c8ac0182a</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I already edited message and have changed from higest to lowest. Just mistake
Ok. Thanks for full answeer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91431?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2017 11:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:341b6db9-900d-4e62-92c0-babcf5ecac33</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;It should work, but why have you named the variable &lt;em&gt;highest&lt;/em&gt; if it is the lowest you want? You should also check the returned error code of pm_peer_delete() and be aware that the operation is not complete until you have received PM_EVT_PEER_DELETE_SUCCEEDED. See &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/group__peer__manager.html?cp=4_0_0_6_2_13_51#gad20bb7430862e537e4219cf9fd8c5f98"&gt;this&lt;/a&gt; for more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91434?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2017 11:45:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ed64232-5cb8-4254-8adf-59c3379f3b5c</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;example pls.&lt;/p&gt;
&lt;p&gt;it it correct?:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ret_code_t err_code = pm_peer_ranks_get(NULL,
                                        NULL,
                                        &amp;amp;m_lowest_ranked_peer,
                                        &amp;amp;m_current_lowest_peer_rank);
if (err_code == NRF_SUCCESS)
{
    pm_peer_delete (m_lowest_ranked_peer);
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91433?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2017 10:58:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b901349-40fb-4fbf-871f-9a590e45e89c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Yes, an error code is returned, but the arguments are &lt;a href="https://www.tutorialspoint.com/cprogramming/c_function_call_by_reference.htm"&gt;called by reference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As you can see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/group__peer__manager.html#gacc5d71e8a81c55d6df58b8025b49da1c"&gt;here&lt;/a&gt;, p_lowest_ranked_peer is an output, and is the peer ID with the lowest rank of all peers, for example, the least recently used peer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91430?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 16:04:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:727cf02c-2ab7-49a6-8ce4-37df1cc6a58c</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I can&amp;#39;t understand about how to pm_peer_ranks_get() will return lowest rank? It return err_code.
Give, pls, example:
when connected, I use&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = pm_peer_rank_highest(p_evt-&amp;gt;peer_id);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;when I want to delete old bond? How to do it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91429?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 16:03:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04b86118-551c-4392-bce3-3e159a4bd838</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I can&amp;#39;t understand about how to pm_peer_ranks_get() will return lowest rank? It return err_code.
Give, pls, example:
when connected, I use&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = pm_peer_rank_highest(p_evt-&amp;gt;peer_id);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;when I want to delete old bond? How to do it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91428?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 11:32:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f9b96cf-8cfc-4cad-b68c-69d714ac20fd</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;when I getted  peer ID of the peer with the lowest rank from pm_peer_ranks_get(), I&amp;#39;ll just call pm_peer_delete (this peer ID) and as argument use this peer ID?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91421?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 10:10:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fac8cf3f-1df4-4c61-93e5-d4f004f2bc56</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You can bond to multiple devices, see &lt;a href="https://devzone.nordicsemi.com/question/128374/what-is-the-maximum-number-of-bonds-possible-when-using-peer-manager/"&gt;this&lt;/a&gt; question for how many devices you can bond to.&lt;/p&gt;
&lt;p&gt;pm_peer_ranks_get() will return the peer ID of the peer with the lowest rank. Then you can use pm_peer_delete() to delete the peer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91439?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 09:17:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcbaf533-5b9f-4010-a89a-a96ea73fdbd9</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Thanks.
If I want connect to smartfone, can I leave bond as is? If I will connect to another smartfone? Is there 2 bond device in a memory? How much can I bond devices so? Or I should use this rank function to delete old bond? Eample, pls, how should delete old bond with low rank? I mean I use function pm_peer_rank_highest() and how to delete low ranks bond?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91436?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 09:05:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5695daa-86f9-4fc4-b614-3948f7dae2f3</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You can use it if you want to rank different bonded peers, so that if you have to delete one of them, you can delete the one with the lowest rank.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91438?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 08:59:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:784c1031-87bc-458a-891e-207763e58977</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;For wich cases should use pm_peer_rank_highest()? If I want to do what? With this function? Clear?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91437?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 08:57:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99dc75db-8a5e-48ac-8a18-033918c6749d</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What is needed? What do you mean?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91435?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 08:50:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4952f8d7-460f-4ce5-9cb6-05f225df21b9</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Hi! Could You explain pls, in more datail for what needed pm_peer_rank_highest()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91440?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 08:44:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fff4df0b-f3c8-445e-a6c3-6c2b57300995</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Ok. Maybe you are getting an error somewhere? Please see &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;this&lt;/a&gt; for more info.&lt;/p&gt;
&lt;p&gt;Shouldn&amp;#39;t be any problem removing pm_peer_rank_highest(), as long as you don&amp;#39;t have any dependencies other places in your code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91425?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2017 18:03:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:336ca554-f0bb-4fb8-ab6e-c3fba7036023</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;comment below&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91426?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2017 15:30:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef39453b-a9af-4576-a8aa-43e447c22aaf</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I mean, that when I set SEC_PARAM_BOND to 0, project crush. Looks like after press in Keil start button, project stopped and button for run avialible agan to run...&lt;/p&gt;
&lt;p&gt;About rank. Posiible to delete it without any problems for project?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91427?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2017 15:13:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bdc3f3c-3cf1-4ac8-be0d-e505e04e0632</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Project fall? What do you mean? Please provide more details.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know why he called it. It is typically used to rank different bonded peers, so that if you have to delete one of them, you typically delete the one with the lowest rank.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91424?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2017 13:48:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbb5c71b-2862-445b-8656-85c4483fba55</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;When I set SEC_PARAM_BOND  to 0, project fall.&lt;/p&gt;
&lt;p&gt;Regarding pm_peer_rank_highest(). I have got this project from colleague. And I really want to know for why he call this function. And if I comment it? Whithout call this function it will be work like with?&lt;/p&gt;
&lt;p&gt;Tell me a best way. I need connect my code to another smartfone. Possible connect again with same smartfone. Possible change smartfone to another. And connect to him. If I leave bond settings, bond info will be storage in PM? Is it normal? Or does it have some limit of bonded information?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91423?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2017 13:39:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b83ce889-29e1-4a12-a327-80cd97d987b8</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;Why would you call pm_peer_rank_highest()? Could you explain a bit more?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91422?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2017 12:11:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae629011-18d9-4ef2-ade7-6e222e7a7b64</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Hi! Thanks.
Correct I understand, if I want only connect to smartfone without bond, I should set SEC_PARAM_BOND to 0?
And in this case I will use mode pairing without bonding?&lt;/p&gt;
&lt;p&gt;What should use in the case PM_EVT_BONDED_PEER_CONNECTED and in a case PM_EVT_CONN_SEC_SUCCEEDED
in a pm_evt_handler?
For what use next code:&lt;/p&gt;
&lt;p&gt;err_code = pm_peer_rank_highest(p_evt-&amp;gt;peer_id);&lt;/p&gt;
&lt;p&gt;?&lt;/p&gt;
&lt;p&gt;Should I use this code for bond or for without bond?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13, S132, peripherial mode. How bonding does work? In HRS example</title><link>https://devzone.nordicsemi.com/thread/91420?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2017 11:53:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91eab7a6-9813-4b1e-8b28-afc93cf07293</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You can use whitelist on either the peripheral or the central.&lt;/p&gt;
&lt;p&gt;Using it on the peripheral will filter out scan requests and/or connections requests from devices that are not in the whitelist.&lt;/p&gt;
&lt;p&gt;Using it on the central will filter out advertisments from devices that are not in the whitelist.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t want to pair call pm_sec_params_set() with NULL, if you don&amp;#39;t want to bond call pm_sec_params_set() with bond set to 0, i.e. set SEC_PARAM_BOND 0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>