您好,登錄后才能下訂單哦!
nRF51822中如何使用passkey,針對這個問題,這篇文章詳細介紹了相對應的分析和解答,希望可以幫助更多想解決這個問題的小伙伴找到更簡單易行的方法。
Bonding with passkey is shown in ble_app_gls in the SDK, so it might be useful to take a look on it.
To modify an example not using passkey to do so, you have to change 3 things:
Set MITM in ble_gap_sec_params_t to 1.
Set IO capabilities in ble_gap_sec_params_t to something with either display or keyboard. Refer to table 2.4 in the Core Specification, Volume 3, Part H, section 2.3.5.1 for your possibilities.
Depending on your choice in 2, either, a) if you have a keyboard: Reply to a BLE_GAP_EVT_AUTH_KEY_REQUEST with a call to sd_ble_gap_auth_key_reply(), supplying the key your user entered. b) if you have a display: Show the key contained in the BLE_GAP_EVT_PASSKEY_DISPLAY on your display, so that the user can enter this key on the Central device.
關于nRF51822中如何使用passkey問題的解答就分享到這里了,希望以上內容可以對大家有一定的幫助,如果你還有很多疑惑沒有解開,可以關注億速云行業資訊頻道了解更多相關知識。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。