Hi,
I was initially able to get a DHCP IP Address for the CC3220 WiFi chip on my local Network.
However, once I used a Static IP address, I could no longer go back to using DHCP.
The dhcp command "wlanconnect -s ssid-t WPA/WPA2 -p password" worked
Then the static command "wlanconnect -s ssid-t WPA/WPA2 -p password -ip address -gw gateway" also worked
But then the dhcp command "wlanconnect -s ssid-t WPA/WPA2 -p password" no longer worked
(There seems to be a non-volatile setting that needs to be cleared).
I used the code below to reconfigure for DHCP but I get the error:
[WLAN ERROR] Device disconnected from the AP: , BSSID: 0:0:0:0:0:0
---------------------------------------------------------------------------------------
SlNetCfgIpV4Args_t ipV4 = {0}; //clear IP, mask, gateway, DNS server
retVal = sl_NetCfgSet(SL_NETCFG_IPV4_STA_ADDR_MODE,
SL_NETCFG_ADDR_DHCP,
sizeof(SlNetCfgIpV4Args_t),
(uint8_t *)&ipV4);
/* Restart NWP for this configuration */
retVal = sl_Stop(SL_STOP_TIMEOUT);
retVal = sl_Start(0, 0, 0);
--------------------------------------------------------------------------------------------
Is there another setting or call that needs to be made to clear out the Static IP info?
Thanks!