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

How to do bonding and unbonding in zephyr using nrf 52832 DK

Hello,

 I need to bond a device with its bd_addr using AT_command and unbond device using another AT_command. I am having only DK of nrf52832. So I am trying to bond 2 devices, DK as central and mobile as peripheral using nrf_connects advertise. But every time mobile is generating new random address.

How to start bonding procedure in zephyr?

how to count number of bonded devices and their bd_address in zephyr?

how to unbond device using bd_address in zephyr?

Parents
  • Hi,

     I need to bond a device with its bd_addr using AT_command and unbond device using another AT_command. I am having only DK of nrf52832. So I am trying to bond 2 devices, DK as central and mobile as peripheral using nrf_connects advertise. But every time mobile is generating new random address.

    You need to bond in order to obtain the IRK and resolve the address as it changes.

    How to start bonding procedure in zephyr?

    Normally the central initiates bonding, but the peripheral can request it. In any case, you do it using bt_conn_security().

    how to count number of bonded devices and their bd_address in zephyr?

    There is no API function that will give you the count, but you can count the bonds yourself using bt_foreach_bond(). In most cases you should leave this up to the central, though. And 

    how to unbond device using bd_address in zephyr?

    You can do that with bt_unpair().

Reply
  • Hi,

     I need to bond a device with its bd_addr using AT_command and unbond device using another AT_command. I am having only DK of nrf52832. So I am trying to bond 2 devices, DK as central and mobile as peripheral using nrf_connects advertise. But every time mobile is generating new random address.

    You need to bond in order to obtain the IRK and resolve the address as it changes.

    How to start bonding procedure in zephyr?

    Normally the central initiates bonding, but the peripheral can request it. In any case, you do it using bt_conn_security().

    how to count number of bonded devices and their bd_address in zephyr?

    There is no API function that will give you the count, but you can count the bonds yourself using bt_foreach_bond(). In most cases you should leave this up to the central, though. And 

    how to unbond device using bd_address in zephyr?

    You can do that with bt_unpair().

Children
Related