I've used the BLE_4.2_DataLength_Security_Privacy example almost verbatim on the Peripheral-side, and, after dabbling a bit on the Central-side, have gotten the 2 (both PSOC4 Modules) to Connect->Auth->Bond with each other. Now, however, just like the Example, I want the Peripheral to Directly advertise with a RPA.
I'm pretty sure the criteria is correct there, so, since I don't have an example for the Central-side, I'm assuming there is something I'm missing in that code.
What's happening is that a CYBLE_EVT_GAPC_DIRECT_ADV_REPORT is not even hitting when the Peripheral advertises. Since its direct and RPA, no device, CySmart dongle or other, is catching the Peripheral, but the Central is scanning other floating devices, so I'm sure scanning is working.
What API functions need to be called on the Central, during/after pairing/bonding, to ensure LL Privacy is implemented correctly?
A little additional Info (Some may matter, other highlights FYI):
- The Central is a Central/Peripheral setup, though broadcaster only as of yet.
- After StoreBond, both devices would update information within their local Device Information service. At first, I would call CyBle_StoreStackData, but the, on only the Central-end, I would get a CYBLE_HCI_COMMAND_DISALLOWED_ERROR. Figuring it must be that, I took CyBle_StoreStackData out, with no luck, then I called CyBle_Stop() and restarted the stack after 'Bonding Mode' was complete. I know I shouldn't have to do that, but didn't know what I was calling the cause the vague error. I'm disconnected for the CyBle_StoreBondingData(), so the only command was StartAdvertisement.
- I tested a CyBle_Stop/Start call on the Peripheral end as well to see if it would resolve any issues, but all it did was wipe out any RPA it constructed when it went into and came out of Low Power Mode.
UPDATE 2: Central Module is CYBLE-202007, and after reading up, I'm now doing a soft reset on just that end after the bonding procedure is complete. On re-initializing, Bonds read up fine, and scanning/advertising starts up as well. Now, the major issue is what it has been all along: Peripheral is Directly advertising, Central does NOT see it. Central has been catching Direct Advertisements from other devices within range. No addresses in the advertisement package is related to either device. I'm not sure if that should happen, since I've always assumed CYBLE_EVT_GAPC_DIRECT_ADV_REPORT was only hit when the device was being advertised to directly and only on that device.