Hi,
I'm using CC2564 to check if some of the already paired devices is nearby.
CC2564 is initiating connection and when connection is complete - measuring RSSI.
If only one device is paired, after successful connection it's ACL connection handle is 0x01. Passing this value to HCI_VS_Read_RSSI returns the correct RSSI value.
If two devices are paired with the module, connection attempt is made to both devices simultaneously. If both devices are in range, their connection handles are 0x01 and 0x02. Passing those values to HCI_VS_Read_RSSI returns the correct RSSI values. If first of the devices is out of range, connection to the second device completes successfully with connection handle 0x02 before connection to the first device to timeout.
Passing this connection handle (0x02) to HCI_VS_Read_RSSI will result in error "-2" (no connection), but passing 0x01 will return the correct RSSI.
If both devices are in range and connection to the second device completes before the connection to the first device RSSI values returned by HCI_VS_Read_RSSI are swapped.
Connection handle is the returned by HCI_Event_Data->Event_Data.HCI_Connection_Complete_Event_Data->Connection_Handle
I have double checked the connection handle with GAP_Query_Connection_Handle.