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

How to use one static passkey in the central and peripherical devices

Hi,

I've read a lot of question on the forum, but I'm a lit bit confused about what I have to do to use one static passkey on the central and peripherical device. In my first tests I'll use two PCA10040 with S132, so i dont have keyboard or display on it.

  1. Can I use peer manager in both devices?
  2. In the peripherical side I've understood that using the peer manager I'll have to use the sd_ble_opt_set(), right?
  3. In the central side can I use the peer manager and use some function?

Later I'll use one smartphone to connect to the peripherical, but I'll still use the static passkey, this mean that I'll not enter the key in the smartphone too.

Best regards.

Parents
    1. Yes
    2. On the peripheral you can set the static passkey with sd_ble_opt_set() right. See this. Then you should set that you have a display.
    3. On the central you should then set that you have keyboard. You should receive the BLE_GAP_EVT_AUTH_KEY_REQUEST event when you pair, and reply with the static passkey with sd_ble_gap_auth_key_reply(). See this for more information.

    If you want to use static passkey with a smart phone you will have to enter the static passkey on the smart phone during pairing.

Reply
    1. Yes
    2. On the peripheral you can set the static passkey with sd_ble_opt_set() right. See this. Then you should set that you have a display.
    3. On the central you should then set that you have keyboard. You should receive the BLE_GAP_EVT_AUTH_KEY_REQUEST event when you pair, and reply with the static passkey with sd_ble_gap_auth_key_reply(). See this for more information.

    If you want to use static passkey with a smart phone you will have to enter the static passkey on the smart phone during pairing.

Children
Related