I have exactly the same issue.
I'm running nRF Connect SDK v3.3.0 on two nRF54L15-DK boards, one Peripheral and one Central.
When the Central is scanning and receives advertising from the peripheral, a button can be pressed on the Central to initiate a connection.The devices connect Ok in an unencrypted link.
I want the devices to pair and bond, or at least start the pairing process, automatically when the connection is established.
I assumed that when the Central gets a connected complete callback it could programatically initiate the pairing process by sending a pairing request. However, I can't find any documentation on how to do this.
Is it only possible to automatically start the pairing process from the peripheral?
Does the peripheral have to send a security request in order to trigger the Central to send a pairing request?
We want to use pairing process "Just Works", so there in no operator involvement during the pairing process. Our central and peripheral devices are simple and only have a button and LED, no display or keyboard. However we want the link encrypted and the devices to be bonded.
Hi,
You can initiate the pairing process from the central by calling bt_conn_set_security() like in the central_uart sample here: https://github.com/nrfconnect/sdk-nrf/blob/5aa13555aa18356ea4b47766d16aa3dfbd80b978/samples/bluetooth/central_bas/src/main.c#L152. It is also important to change the security requirement on your characteristics if you want to require the link to be encrypted before any data exchange (https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-5-bluetooth-le-security-fundamentals/topic/blefund-lesson-5-exercise-1/).
Hi,
You can initiate the pairing process from the central by calling bt_conn_set_security() like in the central_uart sample here: https://github.com/nrfconnect/sdk-nrf/blob/5aa13555aa18356ea4b47766d16aa3dfbd80b978/samples/bluetooth/central_bas/src/main.c#L152. It is also important to change the security requirement on your characteristics if you want to require the link to be encrypted before any data exchange (https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-5-bluetooth-le-security-fundamentals/topic/blefund-lesson-5-exercise-1/).