<?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>whitelist_load</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18122/whitelist_load</link><description>Hi, 
 I am creating an application based on ble_app_hrs_c (central role). I have a few questions on this. 
 o I do not understand whitelist_load(). It first gets a list of peers (from flash I assume) and then it seems to save them again (in flash I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Dec 2016 21:47:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18122/whitelist_load" /><item><title>RE: whitelist_load</title><link>https://devzone.nordicsemi.com/thread/69914?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2016 21:47:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a01e233c-b9ef-41c1-858c-cb734b8dc334</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;o I do not understand
whitelist_load(). It first gets a list
of peers (from flash I assume) and
then it seems to save them again (in
flash I guess).&lt;/p&gt;
&lt;p&gt;o What is the relation between
pm_peer_id_t numbers and a call like
pm_whitelist_get&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;peer_list_get() gets a list all peer IDs in the Peer Manager, from flash.&lt;/p&gt;
&lt;p&gt;pm_whitelist_set() sets what peer IDs that should be in the whitelist.&lt;/p&gt;
&lt;p&gt;pm_device_identities_list_set() is in relation with sd_ble_gap_device_identities_set()&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If I define a whitelist in the
scan_start() routine, only peripherals
in the list will be found, right?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You will only get advertisments from peripherals in the list yes.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;o I want to save attribute handles
(see ble_hrs_c.c) because when there
is a peer list present at boot, the
discovery phase will be skipped. Can
you indicate how to do that? I think
that the pm_peer_data_store() routine
can be used for it, but when in
ble_hrs_c.c, I do not have any idea
what the peer_id is.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is an older discussion on it &lt;a href="https://devzone.nordicsemi.com/question/54201/how-to-discover-services-only-ones/"&gt;here&lt;/a&gt;, but there the handles are not saved persistently, then I believe you need to change how the ble_hrs_c is implemented. If you want them to be stored persistently I think you should add a separate question for that, so this doesn&amp;#39;t get too cluddered.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>