<?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>Directed advertising with Peer Manager, single central</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13873/directed-advertising-with-peer-manager-single-central</link><description>I have a peripheral device based on the nRF51822, s130 and SDK 11.0.0. It&amp;#39;s designed to only ever have one central device to which it&amp;#39;s bonded. Out of the box, without a bond yet, it does undirected advertising until it gets its first connection and bonds</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 May 2016 10:23:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13873/directed-advertising-with-peer-manager-single-central" /><item><title>RE: Directed advertising with Peer Manager, single central</title><link>https://devzone.nordicsemi.com/thread/52994?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 10:23:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8e64e4c-9226-437b-a6af-79647d93171c</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;That&amp;#39;s in the same example experimental_ble_app_hids_keyboard_pairing_nfc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Directed advertising with Peer Manager, single central</title><link>https://devzone.nordicsemi.com/thread/52993?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 10:18:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fece8e3f-489b-40a9-a9a4-6d275ca59ec5</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Thanks. How do I get from a pm_peer_id_t to a ble_gap_addr_t, which is what ble_advertising_peer_addr_reply() requires?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Directed advertising with Peer Manager, single central</title><link>https://devzone.nordicsemi.com/thread/52992?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 10:06:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8faf72e5-43f9-4886-a62a-7272931ac8a9</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Stealing from the HID keyboard example just iterate the ids out of the peer manager&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pm_peer_id_t peer_id = pm_next_peer_id_get(PM_PEER_ID_INVALID);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;gets you the first peer id. Since you only have one, that&amp;#39;s the one you want. If that returns PM_PEER_ID_INVALID then you don&amp;#39;t have one and that tells you you have no bond yet and should advertise undirected until you get that one bond set up.&lt;/p&gt;
&lt;p&gt;That method of iterating the known peers is in the documentation, has an example there too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>