Freedman v2
Fork of WizFi250Interface by
Diff: WizFi250/WizFi250_at.cpp
- Revision:
- 17:2a20f54f2929
- Parent:
- 11:e52b91d1a5d5
diff -r 8c69e246be54 -r 2a20f54f2929 WizFi250/WizFi250_at.cpp --- a/WizFi250/WizFi250_at.cpp Thu Jul 30 08:13:57 2015 +0000 +++ b/WizFi250/WizFi250_at.cpp Thu Jul 30 11:12:06 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) ) @@ -299,7 +316,7 @@ char cmd[CFG_CMD_SIZE]; int resp; - sprintf(cmd,"AT+FDNS=%s,1000",host); + sprintf(cmd,"AT+FDNS=%s,3000",host); resp = sendCommand(cmd, RES_FDNS); WIZ_DBG("%s",_state.resolv);