SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
The SimpleLink Wi-Fi device lets users set the AP static IPv4 parameters (IPv6 is not supported in AP mode). This configuration is persistent, and reset is required for changes to apply. The following parameters can be configured:
Example:
_i16 Status;
_i16 Role;
SlNetCfgIpV4Args_t ipV4;
ipV4.Ip = (_u32)SL_IPV4_VAL(10,1,1,201); /* IP address */
ipV4.IpMask = (_u32)SL_IPV4_VAL(255,255,255,0); /* Subnet mask */
ipV4.IpGateway = (_u32)SL_IPV4_VAL(10,1,1,1); /* Default gateway address */
ipV4.IpDnsServer = (_u32)SL_IPV4_VAL(8,16,32,64); /* _u32 DNS server address */
Status = sl_NetCfgSet(SL_NETCFG_IPV4_AP_ADDR_MODE,SL_NETCFG_ADDR_STATIC,sizeof(SlNetCfgIpV4Args_t),(_u8 *)&ipV4);
if( Status )
{
/* error */
}
/* restart the device */
Status = sl_Stop(0);
Role = sl_Start(NULL,NULL,NULL);