Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
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
1 Solution
lock attach
Attachments are accessible only for community members.
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

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
2 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

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
lock attach
Attachments are accessible only for community members.
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

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

0 Likes