SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
Each SimpleLink Wi-Fi device is manufactured with a unique MAC address. The user can overwrite this default MAC address. The configuration is persistent with no dependency on the system-persistent configuration. Setting a MAC address takes effect only after reset, and can be set by the Image Creator.
When configuring a new MAC address, the original MAC address is still used for Image Creator development mode. For more information, refer to the UniFlash CC3120, CC3220 SimpleLink™ Wi-Fi® and Internet-on-a chip™ Solution ImageCreator and Programming Tool User's Guide.
Example:
_i16 Status;
_u8 MAC_Address[6];
_i16 Role;
MAC_Address[0] = 0x8;
MAC_Address[1] = 0x0;
MAC_Address[2] = 0x28;
MAC_Address[3] = 0x22;
MAC_Address[4] = 0x69;
MAC_Address[5] = 0x31;
Status = sl_NetCfgSet(SL_NETCFG_MAC_ADDRESS_SET,1,SL_MAC_ADDR_LEN,(_u8 *)MAC_Address);
if( Status )
{
/* error */
}
Status = sl_Stop(0);
if( Status )
{
/* error */
}
Role = sl_Start(NULL,NULL,NULL);