cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-1 pairing by pressing a button

Evgeny Boltunov
Associate II
Posted on April 16, 2018 at 15:31

Hello!

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.

Regards,

Evgeny.

#button #bluenrg-1 #pairing
2 REPLIES 2
Winfred LU
ST Employee
Posted on April 17, 2018 at 05:43

Hi Evgeny,

The Numeric Comparison association model is not suitable for your device, because it is designed for scenarios where both devices (initiator and responder) are capable of displaying a six digit number and both are capable of having the user entering ''yes'' or ''no''.

Since your device

 has buttons w/o keyboard and display, its capacity can only be ''NoInputNoOutput''.

0690X0000060Ac4QAE.png

For ''NoInputNoOutput'' I/O capability devices, the key generation method can only be ''Just Works'' Unauthenticated.

0690X0000060AcOQAU.png0690X0000060AcJQAU.png

Note.

The tables above are from Bluetooth Core Specification 5.0, Vol 3, Part H, Section 2.3.5.1

Best Regards,

Winfred

Posted on April 20, 2018 at 14:47

Thank you very much, 

Winfred.

Regards,

Evgeny.