I am facing one challenge while using IRK. Please guide - maybe I am missing some info.
Scenario:
BLE 5.0 Device Acting Slave (lets call it BSL) generates IRK 1 and bond with master device 1(lets call it BMS1). Suppose it drops connection after some time and BSL will start advertising with Address generated using IRK 1(Shared between BSL and BMS1). Now anytime the master wants to communicate with BSL it can scan the Advertise packet's resolve address using IRK1 and start communication.
The hard part starts here:
Lets say after dropping connection with BSM1, BSL device bonds with another BSM2 using new IRK2 (as per my understanding new IRK is generated by BSL every time device is bonded to new BSM). Now suppose that, after some time, the connection with BSM2 drops. At this time BSL has generated two IRKs: IRK1 and IRK2 to communicate with BSM1 and BSM2.
Now my question is:
what address will have the advertising packet of BSL at this point? The address generated resolvable using IRK1 or the address resolvable using IRK2 or both addresses in sequential advertising packets?
If it's one of these, either IRK1 or IRK2 address, then I cannot communicate with one device even if I haven't lost pairing or bonding info.
Please let me know if my understanding is wrong.