Hello:
I need to change the IP address (while in AP mode) of my CC3220 from the default of 10.123.45.1 to 192.168.5.10 to match that of a windows app to send data to it.
I used the following code to change the IP address:
ipV4.Ip = (_u32)SL_IPV4_VAL(192, 168, 5, 10); // _u32 IP address
ipV4.IpMask = (_u32)SL_IPV4_VAL(255, 255, 255, 0); // _u32 Subnet mask for this AP/P2P
ipV4.IpGateway = (_u32)SL_IPV4_VAL(192, 168, 5, 10); // _u32 Default gateway address
ipV4.IpDnsServer = (_u32)SL_IPV4_VAL(192, 168, 5, 10); // _u32 DNS server address
sl_NetCfgSet(SL_NETCFG_IPV4_AP_ADDR_MODE,SL_NETCFG_ADDR_STATIC,sizeof(SlNetCfgIpV4Args_t),(_u8 *)&ipV4);
sl_Stop(0);
sl_Start(NULL,NULL,NULL);
It appears that the change did occur but, when I connect to it with my laptop, The SL_NETAPP_EVENT_DHCPV4_LEASED event does not occur and I cannot view the embedded page on the CC3220. Also, I cannot send any data to the 192.168.5.10 IP address.
Previously, when the IP address was set to the default of 10.123.45.1, I would always see "IP Leased to Client" diagnostic message (meaning the SL_NETAPP_EVENT_DHCPV4_LEASED event did occur and it indicated that the address 10.123.45.2 was leased to client) and I can view the embedded page and use a windows app to send data to 10.123.45.1, no problem.
(NOTE: I went back and re-ran the above functions to change the IP address back to the default and everything runs just fine)
Do I need to run any other functions after I change the IP address?
Does the default IP address need to be "released" or something along those lines in order for the new one to take effect?
Thank you in advance....