ZHCU938C May 2018 – January 2021 CC3100 , CC3100MOD , CC3200 , CC3200MOD
用户必须设置 AP IP 参数,具体来说就是 IP 地址、网关地址、DNS 地址和网络掩码。
若要设置 IP 地址调用:
sl_NetCfgSet(unsigned char ConfigId ,
unsigned char ConfigOpt,
unsigned char ConfigLen,
unsigned char *pValues)
此示例显示如何将 IP、网关和 DNS 地址配置为 9.8.7.6,将子网设置为 255.255.255.0:
_NetCfgIpV4Args_t ipV4;
ipV4.ipV4 = 0x09080706;
ipV4.ipV4Mask = 0xFFFFFF00;
ipV4.ipV4Gateway = 0x09080706;
ipV4.ipV4DnsServer = 0x09080706;
sl_NetCfgSet(SL_IPV4_AP_P2P_GO_STATIC_ENABLE,
1
,sizeof(_NetCfgIpV4Args_t),
(unsigned char *)&ipV4);
更改在复位后生效。
默认值:
|
|
|
|
|
|
|
|
|
|
|
|