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

NCS/Zephyr: BLE paring/bonding procedure general info

I try to add pairing/bonding to the NCS hello world project. But I found the information is not easy to find. I'm playing with the bt_conn_auth_cb struct to understand how it works. I found sometime none of the callbacks gets called, some other time one callback gets called unexpectedly. I'm looking for general info regarding how the NCS APIs work regarding paring/bonding. There must be some doc/info describing under each paring/bonding scheme which functions get called and in what sequence? Thanks!

Parents
  • Thanks for the info. But it's too high level. I'm looking for something like those Message Sequence Chart in the nRF5 SDK documents where you can see which function gets called in what order.

    Here more specifically, these things are unclear to me, for example:

    Somehow pairing_complete(), bond_deleted() are never called if I use Just Works pairing. And there isn't any place to set the mode. It's just implied by the combination of the callbacks.

    Then if set passkey_confirm to not-null (so it points to a function), suddenly pairing_complete() will be called. It also calls bond_deleted() if bond is deleted.

    It looks like by setting these callback pointers to null or not, it can drives the pairing mode. If so then maybe a table to list all the combinations will be convenient and easier to understand.

Reply
  • Thanks for the info. But it's too high level. I'm looking for something like those Message Sequence Chart in the nRF5 SDK documents where you can see which function gets called in what order.

    Here more specifically, these things are unclear to me, for example:

    Somehow pairing_complete(), bond_deleted() are never called if I use Just Works pairing. And there isn't any place to set the mode. It's just implied by the combination of the callbacks.

    Then if set passkey_confirm to not-null (so it points to a function), suddenly pairing_complete() will be called. It also calls bond_deleted() if bond is deleted.

    It looks like by setting these callback pointers to null or not, it can drives the pairing mode. If so then maybe a table to list all the combinations will be convenient and easier to understand.

Children
Related