cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

Hello,

How do I find out the bluetooth MAC address of the connected device?

The use of this function is "CyBle_GapGetPeerBdAddr", but with each pairing its own address is modified.

Example: I have a smartphone connected to the bluetooth of my psoc 4, the smartphone has its own bluetooth address, I need to read this address ..

Can anybody help me?

Thank you!

0 Likes
Reply
1 Solution
Employee

Hello engenharia3_3567971 ,

    As you might have already know that most of the  modern smart phones uses RPA ( Resolvable Private Address ) as a Bluetooth Device Address which can be read by a peripheral device on connection using the API CyBle_GapGetPeerBdAddr().

To read the ID address ( Public or Static ) of the smart phone ,you need to connect and pair the smart phone with Cypress BLE device. On pairing the ID address will be shared along with  other security keys and you can use a new API CyBle_GapGetPeerDevSecurityKeyInfo() to read the ID address of smart phone.

Refer the attached  project.

-Gyan

View solution in original post

0 Likes
Reply
2 Replies
Moderator
Moderator

You can try the CyBle_GapGetPeerDevSecurityKeyInfo(cyBle_connHandle.bdHandle , &localKeyFlag , &peerKeys );

Please take a look at this post which could be help. You can find a demo code in the post.

CyBle_GapGetPeerBdAddr Is not returning the correct BLE ID

0 Likes
Reply
Employee

Hello engenharia3_3567971 ,

    As you might have already know that most of the  modern smart phones uses RPA ( Resolvable Private Address ) as a Bluetooth Device Address which can be read by a peripheral device on connection using the API CyBle_GapGetPeerBdAddr().

To read the ID address ( Public or Static ) of the smart phone ,you need to connect and pair the smart phone with Cypress BLE device. On pairing the ID address will be shared along with  other security keys and you can use a new API CyBle_GapGetPeerDevSecurityKeyInfo() to read the ID address of smart phone.

Refer the attached  project.

-Gyan

View solution in original post

0 Likes
Reply