<?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>Exceeding BLE_GAP_WHITELIST_ADDR_MAX_COUNT addresses in the whitelist</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82275/exceeding-ble_gap_whitelist_addr_max_count-addresses-in-the-whitelist</link><description>Hello! I have the whitelist support for my device with the default settings: 
 My goal is to rewrite saved addresses in the whitelist, when there is a new 9th address bonded with my device, starting with the 1-st address in the table. Is there some API</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Dec 2021 07:51:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82275/exceeding-ble_gap_whitelist_addr_max_count-addresses-in-the-whitelist" /><item><title>RE: Exceeding BLE_GAP_WHITELIST_ADDR_MAX_COUNT addresses in the whitelist</title><link>https://devzone.nordicsemi.com/thread/341629?ContentTypeID=1</link><pubDate>Thu, 02 Dec 2021 07:51:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:084997b3-6c54-4b01-a35f-981451581118</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The key point is that it is your responsibility to ensure that you provide maximum 8 addresses when you reply with&amp;nbsp;ble_advertising_whitelist_reply(), but you can change the list in any way you like.&lt;/p&gt;
&lt;p&gt;As you use&amp;nbsp;ble_app_hids_keyboard as reference I assume you use the peer manager for bonding, and that will generate the whitelist for you, but with a maximum of 8&amp;nbsp; addresses and 8 IRKs. The internal whitelist handling in the peer manager is also restricted to 8 though, as it uses&amp;nbsp;BLE_GAP_WHITELIST_ADDR_MAX_COUNT.&lt;/p&gt;
&lt;p&gt;I did not test this, but it should be enough to do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;increase this number in id_manager.c (use a higher number than&amp;nbsp;BLE_GAP_WHITELIST_ADDR_MAX_COUNT which can hold all your whitelist addresses).&lt;/li&gt;
&lt;li&gt;Then when you call&amp;nbsp;pm_whitelist_get() you can get a whitelist of all addresses, not just up to 8. Keep this as a separate list, and keep for instnace an index so that you know which list you currently advertise.&lt;/li&gt;
&lt;li&gt;Copy the addresses you want to advertise to a new list which is only 8 long, and reply to&amp;nbsp;ble_advertising_whitelist_reply() using that. You will need to restart advertising with whitelist whenever you update the list, as then you get the&amp;nbsp;BLE_ADV_EVT_WHITELIST_REQUEST event.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This should be enough. There is no circular buffer here, as the SoftDevice API and peer manager API don&amp;#39;t use it. Instead, simply use two buffers, one full buffer and one with 8 and copy over what you need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Exceeding BLE_GAP_WHITELIST_ADDR_MAX_COUNT addresses in the whitelist</title><link>https://devzone.nordicsemi.com/thread/341594?ContentTypeID=1</link><pubDate>Wed, 01 Dec 2021 20:34:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87982298-4249-424c-aa64-e7e38709e31c</guid><dc:creator>mappy89</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/eith"&gt;Einar&lt;/a&gt;, thank you for reply!&lt;br /&gt;&lt;br /&gt;May be I need to expand my question&lt;br /&gt;&lt;br /&gt;I use whitelist for BLE as it shown in &lt;em&gt;ble_app_hids_keyboard&lt;/em&gt; example. Let&amp;#39;s assume my application already bonded 8 different device addresses into a memory.&lt;br /&gt;And there are new devices which I want to bond and save into whitelist address table. What steps should I do to circular replace old addresses with new ones?&lt;br /&gt;&lt;br /&gt;Can I reset some internal counter, which is responsible for writing a new device address into the whitelist table?&lt;br /&gt;&lt;br /&gt;Best regards.&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div id="lilata-popup"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="lilata-popup"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="lilata-popup"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="lilata-popup"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="lilata-popup"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Exceeding BLE_GAP_WHITELIST_ADDR_MAX_COUNT addresses in the whitelist</title><link>https://devzone.nordicsemi.com/thread/341528?ContentTypeID=1</link><pubDate>Wed, 01 Dec 2021 13:33:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a06a3bf3-8b7a-44f1-8617-40b141191704</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no API for that. However, it is the application that provides the list of whitelisted addresses and IRKs to the SoftDevice so you are free to arrange it as you want. If you allready have the list simply rearrange it (perhaps it makes sense to keep two lists, one with all addresses and another with the addresses currently being whitelisted).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>