Skip to main content
NChri.1
Associate II
Jun 22, 2020 3:17 PM UTC
Solved

How to change the BDA of the bluetooth module of STM32MP157C-DK2?

Now that I managed to create an 'SPP profile', I have another question. We plan to use a number of those kits. But, I noticed all of them have the same BDA address. Obviously we need to change them. The command 'hciconfig hci0 lerandaddr ..' does not seem to do the trick. Is there any other way of doing it, either permanently or temporarily during the life of the program?

This topic has been closed for replies.
NChri.1
NChri.1Best answer
Associate II
Jul 2, 2020 3:16 PM UTC

Thanks a lot. I got some help from there. For the record, if somebody else is looking for the same, the following command sets a new BDA address (temporarily, it seems. It goes back to the original one after reboot). The command is (copied from the cypress site)

Write the BR_ADDR using the following command

hcitool cmd 0x3f 0x001 <BD_ADDR>

eg: hcitool cmd 0x3f 0x001 0x01 0x23 0x45 0x67 0x89 0xab

sets BD address as 01:23:45:67:89:AB

to read it back:

hcitool cmd 0x04 0x009

source: https://community.cypress.com/message/223112#223112

3 replies

ArmandG
ST Employee
Jul 1, 2020 4:07 PM UTC

Hi @NChri.1​ ,

It seems that the BDA address cannot be changed from the DK2 interface. I suggest you to ask directly on the community forum of Cypress https://www.cypress.com, which made the Bluetooth feature for the board.

Regards,

Armand

NChri.1
NChri.1AuthorBest answer
Associate II
Jul 2, 2020 3:16 PM UTC

Thanks a lot. I got some help from there. For the record, if somebody else is looking for the same, the following command sets a new BDA address (temporarily, it seems. It goes back to the original one after reboot). The command is (copied from the cypress site)

Write the BR_ADDR using the following command

hcitool cmd 0x3f 0x001 <BD_ADDR>

eg: hcitool cmd 0x3f 0x001 0x01 0x23 0x45 0x67 0x89 0xab

sets BD address as 01:23:45:67:89:AB

to read it back:

hcitool cmd 0x04 0x009

source: https://community.cypress.com/message/223112#223112

ArmandG
ST Employee
Jul 2, 2020 3:24 PM UTC

Hi @NChri.1​ ,

Thanks for your feedback ! It will be useful if some people need it.

Regards,

Armand