<?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>Distinguish new connection from previous</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11263/distinguish-new-connection-from-previous</link><description>Hello, 
 I am developing a wearable device that utilises nRF51822. Right now, I am having a problem because when the wearable device is connected to a new phone, it needs to be able to know that and reset memory. 
 How should I go about distinguishing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Jan 2016 11:21:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11263/distinguish-new-connection-from-previous" /><item><title>RE: Distinguish new connection from previous</title><link>https://devzone.nordicsemi.com/thread/42349?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2016 11:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4270797-9862-4b48-a1e5-1c35be13be8d</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Two other solutions come to mind:&lt;/p&gt;
&lt;p&gt;The first solution is only valid if memory isn&amp;#39;t accessed before you bond. If you are bonded to the central, you will receive the BLE_GAP_EVT_SEC_INFO_REQUEST event when the central wants to encrypt the link, see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v2.0.0/group___b_l_e___g_a_p___p_e_r_i_p_h___e_n_c___m_s_c.html?cp=1_3_0_1_0_2_0_1_0_10"&gt;this&lt;/a&gt;. If you are not bonded you will receive the BLE_GAP_EVT_SEC_PARAMS_REQUEST event when the central wants to bond, see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v2.0.0/group___b_l_e___g_a_p___p_e_r_i_p_h___b_o_n_d_i_n_g___j_w___m_s_c.html?cp=1_3_0_1_0_2_0_1_0_6"&gt;this&lt;/a&gt;. You can use this event to trigger a memory reset.&lt;/p&gt;
&lt;p&gt;The second solution is to try to resolve the device address with the IRK(s) of the currently bonded central(s). Have a look at Ulrich&amp;#39;s answer &lt;a href="https://devzone.nordicsemi.com/question/38730/resolve-ble_gap_addr_type_random_private_resolvable-address-without-using-whitelist-advertising/"&gt;here&lt;/a&gt;. If you are able to resolve, don&amp;#39;t reset memory, if you are not, reset memory.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>