<?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>nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55082/nrf52832-bonding-to-apple-iphone</link><description>Hi Friend, 
 I use nrf252832 MCU and SDK 15.3, 
 I would like to Implement below function, 
 1:Device bond phone A without password first , the phone A popups a bonding dialog box; 
 2: Disconnect phone A and bond phone B, the phone B popups a bonding</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Oct 2020 02:19:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55082/nrf52832-bonding-to-apple-iphone" /><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/277699?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 02:19:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06d28bb5-4ed8-48b0-9352-e9a55fb02168</guid><dc:creator>shiyu</dc:creator><description>&lt;p&gt;&lt;span&gt;I also encountered the same problem. I kept getting error code 4102 when I connected a heart rate bracelet. How did you solve it? Thank you very much!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223999?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 15:33:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76d7dc67-9455-4954-b115-cf7bdd458551</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have edited one of the earlier replies regarding allow_repairing, it will only work where the phone have lost/erased the bonding information while the nRF device still have it. &lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure how the device you mentioned was able to bond back without &amp;quot;Forget your device&amp;quot;. Are you sure that when testing with that device, that the bonding information was erased from nRF device while kept on phone? And not the other way around?&lt;/p&gt;
&lt;p&gt;I suggest you allow more bonds instead of erasing the bonding information of the previous phone when bonding with a new phone. This should solve the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223821?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 10:01:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd7b56ed-73d5-462c-bd14-1194c61aeb44</guid><dc:creator>Rickon</dc:creator><description>&lt;p&gt;I capture the data using Ellisys Bluetooth Analyzer and attached the data.&lt;/p&gt;
&lt;p&gt;Type filter &amp;quot;*deskbike*&amp;quot;.&lt;/p&gt;
&lt;p&gt;When the device bond back to iPhone A, the device send &amp;quot;LLCP Rejected(PIN or Key Missing)&amp;quot;.&lt;/p&gt;
&lt;p&gt;How can I send this to iPhone A?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which api can I call and where I call it?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you!!!!!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/4431.pic.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/deskbike.rar"&gt;devzone.nordicsemi.com/.../deskbike.rar&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223495?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2019 08:39:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c45eda40-7c7e-4aa3-ae0c-83d357293cca</guid><dc:creator>Rickon</dc:creator><description>&lt;p&gt;&lt;strong&gt;&lt;span style="background-color:#ffffff;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;&amp;quot;i&lt;/span&gt;&lt;span style="color:#11171a;font-style:normal;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;f your attributes require encryption&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#11171a;font-style:normal;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;How could I set the attributes?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223492?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2019 08:29:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fccf5826-fca2-4844-81a4-a152f4c1ebeb</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Like I said, i&lt;span&gt;f your attributes require encryption, the peer device will initiate bonding when trying to access those attributes.&amp;nbsp; So the dialog box should pop up whenever you use a bluetooth app to connect to the device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I suggest you have a look at the &lt;a href="https://devzone.nordicsemi.com/support-private/support/240363/container%20topicHID%20Keyboard%20Application" rel="noopener noreferrer" target="_blank"&gt;keyboard example&lt;/a&gt; on how the Peer manager is implemented.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223366?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 14:06:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1510c650-f956-48bf-87cc-6b0303875e13</guid><dc:creator>Rickon</dc:creator><description>&lt;p&gt;I need phone popup a dialog box ,no matter what app I use, example:lightblue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223345?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 13:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7baa37e8-d174-49be-b28f-d96422baed7b</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;You don&amp;#39;t have to call pm_conn_secure() to initiate bonding.&amp;nbsp;&lt;span&gt;If your attributes (service and characteristic) require encryption, the peer device need to trigger a bonding or it won&amp;#39;t be able to access those attribute.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223337?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 13:16:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:880aacc7-cfd9-42ee-99a2-7f3c888356d3</guid><dc:creator>Rickon</dc:creator><description>&lt;p&gt;If I do not call pm_conn_secure(),how can I make phone popup a dialog box?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223328?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 12:50:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a112ab5-8aeb-4138-99cb-a773a71a3691</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;My mistake,&lt;span&gt;&amp;nbsp;it is not suggested to call&amp;nbsp;&lt;/span&gt;&lt;span&gt;pm_conn_secure() when you are a peripheral (Apple BLE guideline doesn&amp;#39;t suggest this, same on Android). If you are a peripheral, usually you let the central device to trigger pairing and re-pairing. Can your try removing&amp;nbsp;pm_conn_secure() from the connected event?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223299?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 11:44:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c06939f3-e1fe-467e-837c-d6509ec42e5b</guid><dc:creator>Rickon</dc:creator><description>&lt;p&gt;But I have a device that can bond back to phone A without &amp;quot;Forget your device&amp;quot;, I need to do the same as it. The device use nrf51422 and very old SDK.&lt;/p&gt;
&lt;p&gt;The project is very urgent, please help to find other method. Thanks!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223294?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 11:27:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5c661fa-a613-4ba6-9eb6-7d34af8b8e14</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The error message indicate (4102 = 0x1006 = PM_CONN_SEC_ERROR_PIN_OR_KEY_MISSING). This issue should be fixed by simply removing the bond on the phone as well. I guess you have to manually delete the bonding information on your phone by going into Settings -&amp;gt; Bluetooh -&amp;gt; your device -&amp;gt; &amp;quot;Forget your device&amp;quot;.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223286?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 10:59:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04efd762-3058-41cf-905d-d3dbafd16a3e</guid><dc:creator>Rickon</dc:creator><description>&lt;p&gt;I have set it to true, but it return error :4102, please see below info&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  case PM_EVT_CONN_SEC_CONFIG_REQ:

        {

            // Reject pairing request from an already bonded peer.

            pm_conn_sec_config_t conn_sec_config = {.allow_repairing = true};

            pm_conn_sec_config_reply(p_evt-&amp;gt;conn_handle, &amp;amp;conn_sec_config);

        } break;
        
        
        0&amp;gt; &amp;lt;info&amp;gt; app: MAC ADDRESS = B2:FD:19:A0:04:79
 0&amp;gt; &amp;lt;info&amp;gt; app: pm_evt_handler = 5
 0&amp;gt; &amp;lt;info&amp;gt; app: pm_evt_handler = 1
 0&amp;gt; &amp;lt;info&amp;gt; peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102
 0&amp;gt; &amp;lt;warning&amp;gt; peer_manager_handler: Disconnecting conn_handle 0.
 0&amp;gt; &amp;lt;info&amp;gt; app: pm_evt_handler = 3&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223271?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 10:22:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6a75c79-d149-453d-be48-01a51c986ea1</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Rickon"]After connection, the device calls the function&amp;nbsp;&lt;span style="background-color:#ffffff;"&gt;pm_conn_secure(m_conn_handle,false)&lt;/span&gt;to trigger the bonding, is that correct?[/quote]
