AnsweredAssumed Answered

BlueNRG-1 pairing by pressing a button

Question asked by Evgeny Boltunov on Apr 16, 2018
Latest reply on Apr 20, 2018 by Evgeny Boltunov



I am searching for the simple way of pairing on BlueNRG-1 by pressing a button on device.
We have a device, which has no keyboard and display, only some buttons. We want to enable/confirm pairing on this device by pressing a button. We also need to bond this device to smartphone for communication.

What pairing mode can you advice to use on this device?
"Numeric comparison" mode, which I have tried, works on Android 6 and above. I can press button to confirm the code which is shown on the phone and is the same on the device.
But on Android 5.1 (and earlier) phone always asking to enter the code in numeric comparison mode. And because we can't show the code, which user should enter on the smartphone - this is the issue.

I have tried the "JustWorks" pairing mode, waiting for pressing the button on device, before entering the function:
aci_gap_slave_security_req(connection_handle); - but seems it's not working as I need.
The first connection really waits for pressing the button, but all further connections pair without waiting for the button press.

Please give me an advice how to choose the pairing method and make pairing handling properly.