This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to allow Bonding when a button is pressed?

I'm using SDK 7.1, PCA10028 eval board, SD310 2.0.1

My application has no display, and a single button for input. I want to prevent bonding until the button is pressed. Looking at Nordic's documentation I found 1 sequence chart that shows bonding, this chart seems to be for "just works" bonding. Is there a sequence chart for bonding with a static passkey?

Looking through the example projects, most have either "just works" bonding, or bonding with display and entry peripherals.

What is the best approach for this project, with regards to bonding? Do I use a static passkey (hard-coded into the firmware) and when the button is pressed load it?

Is there a good example project that does something like this?

-Clint

Parents Reply Children
  • Petter - I've looked at that - with my device I have only 1 button - when I set up my security parameters I have the following choices:

    BLE_GAP_IO_CAPS_DISPLAY_ONLY // I don't have a display

    BLE_GAP_IO_CAPS_DISPLAY_YESNO // I don't have a display - I have a "yes" button, but not a "no"

    BLE_GAP_IO_CAPS_KEYBOARD_ONLY // I don't have Keyboard

    BLE_GAP_IO_CAPS_NONE // "just works" but I want to require a button press

    BLE_GAP_IO_CAPS_KEYBOARD_DISPLAY // I don't have a Keyboard, or a display

    Which of these do I choose? I think the correct route is to set up static passkey, but I'm having problems figuring out how to make my device prevent bonding, until the button is pressed.

  • The suggested solution it not very handy if I understand it correctly. You should press and hold the button and in the meantime setup the connection with your phone? Hmmmm, how can explain that to my customers...

  • If you don't think the solution is handy I suggest you add a new question and explain what your requirements are. It is just one solution, and it was accepted. And, you don't need to hold the button. You can for example allow bonding for 30 seconds after a button press.

Related