CONFIG_BT_ID_MAX = 2

For nrf Connect SDK, can I config CONFIG_BT_ID_MAX = 2, both adress type are Public for below use case?

ID with index = 0 for peripheral role and  for connect and bonded with sartphone.

ID with index =1 for centrol role and for connect and bonding with other ble peripheral.

Because whenever unpaired with Smartphone, we need to change ID with index  = 0 to other ble address.

But, for ID with index = 1, we not going to change it unless doing factory reset, so that it won't affect the reconnection for the bonded peripheral devices.

Parents
  • The scenario described above does not require 2 BT IDs. I'm running a device with both central and peripherial roles on a single ID successfully.

    The ID rotation stuff is not required when you allow a pairing to be overwritten somehow. Can be configured via prj.conf file but should have additional application code ("pairing mode").

Reply
  • The scenario described above does not require 2 BT IDs. I'm running a device with both central and peripherial roles on a single ID successfully.

    The ID rotation stuff is not required when you allow a pairing to be overwritten somehow. Can be configured via prj.conf file but should have additional application code ("pairing mode").

Children
  • Hi Turbo J, yes currently we also  running a device with both central and peripherial roles on a single ID. But the problem is that after paired and bonded with iPhone, if we delete the bonding info at device side and keep the same BLE mac address, iPhone os will try to connect the the device again and again, due to bonding info lost at device side, the connection will fail, so it keep connect and disconnect forever... so after unpaired with smartphone we change to another ble macaddress.

    Now we need to support bonding with other peripheral device such as Heart Rate sensor, but if we use samd ID but the ID changed, our devcie can't connected wtih boned peripheral device any more.

    That is why we want to check if it is possible with two BLE ID  can be the solution.

  • Hello,

    Perhaps you can help me understand.

    How many connections are there in total? It is correct that if you delete the bond information from the nRF device only, then the phone will still think they are bonded, so it will continue to try to connect to it.

    But in the end. How many connections do you intend to have? And what is the nRF52840's role in each connection (peripheral or central)?

    The reason that I ask is that you probably don't want a device that continuously changes device ID and connects to the same phone again. That will fill up the bonding table of the phone eventually, and the user will see a lot of devices in the "known devices" list, seemingly coming from a lot of similar devices. 

    John said:
    Now we need to support bonding with other peripheral device such as Heart Rate sensor, but if we use samd ID but the ID changed, our devcie can't connected wtih boned peripheral device any more

    Was the purpose not to have one ID for the phone, and use one other when the nRF is a peripheral connected to another device?

    But if you want to act as a peripheral connecting to several centrals (e.g. several phones), and you want to keep the other known devices from occupying that connection, then using different device IDs is a good idea.

    But from what you describe, you should be able to do this using two IDs, as you suggest.

    Best regards,

    Edvin

Related