Hi all, I have been working on "NimBLE host based privacy (RPA)" with no involvement of controller for past few days, spec ref: Vol 3, part C, section 10.7.1.2 / 10.7.2.2 (Privacy Feature in a Peripheral/central with Host-based privacy). Before I come up with pull request, here are few key points:
1. Similar to `BLE_LL_CFG_FEAT_LL_PRIVACY`, add `BLE_HOST_BASED_PRIVACY`. 2. As controller is not aware of host based privacy, we can not directly use "own address type = BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT". I have tried to use "own address type = BLE_OWN_ADDR_RANDOM" for this feature. 3. Provide API to enable/disable Host based privacy, wherein the RPA will be generated and address will be set in controller as BLE_ADDR_RANDOM, provide API similar to `ble_hs_id_set_rnd` which sets RPA address. 4. Handle the peer side privacy in `LE enhanced connection` & `advertisement reports`, save the peer RPA in "Peer Records" (similar to Resolving list ). 5. Once the pairing is done and bond is established, add device to resolved list (maintained in host) and update corresponding "Peer record". 6. While reconnecting, check if the peer is RPA, check if it is resolvable by any entry from "peer records", get entry from "resolving list" corresponding to it and we are done with the reconnection. Please let me know if this is an acceptable approach for mynewt nimble. Regards, Prasad