AnsweredAssumed Answered

KW40Z runtime change Bluetooth MAC address gBDAddress_c

Question asked by Lucian Firan on Feb 24, 2017
Latest reply on Mar 13, 2017 by Jorge Antonio Alcala Vazquez

IAR 7.50;  KW40Z_Connectivity_Software_1.0.1 (KSDK_1.3.0)


As the Bluetooth stack comes pre-compiled a variable interface is gBDAddress_c.

How to change at runtime this address ?



/* Public Device Address */
const uint8_t gBDAddress_c[6] = {BD_ADDR};


#define BD_ADDR             0x13,0x00,0x00,0x9F,0x04,0x00

I find it easy to change the definition by removing the const part, is it ok ?


Other ways that I can think of is some volatile keyword added ?


What is the solution as this definition may have an external counterpart linked in host stack.