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?
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?
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(...).
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 ?
Soft Manager? Do you mean Device Manager? Please see this question. If you have more questions, I suggest you add them separately. I would also appreciate if you could accept my answer by clicking the grey circle with a check mark, if you feel it answers your question.