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.

CC2540 - writing secondary IEEE address programmatically



Hello everyone,

I'm failing to change the secondary BT address directly from code.  I know I can do it using the Flash Programmer however in the solution I'm working on being able to change the address "in the field" is of high importance.  I hoped GAPRole_SetParameter(GAPROLE_BD_ADDR, ....) would do the trick but it does not change the secondary address, not even temporarily.   Is it even possible to set it programmatically?  Any pointers would be greatly appreciated.

Thanks,
Mirek

  • Hi,

    The secondary IEEE address is located in the upper flash page, which is the same page that holds the flash lock bits. This page is always locked when the device is not in debug mode, so you can only change it from the debugger. This is a deliberate design, as you should normally not change the device's IEEE address after production.

    I do however believe it is possible to change the device address from the vendor specific HCI command HCI_EXT_SetBDADDRCmd. See TI_BLE_Vendor_Specific_HCI_Guide.pdf in the Documents folder of your BLE stack install directory.

  • Thank you, hec, HCI_EXT_SetBDADDRCmd works indeed!