How to initiate BLE pairing manually

Hello,

I'm running nRF Connect SDK v1.9.0 on two nRF52840-DK devices, one Peripheral other Central.  
My application requires to initiate pairing, i.e. send pair request, programmatically.

For testing, I created a Peripheral device with a Service and two Characteristics.  
Via nRF Connect Desktop tool and nRF 52840 dongle, I can connect to that device, when connection establishes, it stays in "unencrypted link"  status.  
Then via Desktop tool, I click on "Pair" on the device settings configuration and it does pair with my Peripheral and gets into "encrypted link" mode. 
I want to accomplish same thing with my other nRF52840-DK device  which is in Central role.

Is there a way to initiate pair request manually ?   I couldn't see an API call for that.
All comments/hints are greatly appreciated.

E.
Parents
  • 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.

Reply
  • 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.

Children
No Data
Related