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

peer_manager pairing problem

Hi,

Here's I want to do:
Use static passkey to connect with central and peripheral.
I'm useing peer_manager to doing this.
1. I've setup passkey in peripheral with function sd_ble_opt_set
2. on central,ble_evt_handler, when I got event BLE_GAP_EVT_CONNECTED, I use sd_ble_gap_authenticate
to start auth.
3. then I will get event BLE_GAP_EVT_AUTH_KEY_REQUEST in ble_evt_handler
so I use sd_ble_gap_auth_key_reply to reply the static passkey.

I don't know what's next step. after this it seems linked but not use passkey!
because on central I send passkey as "123456",in peripheral I set passkey as "125534"
it's not a matched key, it should be not connect.

I want to know is there any step wrong? or something I have not done?

Here's my setup in peer_manager_init

central:
sec_param.bond = 0
sec_param.mitm = 1
sec_param.lesc = 0
sec_param.keypress = 0
sec_param.io_caps = BLE_GAP_IO_CAPS_KEYBOARD_ONLY
sec_param.oob = 0
sec_param.min_key_size = 7
sec_param.max_key_size = 16

peripheral:
sec_param.bond = 1
sec_param.mitm = 1
sec_param.lesc = 0
sec_param.keypress = 0
sec_param.io_caps = BLE_GAP_IO_CAPS_DISPLAY_ONLY
sec_param.oob = 0
sec_param.min_key_size = 7
sec_param.max_key_size = 16

If there's any peremiter need please tell me.
Thanks.

Parents Reply
  • Hi Simonr

    Thanks for reply!

    I've read the case you've post

    I'm using the nRF5_SDK_15.3.0 in central and peripheral

    the post still using nRF5_SDK_11.0.0 in central

    and they are using device_manager for connect

    I'm using peer_manager for connect

    seems there's some different in there SDK.

    I'm trying to learn something form the post, but seems all the step I've done

    I still don't know how to solve my problem, please help. Tnanks!

Children
No Data
Related