This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Fail to pair more than one device

Hello,

I tested nRF51822 with ble_app_hids_keyboard example, i found it cannot pair with more than one devices.

Procedures:

  1. Pair PCA10001 with iPhone#1, it can be paired and connected.
  2. Turn off Bluetooth of iPhone#1 and try to pair PCA10001 with iPhone#2. Although the name of HID keyboard can be scanned but it cannot be paired.
  3. Reset PCA10001 and try to pair with iPhone#2 again, pairing is succeed.

Sometimes in step 2, I can pair and connect iPhone#2 after several times of trial, but it cannot work properly (fail to send char) and give out an error "NRF_ERROR_FORBIDDEN". I don't know the reason? The default Max number of bonded master is 4 and I have not edited it.

How can I pair a new phone successfully without reseting the nRF51822?

Thanks.

Parents
  • When the keyboard application has been bonded with something, it will advertise with whitelist first, with a 30 s timeout. As long as it uses the whitelist, it will not be connectable for other devices, giving the behavior you describe. However, after this 30 s timeout, new devices should be able to connect.

    If you always want to be connectable with new devices, you should not use whitelisting, but this might not always give desirable behavior. You should therefore take some care to make sure you cover the use cases you want.

Reply
  • When the keyboard application has been bonded with something, it will advertise with whitelist first, with a 30 s timeout. As long as it uses the whitelist, it will not be connectable for other devices, giving the behavior you describe. However, after this 30 s timeout, new devices should be able to connect.

    If you always want to be connectable with new devices, you should not use whitelisting, but this might not always give desirable behavior. You should therefore take some care to make sure you cover the use cases you want.

Children
Related