&lt;p&gt;&lt;span&gt;Yes, that is correct.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The Peer manager does not allow re-pairing by default. It will reject a pairing request from an already bonded peer.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can allow re-pairing by setting &lt;em&gt;allow_repairing&lt;/em&gt; to &lt;em&gt;true,&amp;nbsp;&lt;/em&gt;you can find it under&amp;nbsp;PM_EVT_CONN_SEC_CONFIG_REQ event.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;allow_repairing&lt;/em&gt; set to &lt;em&gt;true&amp;nbsp;&lt;/em&gt;will not work in this case. It will allow rebonding in the case where phone have erased bonding information while the nRF device still have it.&lt;/p&gt;
&lt;p&gt;Sorry for the confusion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223252?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 09:42:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e968f74-9202-476c-82cd-3e529e08e98d</guid><dc:creator>Rickon</dc:creator><description>&lt;p&gt;&lt;span style="background-color:#ffffff;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;After connection, the device calls the function&amp;nbsp;&lt;span style="background-color:#ffffff;"&gt;pm_conn_secure(m_conn_handle,false)&lt;/span&gt;to trigger the bonding, is that correct?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223240?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 09:23:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c024987d-9097-4551-a39e-38c7b1ec76e8</guid><dc:creator>Rickon</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
#define SEC_PARAM_TIMEOUT               30                                           /**&amp;lt; Timeout for Pairing Request or Security Request (in seconds). */
#define SEC_PARAM_BOND                  1                                            /**&amp;lt; Perform bonding. */
#define SEC_PARAM_MITM                  0                                            /**&amp;lt; Man In The Middle protection not required. */
#define SEC_PARAM_LESC                  0                                          /**&amp;lt; LE Secure Connections enabled. */
#define SEC_PARAM_KEYPRESS              0                                           /**&amp;lt; Keypress notifications not enabled. */
#define SEC_PARAM_IO_CAPABILITIES       BLE_GAP_IO_CAPS_NONE                         /**&amp;lt; No I/O capabilities. */
#define SEC_PARAM_OOB                   0                                            /**&amp;lt; Out Of Band data not available. */
#define SEC_PARAM_MIN_KEY_SIZE          7                                            /**&amp;lt; Minimum encryption key size. */
#define SEC_PARAM_MAX_KEY_SIZE          16                                           /**&amp;lt; Maximum encryption key size. */


