Please use the API Cy_BLE_GAP_GetPeerBdAddr(), this function reads the peer Bluetooth device address identified by 'bdHandle'.
PSoC6 BLE supports Bluetooth v5.0. For PSoC4 BLE and PSoC6 BLE devices macros, structures, APIs will differ. Please refer to PSoC6 BLE API documentation in BLE component PDL Documentation. In PSoC Creator, Right click on the BLE Component ->click on "Open PDL Documentation".
Hello P. Yugandhar.
Thanks for your reply. Now I am calling this method when the BD got the "CY_BLE_EVT_GAP_DEVICE_CONNECTED" event but the api_result throwns me an error : "Cy_BLE_GAP_GetPeerBdAddr Error 0x160001" This error can be either CY_BLE_ERROR_NO_DEVICE_ENTITY or CY_BLE_ERROR_INVALID_PARAMETER
Can you help me?
Thanks a lot
Please add the below code in Stack event handler callback function and declare "cy_stc_ble_conn_handle_t appConnHandle;" externally. Please refer Cy_BLE_GAP_GetPeerBdAddr() API declaration in the "CE212742_BLE_4.2_DataLength_Security_Privacy" code example in PSoC Creator.
cy_stc_ble_gap_peer_addr_info_t addr =
.bdHandle = appConnHandle.bdHandle