This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请教CC3200静态IP设置问题

Other Parts Discussed in Thread: CC3200

看了网上关于CC3200静态ip设置的帖子,但按其方法还是不能成功。
我们用的是SDK1.5中getting_started_with_wlan_station例子修改。


不知道这段代码到底放在什么地方?
=================================================================================

SlNetCfgIpV4Args_t ipV4;
ipV4.ipV4 = (_u32)SL_IPV4_VAL(192,168,43,10); // _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(192,168,43,1); // _u32 Default gateway address
ipV4.ipV4DnsServer = (_u32)SL_IPV4_VAL(192,168,43,1); // _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);

==================================================================================

e2echina.ti.com/.../575963 中说放在sl_Start调用之后,是void WlanStationMode( void *pvParameters )函数里面lRetVal = sl_Start(0, 0, 0)语句后面?还是static long ConfigureSimpleLinkToDefaultState()函数里面的lRetVal = sl_Start(0, 0, 0)语句后面?

但实际上两者之后我们都分别放过,都是不能设置静态IP。仍然还是动态分配的IP。

“//lRetVal = sl_NetCfgSet(SL_IPV4_STA_P2P_CL_DHCP_ENABLE,1,1,&ucVal);” 这句话也注释掉了。

请高手指点一下,怎么办?