MAC Address
33
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Device
Example:
_i16 Status;
SlDateTime_t dateTime= {0};
dateTime.tm_day =
(_u32)23;
/* Day of month (DD format) range 1-31 */
dateTime.tm_mon =
(_u32)6;
/* Month (MM format) in the range of 1-12 */
dateTime.tm_year =
(_u32)2014;
/* Year (YYYY format) */
dateTime.tm_hour =
(_u32)17;
/* Hours in the range of 0-23 */
dateTime.tm_min =
(_u32)55;
/* Minutes in the range of 0-59 */
dateTime.tm_sec =
(_u32)22;
/* Seconds in the range of
0-59 */
Status
= sl_DeviceSet(SL_DEVICE_GENERAL, SL_DEVICE_GENERAL_DATE_TIME,
sizeof
(SlDateTime_t),
(_u8*)(&dateTime));
if
( Status )
{
/* error */
}
3.8
MAC Address
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.
NOTE:
When configuring a new MAC address, the original MAC address is still used for Image
Creator development mode. For more information, refer to the
CC3120/CC3220 SimpleLink
Wi-Fi and Internet of Things Image Creator 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);
3.9
Device Name
The device name is used as the common URN name at the WPS, Wi-Fi Direct, MDNS, and DHCPv4
client. The maximum length of the device name is 32 characters, and the following characters are allowed:
•
a through z
•
A through Z
•
0 through 9
•
–