RC

Dependents:   WizFi250_AP_HelloWorld

Fork of WizFi250Interface by DongEun Koak

Revision:
14:1f5121c5efcd
Parent:
11:e52b91d1a5d5
Child:
16:67cb9c94f534
diff -r 0b8e51d3c0e8 -r 1f5121c5efcd WizFi250/WizFi250_at.cpp
--- a/WizFi250/WizFi250_at.cpp	Fri Jun 26 04:19:01 2015 +0000
+++ b/WizFi250/WizFi250_at.cpp	Tue Jul 14 06:53:34 2015 +0000
@@ -159,6 +159,22 @@
     return sendCommand(cmd);
 }
 
+int WizFi250::cmdWNET(bool is_dhcp)
+{
+    char cmd[CFG_CMD_SIZE];
+
+	if(is_dhcp == true)
+	{
+		sprintf(cmd, "AT+WNET=1");
+	}
+	else
+	{
+		sprintf(cmd, "AT+WNET=0,%s,%s,%s",_state.ip,_state.netmask,_state.gateway);
+	}
+
+    return sendCommand(cmd);
+}
+
 int WizFi250::cmdWSEC(WiFiMode mode, const char *key, const char *sec)
 {
     char cmd[CFG_CMD_SIZE];
@@ -192,6 +208,7 @@
     return 0;
 }
 
+
 int WizFi250::cmdWSTATUS()
 {
     if( sendCommand("AT+WSTATUS", RES_WSTATUS, DEFAULT_WAIT_RESP_TIMEOUT) )