<?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>peer manager delete peer by custom id</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28709/peer-manager-delete-peer-by-custom-id</link><description>hi
I am using peer manager to pair and bond android phone to nrf52840. I want to give custom peer id to this phone during bonding process, then if i lost this phone i will be able to delete bonding information just for this phone by sending a command</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Dec 2017 13:04:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28709/peer-manager-delete-peer-by-custom-id" /><item><title>RE: peer manager delete peer by custom id</title><link>https://devzone.nordicsemi.com/thread/113790?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 13:04:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41307bd3-521a-4aef-aa26-7b560f159a0b</guid><dc:creator>nahro</dc:creator><description>&lt;p&gt;Thank you Petter, i tested im_peer_id_get_by_conn_handle()and it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer manager delete peer by custom id</title><link>https://devzone.nordicsemi.com/thread/113789?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 13:02:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68dcaf0c-e2b2-4228-ace4-6cf7ea9dedd0</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You should be able to get it in the Peer Manager event handler. Typically pm_evt_handler() in main.c.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;p_evt-&amp;gt;peer_id
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer manager delete peer by custom id</title><link>https://devzone.nordicsemi.com/thread/113788?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 12:26:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1adb18cb-8af7-4da7-bb9d-51d7e0b9c4df</guid><dc:creator>nahro</dc:creator><description>&lt;p&gt;But in which stage of bond process i can get the peer ID? I mean where PM assign peer ID in the SDK? can i get it by conn_handle by using  im_peer_id_get_by_conn_handle()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer manager delete peer by custom id</title><link>https://devzone.nordicsemi.com/thread/113787?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 12:10:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c258578f-f3c3-40a0-aaf1-e857ac6bbfa3</guid><dc:creator>nahro</dc:creator><description>&lt;p&gt;well i think every thing is clear now thanks for your answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer manager delete peer by custom id</title><link>https://devzone.nordicsemi.com/thread/113786?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 11:46:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ae4e086-974b-4844-922f-87867413345a</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Is this answered? Or is there anything that is still unclear?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer manager delete peer by custom id</title><link>https://devzone.nordicsemi.com/thread/113785?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 11:28:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1af7b00-addb-467d-918d-dfea74364a23</guid><dc:creator>nahro</dc:creator><description>&lt;p&gt;I will store all phones with thier peer id some where, then it will be easy to know which one i am going to delete. mapping is a very good option, or i can save the peer ID with the phone UUID in the flash and then i can get peer ID by phone UUID. THis way i will avoid using hardcoded peer ID.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer manager delete peer by custom id</title><link>https://devzone.nordicsemi.com/thread/113784?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 11:14:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8b1b323-6d20-4d25-8747-54801b21293e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;So which phone will get which ID? How would you know that it is the phone with peer ID 3 that is lost?&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think it is possible to give hardcoded peer ID during the bond process without modifying the library. I think however it would be simpler to map the Peer ID used in Peer Manager to the hardcoded Peer IDs, if you get what i mean.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer manager delete peer by custom id</title><link>https://devzone.nordicsemi.com/thread/113783?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 10:27:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5be13d6-6c4d-4015-862b-8e0e13f6fc8d</guid><dc:creator>nahro</dc:creator><description>&lt;p&gt;Yes, I was thinking about hardcoding a list of peer ID in the peripheral application for example 1 to 5, then i will bond 5 phones to the peripheral. If i lost for example phone that have peer ID 3 in the peripheral , then i will delete bond data from another phone(which is bonded to the peripheral and can write command to the peripheral characteristic ) by teling the peripheral  delete bon data for peer id 3.
I do not know how to give this hardcoded peer id during the bond process in the peripheral (nrf52840) application!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer manager delete peer by custom id</title><link>https://devzone.nordicsemi.com/thread/113782?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 10:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bffe6148-0d8c-4111-a427-31a6d0fb0803</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I don&amp;#39;t quite understand. Where would this peer ID come from? The phone? Will it be hardcoded in the peripheral application? Could you elaborate a bit?&lt;/p&gt;
&lt;p&gt;You can delete a single bond with pm_peer_delete().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>