微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI WIFI设计交流 > cc3200 sta 模式是否支持使用静态ip去连接AP

cc3200 sta 模式是否支持使用静态ip去连接AP

时间:10-02 整理:3721RD 点击:

cc3200 sta 模式是否支持使用静态ip去连接AP

这个在论坛已有回复,请看这边: http://e2e.ti.com/support/wireless_connectivity/f/968/t/384853.aspx

\code
SL_IPV4_STA_P2P_CL_STATIC_ENABLE:

Setting a static IP address to the device working in STA mode or P2P client.
The IP address will be stored in the FileSystem.
In order to disable the static IP and get the address assigned from DHCP one should use SL_STA_P2P_CL_IPV4_DHCP_SET

SlNetCfgIpV4Args_t ipV4;
ipV4.ipV4 = (_u32)SL_IPV4_VAL(10,1,1,201); // _u32 IP address
ipV4.ipV4Mask = (_u32)SL_IPV4_VAL(255,255,255,0); // _u32 Subnet mask for this STA/P2P
ipV4.ipV4Gateway = (_u32)SL_IPV4_VAL(10,1,1,1); // _u32 Default gateway address
ipV4.ipV4DnsServer = (_u32)SL_IPV4_VAL(8,16,32,64); // _u32 DNS server address

sl_NetCfgSet(SL_IPV4_STA_P2P_CL_STATIC_ENABLE,IPCONFIG_MODE_ENABLE_IPV4,sizeof(SlNetCfgIpV4Args_t),(_u8 *)&ipV4);
sl_Stop(0);
sl_Start(NULL,NULL,NULL);
\endcode

您好 请问一下 在哪儿设置

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top