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

received link loss before bonding

Hi, We have a custom board with nRF51822 chipset, We have developed the code to work with some senor peripherals, everything is working fine, but sometimes, when we do testing on bonding we are facing receiver link loss problem with BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED. How to avoid this, and what is the cause of this error?

Regards, Balaji .

BondError.png

Parents
  • Thanks for the reply Haland,

    I am sure that, whitelist is not being used on the peripheral side. Below is the advertisement function of my code,

    static void advertising_start(void)
    {
        uint32_t err_code;
    		memset(&m_adv_params, 0, sizeof(m_adv_params));
        m_adv_params.type        = BLE_GAP_ADV_TYPE_ADV_IND;
        m_adv_params.p_peer_addr = NULL;                           // Undirected advertisement
        m_adv_params.fp          = BLE_GAP_ADV_FP_ANY;
        m_adv_params.interval    = APP_ADV_INTERVAL;
        m_adv_params.timeout     = NULL;                          //APP_ADV_TIMEOUT_IN_SECONDS;
        err_code = sd_ble_gap_adv_start(&m_adv_params);
        APP_ERROR_CHECK(err_code);
    }
    

    Is there any other location to enable the whitelist other than above?

    And one more problem is, when an incorrect passkey (numerical comparison method) is entered, our application enter into the below event, and it hangs in for loop in the ble_debug_assert_handler(); function.

    case BLE_GAP_EVT_DISCONNECTED:
                err_code = ble_bondmngr_bonded_masters_store();
                APP_ERROR_CHECK(err_code);
                advertising_start();
    

    When i check for the error code, it gives the value 0x00000008 ( i think BLE_HCI_CONNECTION_TIMEOUT)

    We need to start advertisement again when the BLE_GAP_EVT_DISCONNECTED even occurs. Please suggest us to overcome this.

Reply
  • Thanks for the reply Haland,

    I am sure that, whitelist is not being used on the peripheral side. Below is the advertisement function of my code,

    static void advertising_start(void)
    {
        uint32_t err_code;
    		memset(&m_adv_params, 0, sizeof(m_adv_params));
        m_adv_params.type        = BLE_GAP_ADV_TYPE_ADV_IND;
        m_adv_params.p_peer_addr = NULL;                           // Undirected advertisement
        m_adv_params.fp          = BLE_GAP_ADV_FP_ANY;
        m_adv_params.interval    = APP_ADV_INTERVAL;
        m_adv_params.timeout     = NULL;                          //APP_ADV_TIMEOUT_IN_SECONDS;
        err_code = sd_ble_gap_adv_start(&m_adv_params);
        APP_ERROR_CHECK(err_code);
    }
    

    Is there any other location to enable the whitelist other than above?

    And one more problem is, when an incorrect passkey (numerical comparison method) is entered, our application enter into the below event, and it hangs in for loop in the ble_debug_assert_handler(); function.

    case BLE_GAP_EVT_DISCONNECTED:
                err_code = ble_bondmngr_bonded_masters_store();
                APP_ERROR_CHECK(err_code);
                advertising_start();
    

    When i check for the error code, it gives the value 0x00000008 ( i think BLE_HCI_CONNECTION_TIMEOUT)

    We need to start advertisement again when the BLE_GAP_EVT_DISCONNECTED even occurs. Please suggest us to overcome this.

Children
No Data
Related