working code

Dependencies:   mbed

Fork of Working_Client_Code by iX

Revision:
4:d205b6061e66
Parent:
3:c99ef21cb4b3
Child:
5:d25327fb7a14
--- a/main.cpp	Thu Jun 09 09:55:10 2016 +0000
+++ b/main.cpp	Thu Jun 09 10:51:33 2016 +0000
@@ -204,8 +204,8 @@
                     resp=OKResponse(buffer,"OK");
                     if (resp!=NULL) {
                        INFO("Ready");
-                       dev.printf("AT+CIPSERVER= 1,6060\r\n"); 
-                       //dev.printf("AT+CIPSTART=0,\"TCP\",192.168.1.8, 6060");
+                       //dev.printf("AT+CIPSERVER= 1,6060\r\n"); 
+                       dev.printf("AT+CIPSTART=0,\"TCP\",\"192.168.1.8\",6060\r\n");
                        state++;
                     }
 
@@ -215,7 +215,7 @@
                     if (resp!=NULL) {
                        INFO("Ready");
                         //dev.printf("AT+CIPSERVER= 1,6060"); 
-                       //dev.printf("AT+CIPSEND= 0,10");  //10 = length of string being sent
+                       dev.printf("AT+CIPSEND=0,10\r\n");  //10 = length of string being sent
                        state++;
                     }
                     pc.printf("%s\n\r",buffer);
@@ -224,15 +224,7 @@
 
             }
 
-            case 10: { resp=OKResponse(buffer,"OK");
-                    if (resp!=NULL) {
-                       INFO("Ready");
-                      // dev.printf("AT+CIPSERVER= 1[,6060]");  
-                       state++;
-                    }
-
-                     break;
-                     }
+          
         }            
         }
         __WFI();