Connect Wi-Fi

Dependencies:   mbed

Revision:
2:6738db3eb2ed
Parent:
1:c0fbff97b740
Child:
3:e1042768703b
diff -r c0fbff97b740 -r 6738db3eb2ed main.cpp
--- a/main.cpp	Sat Dec 09 20:43:11 2017 +0000
+++ b/main.cpp	Sat Dec 09 22:20:18 2017 +0000
@@ -36,9 +36,26 @@
     esp.Join("Mind", "00000000"); // Replace MyAP and MyPasswd with your SSID and password
     esp.RcvReply(rcv, 1000);
     pc.printf("%s", rcv);
-    wait(8);
+    wait(2);
+    
+    pc.printf("Check Connect\r\n");
+    esp.Check(rcv);
+    esp.RcvReply(rcv, 200);
+    pc.printf("%s", rcv);
     
     pc.printf("Getting IP\r\n");
     esp.GetIP(rcv);
     pc.printf("%s", rcv);
+    
+    pc.printf("Setting multiple connections\r\n");
+    esp.SetMultiple();
+    esp.RcvReply(rcv, 1000);
+    pc.printf("%s", rcv);
+    wait(4);
+    
+    pc.printf("Start server mode on port 81\r\n");
+    esp.StartServerMode(9999);
+    esp.RcvReply(rcv, 1000);
+    pc.printf("%s", rcv);
+    wait(4);
 }
\ No newline at end of file