KB: How to support BLE passkey paring mode

Question

How do we set up a server device to request a PIN code and then connect with a client device (usually a smartphone)?

image

Recommendation

Use the ble_peripheral_server_bond sample code, and modify it as shown below:

image

image

3 Likes

This looks interesting!

So in order to bond with the RSL10 I have to enter a numeric PIN on the smartphone?
And the PIN is hard coded in the application flashed into RSL10 due to no IO options available on the evaluation board.

yes. if you want to connect with RSL10 use your phone, you must input the right PIN which you defined in RSL10 in phone side. otherwise, you will received an reject connect response from RSL10

1 Like

if you want to support by IOS. you may need to refer ble_peripheral_server_bond_passkey_ios.zip (916.8 KB) to meet some rulars of APPLE

Hello,
Can i please understand the reason of having GAP_IO_CAP_DISPLAY_ONLY.
Since my device doesn’t have any keyboard nor display on it. Is it fine if i use GAP_IO_CAP_NO_INPUT_NO_OUTPUT ? Will i still be able to enter the passkey on my smart phone and connect to the device?

@rakshith.bn

The peripheral server device does not have keyboard and display. It can use GAP_IO_CAP_DISPLAY_ONLY.
That means the device could generate key and can display it. This does not mean that device has to have the display.

Thank you for using our community forum!