test

Dependencies:   ATParser

Fork of ESP8266 by NetworkSocketAPI

Revision:
20:32e5a5a328e0
Parent:
18:11f2f6bd2e97
Child:
21:1a9b555962b5
--- a/ESP8266.cpp	Mon Feb 22 23:42:40 2016 +0000
+++ b/ESP8266.cpp	Tue Feb 23 01:29:53 2016 -0600
@@ -39,8 +39,14 @@
 
 bool ESP8266::reset(void)
 {
-    return _parser.send("AT+RST")
-        && _parser.recv("OK\r\nready");
+    for (int i = 0; i < 2; i++) {
+        if (_parser.send("AT+RST")
+            && _parser.recv("OK\r\nready")) {
+            return true;
+        }
+    }
+
+    return false;
 }
 
 bool ESP8266::dhcp(bool enabled, int mode)