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

How to implement the static PIN type pairing?

Hi, How to implement the static PIN type pairing, when the server device doesn't have keyboard or display? Our requirement is, Master will initiate the pairing process and device should ask for the PIN (6 digit static), when master enters the correct PIN then the connection should be established between the device and the master. Is there any sample application for server with keyboard only IO capability?

Regards, Balaji

Parents
  • Thanks for the reply Morten, Now i can implement pairing as below, IO capability for both the end is set to keyboard only, then in the server side i hard-coded the passkey value to 123456, and added the below case in on_ble_evt,

    case BLE_GAP_EVT_AUTH_KEY_REQUEST:
    sd_ble_gap_auth_key_reply(m_conn_handle,BLE_GAP_AUTH_KEY_TYPE_PASSKEY, passkey);
    break;
    

    when i click bond in the master control panel it will ask for the passkey, and the passkey i need to enter is 123456. And also checked it is working fine.

    But when i enter wrong key (121212) it is giving receiver link loss as i expected, but, in device info it is showing that Bonded: True and when i press bond button i am getting bond already exists with xxxxxxxx(device address). Please suggest me to overcome this.

    Regards, Balaji

Reply
  • Thanks for the reply Morten, Now i can implement pairing as below, IO capability for both the end is set to keyboard only, then in the server side i hard-coded the passkey value to 123456, and added the below case in on_ble_evt,

    case BLE_GAP_EVT_AUTH_KEY_REQUEST:
    sd_ble_gap_auth_key_reply(m_conn_handle,BLE_GAP_AUTH_KEY_TYPE_PASSKEY, passkey);
    break;
    

    when i click bond in the master control panel it will ask for the passkey, and the passkey i need to enter is 123456. And also checked it is working fine.

    But when i enter wrong key (121212) it is giving receiver link loss as i expected, but, in device info it is showing that Bonded: True and when i press bond button i am getting bond already exists with xxxxxxxx(device address). Please suggest me to overcome this.

    Regards, Balaji

Children
No Data
Related