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

cross mob
JaOs_4314736
Level 2
Level 2
First like received

Hi,

I'm doing FW for a PSoC 4 device and need to know if it's possible to change the BLE MAC address. The reason for this is that the device communicates with an Android phone app and when the device does a soft reset the phone tries to re-connect before BLE stack starts advertising. At least this is the theory since it sometimes hangs at this point. The BLE device thinks it's connected and the Android app thinks it's not connected. I know the Android stores and uses the MAC address and constantly is trying to re-connect once the connection drops (BLE device does soft reset).

Thanks, JamesO

0 Likes
1 Solution
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi James,

Yes. It is possible to change the PSoC 4 BLE device address in run time using the following API shown in the image attached.

However, in the phone side, the best way to code is to send the Connect request only when the peripheral advertisement is found after scanning.

set_address.PNG

Please attach your Psoc 4 ble project for us to check once. You can also refer our code examples on central and peripheral.

The BLE device thinks it's connected and the Android app thinks it's not connected.

If you have BLE sniffer, please check if you can see the airlog at this point and let us know whether the Central actually sent the connect request.

Thanks and regards

Ganesh

View solution in original post

0 Likes
2 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi James,

Yes. It is possible to change the PSoC 4 BLE device address in run time using the following API shown in the image attached.

However, in the phone side, the best way to code is to send the Connect request only when the peripheral advertisement is found after scanning.

set_address.PNG

Please attach your Psoc 4 ble project for us to check once. You can also refer our code examples on central and peripheral.

The BLE device thinks it's connected and the Android app thinks it's not connected.

If you have BLE sniffer, please check if you can see the airlog at this point and let us know whether the Central actually sent the connect request.

Thanks and regards

Ganesh

0 Likes

Hi,

You can also go through the following KBA and understand how to set the BLE address using Miniprog 3.

Setting Bluetooth Device Address – KBA211407

Hope this helps !

Thanks

Ganesh

0 Likes