Skip to main content
Visitor II
June 22, 2020
Solved

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

  • June 22, 2020
  • 3 replies
  • 2195 views

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.
    Best answer by NChri.1

    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

    ST Employee
    July 1, 2020

    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.1AuthorAnswer
    Visitor II
    July 2, 2020

    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

    ST Employee
    July 2, 2020

    Hi @NChri.1​ ,

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

    Regards,

    Armand