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

  • See also devzone.nordicsemi.com/.../27758

    What I do (or actually did) is to advertise with whitelist filtering except when the button is pressed. Than I advertise to accept any connection for 30 seconds. After it is bonded it can connect using whitelist. The disadvantage is that you can have only 8 devices in the whitelist, so that's the limit. I am now changing to authentication on application level. For some reason the Bluetooth SIG never thought about our kind of user scenarios. But I think our scenario quite obvious.

  • 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