<?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>ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10370/ble-pairing-at-the-first-of-every-connection-try</link><description>hello guys, 
 I&amp;#39;m working in a project &amp;amp; I added some sort of security to the project, I enabled the bonding &amp;amp; MTIM flags through: 
 #define SEC_PARAM_TIMEOUT 50 /**&amp;lt; Timeout for Pairing Request or Security Request (in seconds). */
#define SEC_PARAM_BOND</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Nov 2015 10:39:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10370/ble-pairing-at-the-first-of-every-connection-try" /><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38491?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 10:39:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e478c44d-9a22-4e11-9410-4719d0a2685e</guid><dc:creator>Mohamed O.Abouzeid</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/58178/ble-pairing-after-poweroff-mode/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;
@Aryan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38490?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 10:33:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90bca0b6-839e-49b0-ad57-519816a85b52</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Mohammed, it is a new question, would be nice to start a new thread. Search the forum for GPREGRET register which can retain its value in system off. You can temporarily use this register to save your pairing info before going to system off.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38489?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 09:59:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d90979ab-8f95-4733-914d-3edd33c9cdf0</guid><dc:creator>Mohamed O.Abouzeid</dc:creator><description>&lt;p&gt;Hello @Aryan, I already let the dm_manager to handle the connection events, it works, I mean on the on_ble_event I only included the dm_manger handler to handle the events,&lt;/p&gt;
&lt;p&gt;I have a question, how to save pairing information after the wake-up from sd_power_off();&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38488?ContentTypeID=1</link><pubDate>Sun, 22 Nov 2015 18:18:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a78ebfd-b281-4c25-8ca3-5d4eb9266f8f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi momhamed, please let us know how you solved it so that this useful information can be found to others.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38486?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 14:22:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:580d5907-c307-48e8-836e-93028df7569d</guid><dc:creator>Mohamed O.Abouzeid</dc:creator><description>&lt;p&gt;I solved it @Aryan ,thank you for your great help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38487?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 13:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a091f03d-58d5-450d-a1ee-0054565cd43e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;it is not required&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38484?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 12:31:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f258379-39bb-4f0e-a080-79df0850c327</guid><dc:creator>Mohamed O.Abouzeid</dc:creator><description>&lt;p&gt;@Aryan
okay I&amp;#39;ll do that one thing only, should I update the connection parameters in the peripheral side after the first bond ? ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38483?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 12:29:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49aed380-bd61-43fc-8e0d-d12c4aaa7d99</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi mohamed, can you send me your full project , i will take a look at it monday morning. Today i am busy with other things. Try to upload your project on some file sharing website and send a link to that in private message to me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38482?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 12:22:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e7a6d1c-8a63-4cba-9077-4008fd4dc320</guid><dc:creator>Mohamed O.Abouzeid</dc:creator><description>&lt;p&gt;I changed the app context size to be 32 but no gain also !!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38481?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 12:15:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17135b9d-6211-4a20-be80-bce4e4cffeda</guid><dc:creator>Mohamed O.Abouzeid</dc:creator><description>&lt;p&gt;okay, I&amp;#39;m using the default device manager  event handler, &amp;amp; I checkted &lt;code&gt;DEVICE_MANAGER_APP_CONTEXT_SIZE&lt;/code&gt;
in the device_manager_cnfg.h I found that it equals to zero, may be this is the reason&lt;/p&gt;
&lt;p&gt;also device_context_store  is used to store bond info&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38485?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 12:03:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a98946cc-ba25-4995-b83e-7f58f5124c19</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;After bonding both sides will store the LTK and if you are using the device manager it will do it for you.
When it tries to connect the second time, it should not delete the bond information by default. If you are testing this with phone, then the phone will remember bond information unless you explicitly asks it to forget the device. On your peripheral device, i am suspecting that you have not saved the bond information. Why are you not using device manager to do all this? if you want to manually handle it then go to the device_manager_peripheral.c and see dm_ble_evt_handler-&amp;gt;BLE_GAP_EVT_AUTH_STATUS&lt;/p&gt;
&lt;p&gt;see that &lt;code&gt;device_context_store&lt;/code&gt; is used to save the bond info.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38480?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 11:48:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ba44b6b-d5c2-4694-8116-1c7f272d9c0b</guid><dc:creator>Mohamed O.Abouzeid</dc:creator><description>&lt;p&gt;hi aryan, the status of bonding is bonded after the first time I try to connect, then the second time I try to connect, it erase the bonding and try to bonding from scratch aryan .. ? ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble pairing at the first of every connection try !!</title><link>https://devzone.nordicsemi.com/thread/38492?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 10:59:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cadb1f0-e034-4920-abaa-d3f58ee93a62</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;pairing will be done everytime for new connection if the bond was not successful . I haven&amp;#39;t looked into your code but can you confirm if bonding was done successfully ?&lt;/p&gt;
&lt;p&gt;Also you need to check for other events  like
BLE_GAP_EVT_CONN_PARAM_UPDATE
BLE_GAP_EVT_AUTH_STATUS
for bonding.
Please check the message sequence charts for bonding &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s130.api.v1.0.0%2Fgroup___b_l_e___g_a_p___m_s_c.html"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>