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

Fail to pair more than one device

Hello,

I tested nRF51822 with ble_app_hids_keyboard example, i found it cannot pair with more than one devices.

Procedures:

  1. Pair PCA10001 with iPhone#1, it can be paired and connected.
  2. Turn off Bluetooth of iPhone#1 and try to pair PCA10001 with iPhone#2. Although the name of HID keyboard can be scanned but it cannot be paired.
  3. Reset PCA10001 and try to pair with iPhone#2 again, pairing is succeed.

Sometimes in step 2, I can pair and connect iPhone#2 after several times of trial, but it cannot work properly (fail to send char) and give out an error "NRF_ERROR_FORBIDDEN". I don't know the reason? The default Max number of bonded master is 4 and I have not edited it.

How can I pair a new phone successfully without reseting the nRF51822?

Thanks.

  • Whitelisting based on address will not work with iOS, since it uses resolvable addresses, but whitelisting based on Identity Resolving Key works, even with resolvable addresses.

    Unfortunately, I'm still not able to replicate the original problem reported here, no matter if I use 4.4.1 or 4.4.2. On which file and line do you get this error?

  • Hi Ole,

    Can you elaborate more on what you mean above by, "If you always want to be connectable with new devices, you should not use whitelisting, but this might not always give desirable behavior." What undesirable behavior might arise?

    Thanks, Jamie

  • Unfortunately, I can't quite remember what I thought when I wrote that... :-P

    However, my best guess is that my point was that if you always are open to receive connections from all Central devices, you may be connected to by a Central you don't actually want to be connected to. So depending on how you intend your device to be used, you should put some thought into these problems, and make sure that things work as you want to.

  • Hi,

    I have the same problem. When I try bonding from second device nRF51822 return "NRF_ERROR_FORBIDDEN" from on_auth_status method ble_bondmngr.c. I think that's happend because the Encryption Diversifier param from m_master equal with masters from database.

    
    if (INVALID_MASTER_HANDLE == m_master.bond.master_handle)
    {
        uint32_t err_code = master_find_in_db(m_master.bond.master_id_info.div);
    
        if (err_code == NRF_SUCCESS)
        {
            // Possible DIV Collision indicate error to application,
            // not storing the new LTK
            err_code = NRF_ERROR_FORBIDDEN;
        }
    }
    
    

    Why "div" param sended to mastter_find_in_db method from m_master? I think it must sended from new master info which stored in p_auth_status. Otherwise, we always find in db with old "div" param because it isn't updating.

Related