AT Parser and bufferedSerial based SPWF library

Dependencies:   ATParser

Dependents:   X_NUCLEO_IDW01M1v2

Fork of SPWF01SA by ST Expansion SW Team

Revision:
4:042d5b9bb6e7
Parent:
3:2af9df1068a5
Child:
5:f17d6351e942
--- a/SPWFSA01.cpp	Thu Jun 30 08:25:26 2016 +0000
+++ b/SPWFSA01.cpp	Thu Jun 30 08:42:47 2016 +0000
@@ -247,8 +247,9 @@
                 && _parser.recv("OK"))
                 break;
             //TODO:implement time-out functionality in case of no response
+            //if(timeout) return false;
         }
-    printf("\r\nsock id = %d\r\n", *id);
+    //printf("\r\nsock id = %d\r\n", *id);
 
     return true;
 }
@@ -285,9 +286,9 @@
 
 bool SPWFSA01::close(int id)
 {
-    //May take a second try if device is busy
+    //May take a second try if device is busy or error is returned
     for (unsigned i = 0; i < 2; i++) {
-        if (_parser.send("AT+CIPCLOSE=%d", id)
+        if (_parser.send("AT+S.SOCKC=%d", id)
             && _parser.recv("OK")) {
             return true;
         }