<?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>Max connections and bonds (NCS)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109827/max-connections-and-bonds-ncs</link><description>I&amp;#39;m using NCS 2.6.0 for developing a subsystem consisting of a nRF52840-based Central and a number of nRF52840-based Peripheral devices. 
 First off, I get there are Kconfig controls for the maximum number of connections (CONFIG_BT_MAX_CONN) and bonds</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 Apr 2024 10:31:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109827/max-connections-and-bonds-ncs" /><item><title>RE: Max connections and bonds (NCS)</title><link>https://devzone.nordicsemi.com/thread/481042?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 10:31:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fd4f7ef-46f3-477c-a01a-7df5ac105c8f</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello again David, sorry about the wait again, as well as my previous response. I see that this didn&amp;#39;t answer all of your questions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding getting&amp;nbsp;the number off all current bonds, there doesn&amp;#39;t seem to be any functions available for this. I agree that counting through&amp;nbsp;&lt;span&gt;bt_foreach_bond() seems clumsy, but it might be the best. Atleast I guess you only need to do this during boot,&amp;nbsp;and update it after bonding a new device. You could also have this number written to flash persistently if you prefer to do it that way. Of course if the number of bonds is too high counting it up will affect runtime somewhat.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="David Ormand"]What does CONFIG_BT_KEYS_OVERWRITE_OLDEST do in the context of &amp;quot;no more room for new bonds&amp;quot;?[/quote]
&lt;p&gt;It&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_KEYS_OVERWRITE_OLDEST"&gt;overwrites the oldest key if key storage is full&lt;/a&gt;, which might be practical for your usecase. You can also define what full means for you with&amp;nbsp;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_MAX_PAIRED"&gt;CONFIG_BT_MAX_PAIRED&lt;/a&gt;, which you&amp;#39;ve allready mentioned.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="David Ormand"]&lt;p&gt;The other post referenced, &amp;quot;NFC BLE Pair with max connections full&amp;quot;, is for nRF SDK - Peer Manager - and doesn&amp;#39;t help with NCS.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I&amp;#39;ll looking into this, and will get back to you on how this error shows up.&amp;nbsp;I think it will be an&amp;nbsp;ENOMEM error somewhere.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Elfving&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Max connections and bonds (NCS)</title><link>https://devzone.nordicsemi.com/thread/478019?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 11:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8291ad2f-f326-42fa-b666-7852e7e4f0e6</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi David, Håkon E is travelling this week. He will attend to this issue when he is back in office next week.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Max connections and bonds (NCS)</title><link>https://devzone.nordicsemi.com/thread/477377?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2024 18:33:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c012eb9-e1ae-4673-b2ab-e3cf4c94a299</guid><dc:creator>David Ormand</dc:creator><description>&lt;p&gt;Same as SoftDevice.&amp;nbsp; Got it, thanks.&lt;/p&gt;
&lt;p&gt;From the linked &amp;quot;Pair with max connections full (NCS)&amp;quot;:&lt;br /&gt;&amp;quot;You should get some SMP application error if there isn&amp;#39;t any more room for new bonds&amp;quot;&lt;br /&gt;Not very helpful. I need to know what to anticipate if this happens.&lt;br /&gt;The BMS sample referenced doesn&amp;#39;t really help; it merely prints the error code if a failure occurs - any failure.&lt;br /&gt;The other post referenced, &amp;quot;NFC BLE Pair with max connections full&amp;quot;, is for nRF SDK - Peer Manager - and doesn&amp;#39;t help with NCS.&lt;/p&gt;
&lt;p&gt;What does CONFIG_BT_KEYS_OVERWRITE_OLDEST do in the context of &amp;quot;no more room for new bonds&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Max connections and bonds (NCS)</title><link>https://devzone.nordicsemi.com/thread/477092?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 11:57:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19cfb871-446e-44e6-8330-8155e6cbbd60</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello David and sorry about the wait,&lt;/p&gt;
&lt;p&gt;The maximum number of connections in the SoftDevice (SD) that is being used in nRF5 SDK is 20.&amp;nbsp;The&amp;nbsp;Softdevice Controller(SDC) that&amp;nbsp;we recommend using in nRF Connect SDK is based on the same thing, so it is also 20. The maximum amount of paired devices however is different, and only constrained by available memory.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When it comes to&amp;nbsp;what happens when you reach the max, &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/103277/pair-with-max-connections-full-ncs"&gt;see here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>