We are working with WICED 3.7.0 SDK and we would like to use the Resolvable Private Address (RPA) feature, however we are having some issues.
We have successfully implemented pairing with iOS and when .rpa_refresh_timeout is set to 0, everything seems to work perfectly, iOS is able to reconnect automatically even after power cycling the board. However when we set .rpa_refresh_timeout to 60 (to refresh the address every 60 seconds), iOS is able to reconnect to device (thus resolve the new address) only within one power cycle.
We were guessing that WICED might be using different Identity Resolving Key (IRK) after the power cycle and we might need to save this and restore after the power cycle, but we have not managed to find any methods that would allow us to do this.
Is there some configuration we are missing?
I managed to solve the issue.
The solution was quite simple. One needs to handle BTM_LOCAL_IDENTITY_KEYS_UPDATE_EVT and BTM_LOCAL_IDENTITY_KEYS_REQUEST_EVT events in Bluetooth management callback. Need to save and restore the local identity keys.