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.

Parents
  • 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.

Reply
  • 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.

Children
No Data
Related