/**@brief Function for the Peer Manager initialization.
 *
 * @param[in] erase_bonds  Indicates whether bonding information should be cleared from
 *                         persistent storage during initialization of the Peer Manager.
 */
static void peer_manager_init(bool erase_bonds)
{
    
    ret_code_t           err_code;

    err_code = pm_init();
    APP_ERROR_CHECK(err_code);
    
    if (erase_bonds)
    {
        err_code = pm_peers_delete();
        APP_ERROR_CHECK(err_code);
    }

    memset(&amp;amp;m_sec_params, 0, sizeof(ble_gap_sec_params_t));

    // Security parameters to be used for all security procedures.
    m_sec_params.bond           = SEC_PARAM_BOND;
                m_sec_params.mitm           = SEC_PARAM_MITM;
    m_sec_params.lesc           = SEC_PARAM_LESC;
    m_sec_params.keypress       = SEC_PARAM_KEYPRESS;
    m_sec_params.io_caps        = SEC_PARAM_IO_CAPABILITIES;
    m_sec_params.oob            = SEC_PARAM_OOB;
    m_sec_params.min_key_size   = SEC_PARAM_MIN_KEY_SIZE;
    m_sec_params.max_key_size   = SEC_PARAM_MAX_KEY_SIZE;
    m_sec_params.kdist_own.enc  = 1;
    m_sec_params.kdist_own.id   = 1;
    m_sec_params.kdist_peer.enc = 1;
    m_sec_params.kdist_peer.id  = 1;
                

    err_code = pm_sec_params_set(&amp;amp;m_sec_params);
    APP_ERROR_CHECK(err_code);

    err_code = pm_register(pm_evt_handler);
    APP_ERROR_CHECK(err_code);
}
//------------------------------------------------------------------
//------------------------------------------------------------------
static void pm_evt_handler(pm_evt_t const * p_evt)
{
   ret_code_t err_code;

    pm_handler_on_pm_evt(p_evt);
    pm_handler_disconnect_on_sec_failure(p_evt);
    pm_handler_flash_clean(p_evt);
    
          NRF_LOG_INFO(&amp;quot;pm_evt_handler = %d&amp;quot;,p_evt-&amp;gt;evt_id);
    switch(p_evt-&amp;gt;evt_id)
    {
        case PM_EVT_BONDED_PEER_CONNECTED:
            // Update the rank of the peer.
            err_code = pm_peer_rank_highest(p_evt-&amp;gt;peer_id);
            break;
        case PM_EVT_CONN_SEC_START:
            break;
        case PM_EVT_CONN_SEC_SUCCEEDED:
            // Update the rank of the peer.
            err_code = pm_peer_rank_highest(p_evt-&amp;gt;peer_id);
                        
            break;
        case PM_EVT_CONN_SEC_FAILED:
            // In some cases, when securing fails, it can be restarted directly. Sometimes it can be
            // restarted, but only after changing some Security Parameters. Sometimes, it cannot be
            // restarted until the link is disconnected and reconnected. Sometimes it is impossible
            // to secure the link, or the peer device does not support it. How to handle this error
            // is highly application-dependent.
                                   
            break;
                                         
        case PM_EVT_CONN_SEC_CONFIG_REQ:
        {
            // A connected peer (central) is trying to pair, but the Peer Manager already has a bond
            // for that peer. Setting allow_repairing to false rejects the pairing request.
            // If this event is ignored (pm_conn_sec_config_reply is not called in the event
            // handler), the Peer Manager assumes allow_repairing to be false.
                                         
                                          
            pm_conn_sec_config_t conn_sec_config = {.allow_repairing = false};
            pm_conn_sec_config_reply(p_evt-&amp;gt;conn_handle, &amp;amp;conn_sec_config);
        }
        break;
        case PM_EVT_CONN_SEC_PARAMS_REQ:
        {
            // If you want to set different security parameters for particular peers, you can do
            // so here. Pass the desired security parameters to pm_conn_sec_params_reply().
                                        
                                          
                                        
            err_code = pm_conn_sec_params_reply(p_evt-&amp;gt;conn_handle,
                                               &amp;amp;m_sec_params,
                                                p_evt-&amp;gt;params.conn_sec_params_req.p_context);
            APP_ERROR_CHECK(err_code);
        } break;
        case PM_EVT_STORAGE_FULL:
            // Run garbage collection on the flash.
            err_code = fds_gc();
            if (err_code == FDS_ERR_BUSY || err_code == FDS_ERR_NO_SPACE_IN_QUEUES)
            {
                // Retry.
            }
            else
            {
                APP_ERROR_CHECK(err_code);
            }
            break;
        case PM_EVT_ERROR_UNEXPECTED:
            // Assert.
            APP_ERROR_CHECK(p_evt-&amp;gt;params.error_unexpected.error);
            break;
        case PM_EVT_PEER_DATA_UPDATE_SUCCEEDED:
            break;
        case PM_EVT_PEER_DATA_UPDATE_FAILED:
            // Assert.
            APP_ERROR_CHECK_BOOL(false);
            break;
        case PM_EVT_PEER_DELETE_SUCCEEDED:
            break;
        case PM_EVT_PEER_DELETE_FAILED:
            // Assert.
            APP_ERROR_CHECK(p_evt-&amp;gt;params.peer_delete_failed.error);
            break;
        case PM_EVT_PEERS_DELETE_SUCCEEDED:
            // At this point it is safe to start advertising or scanning.
            break;
        case PM_EVT_PEERS_DELETE_FAILED:
            // Assert.
            APP_ERROR_CHECK(p_evt-&amp;gt;params.peers_delete_failed_evt.error);
            break;
        case PM_EVT_LOCAL_DB_CACHE_APPLIED:
            break;
        case PM_EVT_LOCAL_DB_CACHE_APPLY_FAILED:
            // The local database has likely changed, send service changed indications.
            pm_local_database_has_changed();
            break;
        case PM_EVT_SERVICE_CHANGED_IND_SENT:
            break;
        case PM_EVT_SERVICE_CHANGED_IND_CONFIRMED:
            break;
                                default:
                                        break;
    }
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
{
    ret_code_t err_code = NRF_SUCCESS;

    switch (p_ble_evt-&amp;gt;header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            
            m_conn_handle = p_ble_evt-&amp;gt;evt.gap_evt.conn_handle;
            err_code = nrf_ble_qwr_conn_handle_assign(&amp;amp;m_qwr, m_conn_handle);
            APP_ERROR_CHECK(err_code);
                                                err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_CONN,m_conn_handle,BLE_TX_CONNECT_POWER);
                                                APP_ERROR_CHECK(err_code);
                                
                                NRF_LOG_INFO(&amp;quot;MAC ADDRESS = %02x:%02x:%02x:%02x:%02x:%02x&amp;quot;,p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr[0],\
                                  p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr[1],\
                                p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr[2],\
                                p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr[3],\
                                p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr[4],\
                                p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr[5]);
                                    
                        
                                                pm_conn_secure(m_conn_handle,false);
            break;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223237?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 09:11:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bbd3e78-91e4-4928-b753-49f9ae062915</guid><dc:creator>Rickon</dc:creator><description>&lt;p&gt;SDK15.3,using peer manager.&lt;/p&gt;
&lt;p&gt;I only want to bond one phone&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223233?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 09:06:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d19df36-e200-4af8-bc22-0002acc159c9</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which SDK are you using? Are you using peer manager?&lt;/p&gt;
&lt;p&gt;How are you storing your bonding data?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223176?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 01:35:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80cc9116-fdb7-490f-9bfa-8a5db4d64e59</guid><dc:creator>Rickon</dc:creator><description>&lt;p style="color:#11171a;font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;margin:0px 0px 0.65em 0px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;Because the device was bond by phone B, The bonding data did not match phone A.&lt;/p&gt;
&lt;p style="color:#11171a;font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;margin:0px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;Or the bonding data in this device has been erase, but phone A still keep it, how can I make phone A forget it ?how can I re-bond to phone A?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223174?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 01:22:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df767cf5-d800-414c-8024-d712a6144a9a</guid><dc:creator>Rickon</dc:creator><description>&lt;p&gt;Because the device was bond by phone B, The bonding data did not match phone A.&lt;/p&gt;
&lt;p&gt;The bonding data in this device has been erase, but phone A still keep it, how can I make phone A forget it ?how can I re-bond to phone A?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 bonding to apple iphone</title><link>https://devzone.nordicsemi.com/thread/223050?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2019 12:57:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dbf82b0-157d-4efb-9650-aa2ed38ec873</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is there a reason that you want to bond again when you already have bonded the first time?&lt;/p&gt;
&lt;p&gt;Do you mean to erase bonding data before connecting to phone A again?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>