This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ble paring issue for iphone

Hi nordic,

    In our project we are using pairing and bonding process. the first pairing with the iphone was successful, I delete the NRF52832  pairing infomation,iphone pairing infomation

 is retained. then nrf52832 will fail to pair with iphone again,the error code is as follows

        0> <info> app: MAC ADDRESS = B0:56:C8:5A:44:6B
          0> <info> app: pm_evt_handler = 1
          0> <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102
          0> <warning> peer_manager_handler: Disconnecting conn_handle 0.
          0> <info> app: pm_evt_handler = 3
          0> <info> app: pm_evt_handler = 5

  But android phones don't have that problem

    How do I get the NRF52832 and iphone to pair successfully again?

Parents
  • Hi,

    Which SDK and Softdevice are you using?

    The peer manager does not allow re-pairing by default. This means that it will reject a pairing request from an already bonded peer, which is probably what you are seeing. Have a look at Einar's answer in this post.

    EDIT:

    My mistake, it got mixed up a little. 

    allow_repairing set to true will work in the case where the phone have lost/erased the bonding information while the nRF device still have it. In your case, 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.

Reply
  • Hi,

    Which SDK and Softdevice are you using?

    The peer manager does not allow re-pairing by default. This means that it will reject a pairing request from an already bonded peer, which is probably what you are seeing. Have a look at Einar's answer in this post.

    EDIT:

    My mistake, it got mixed up a little. 

    allow_repairing set to true will work in the case where the phone have lost/erased the bonding information while the nRF device still have it. In your case, 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.

Children
Related