I am using RPA in my device.
And I expected that when the resolve list is empty (right at start) and resolve list is enable , then, in accordance with the standard,
no device with an RPA address can connect to my device.
When an advertiser receives a connection request that contains a resolvable private address for the initiator’s address (InitA field); the Link Layer shall resolve the private address (see Section 18.104.22.168). The advertising filter policy where white list is enabled (see Section 4.3.2) and the successful resolution of the initiator’s address shall determine if the advertiser establishes a connection.
However, it is not.
CyBle_GapSetAddressResolutionEnable(1u); //(Resolve list is empty !!!)
apiResult = CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
I use CySmart 1.3 for testing, and Resolvable Random Address in it config.
And when I connect to my device, the connection is successful.
Link Layer Privacy Enable is allowed in the project.
Сontinuing the topic.
I studied the suggested example BLE_4.2_DataLength_Security_Privacy And I have a few questions regarding it
Before calling CyBle_GapAddDeviceToResolvingList,which occurs in two places in main.c,the rpaInfo structure is filled, with bdAddr.
bdAddr is Peer Identity device address, but it is assigned the peer Bluetooth device address, which in my case is random (RPA)
In my opinion this is a bug, or not?
What is in DisplayBondList:
memcpy(rpaInfo.bdAddr, bondedDeviceAddress.bdAddr, CYBLE_GAP_BD_ADDR_SIZE);
rpaInfo.type = bondedDeviceAddress.type;
What should be DisplayBondList:
memcpy(rpaInfo.bdAddr, &securityKeys.idAddrInfo, CYBLE_GAP_BD_ADDR_SIZE);
rpaInfo.type = securityKeys.idAddrInfo;
And you also need to fix it in the place where the event is processed CYBLE_EVT_GAP_AUTH_COMPLETE:
2. But in any case, I'm testing the original code, or the code in which these changes are made, when the code is in the ADVERTISEMENT_PRIVETLY state and sends ads type's CYBLE_GAPP_CONNECTABLE_UNDIRECTED_ADV (in this case RPA resulution is enabled), any device, which not added to the Resolving List CAN connect to the device under test.
But this is against the standard.
Can you somehow clarify the situation?