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

android pairing fail.

I use it. nRF52832 PCA10040 I have coded based on NUS.

However, I failed to pair with my Android device.

Even with ble_app_uart, the result is the same.

Parents
  • Hi,

    You are setting the security status as: BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP in the line below. err_code = sd_ble_gap_sec_params_reply(m_conn_handle, BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, NULL, NULL);

    Changing it to: err_code = sd_ble_gap_sec_params_reply(m_conn_handle, BLE_GAP_SEC_STATUS_SUCCESS, NULL, NULL);

    might solve the problem.

  • Try to set the security parameters as below and check if works: static ble_gap_sec_params_t m_sec_params;

      m_sec_params.bond         = 1;
    m_sec_params.mitm         = 0;
    m_sec_params.io_caps      = 3;
    m_sec_params.oob          = 0;
    m_sec_params.min_key_size = 7;
    m_sec_params.max_key_size = 16;
    

    and then this: err_code = sd_ble_gap_sec_params_reply(m_conn_handle, BLE_GAP_SEC_STATUS_SUCCESS, &m_sec_params, NULL); check the infocenter for the details about setting the right values into m_sec_params. hope this works!

Reply
  • Try to set the security parameters as below and check if works: static ble_gap_sec_params_t m_sec_params;

      m_sec_params.bond         = 1;
    m_sec_params.mitm         = 0;
    m_sec_params.io_caps      = 3;
    m_sec_params.oob          = 0;
    m_sec_params.min_key_size = 7;
    m_sec_params.max_key_size = 16;
    

    and then this: err_code = sd_ble_gap_sec_params_reply(m_conn_handle, BLE_GAP_SEC_STATUS_SUCCESS, &m_sec_params, NULL); check the infocenter for the details about setting the right values into m_sec_params. hope this works!

Children
No Data
Related