This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

is there any example about android to bond the ble device ?

Hi experts,

I'm trying to bond device between my android phone and the Nordidc51822(S110 v7.0). but I found that it's very difficult to achieve this function. Is there any android's API to use in bonding? Is there any document to tell about bonding?

Parents
  • The Bluetooth Specification 4.1 explains bonding, see Vol. 3, Part C, Section 9.4 and Part H, Section 2.4.1. There is a couple of BLE books available, this and this. In addition, there are some training videos here.

    On Android API level 19 and above I believe you can use public boolean createBond (), see this, but I haven't tested this myself.

    On lower API levels bonding must be triggered by accesing a characteristic that requires the link to be encrypted. The link requirement can be set with:

    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.write_perm);
    

    This corresponds to

    Security Mode 1 Level 2: Encrypted link required, MITM protection not necessary.
    

    See the Bluetooth Specification 4.1, Vol. 3, Part C, Section 10.2 for more information.

    The Glucose Meter example in our SDK uses BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm);, please examine glucose_feature_char_add(...).

  • First thank you very much, your answer is very useful. but I'm still confused what the Nordic51822 should do when bonding. I found the Bond Manager had been changed to Soft Manager since S110 V7.0. Is there any applicantion note I can reference ?

Reply
  • First thank you very much, your answer is very useful. but I'm still confused what the Nordic51822 should do when bonding. I found the Bond Manager had been changed to Soft Manager since S110 V7.0. Is there any applicantion note I can reference ?

Children
No Data
Related