This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to change(customize) MAC address(BD_ADDR) on MSP432 (spp demo)

Other Parts Discussed in Thread: CC2564MODA

Hi,

I'm currently using msp432 with cc2564MODA.

I wonder if I can change MAC address(BD_ADDR) in spp demo sample code.

If possible, could anyone tell me how?

  • Hi,

    There is no way to permanently set the BD address.
    Only way is to configure the BD Address of the device after booting up every time.

    For example hcitool cmd 0x3f 0x06 0x99 0xaa 0xbb 0xcc 0xdd 0xee

    will set bd_addr to 99:aa:bb:cc:dd:ee - but only temporarily. It is persistent only while the BT radio is on. Turning it off and on again will cause bd_addr to revert to the value stored in the fuse ROM.

    hcitool cmd can be used once the "/dev/hci0" is up. This means that you have to do "hciconfig hci0 up" first before using the hcitool commands.

    BR,
    Eyal
  • Hi Park,

    The hcitool command mentioned above sends the appropriate HCI command from a linux system.

    But when using MCU releases of TI Dual-mode Bluetooth stack (like MSP430, MSP432, TIVA, STM32 etc,) you can use the VS_Set_Bluetooth_Address API from the BTVS.c file to change the BD_ADDR of the CC256x.

    As mentioned above, it is not possible to overwrite the existing BD_ADDR. If you want to change the default BD_ADDR, you will be required to call this API (which issues the corresponding HCI command) every-time the system goes through a power cycle. 

    You can save your custom BD_ADDR in the BD_ADDR_t structure and call the VS_Set_Bluetooth_Address API with this custom BD_ADDR right after successfully calling OpenStack(HCI_DriverInformation, BTPS_Initialization).

    Hope this helps.

    Best regards,

    Vihang

  • Hi Vihang,

    This command is exactly what I've been looking for.

    It works perfectly as I wanted.

    Thanks for you help. I'm really appreciated.