Simple detection for LE910-NA1 modules

Fork of MTS-Cellular by MultiTech

Revision:
51:ffc556ba33f7
Parent:
50:144099030d9b
Child:
52:2cb58398a4f9
--- a/Cellular/Cellular.cpp	Tue Aug 05 15:02:00 2014 +0000
+++ b/Cellular/Cellular.cpp	Tue Aug 05 18:35:22 2014 +0000
@@ -203,8 +203,6 @@
     bool done = false;
     tmr.start();
     do {
-        wait(0.05);
-        
         //Make a non-blocking read call by passing timeout of zero
         int size = io->read(tmp,255,0);    //1 less than allocated (timeout is instant)
         if(size > 0) {
@@ -242,7 +240,17 @@
                         done = true;
                     } 
                 } else if (type == MTSMC_H5_IP || type == MTSMC_EV3_IP || type == MTSMC_C2_IP) {
-                    if (result.find("Ok_Info_") != std::string::npos) {
+                    if (result.find("Ok_Info_WaitingForData") != std::string::npos) {
+                        done = true;
+                    } else if (result.find("Ok_Info_SocketClosed") != std::string::npos) {
+                        done = true;
+                    } else if (result.find("Ok_Info_DataBegin") != std::string::npos) {
+                        done = true;
+                    } else if (result.find("Ok_Info_NoMail") != std::string::npos) {
+                        done = true;
+                    } else if (result.find("Ok_Info_Mail") != std::string::npos) {
+                        done = true;
+                    } else if (result.find("Ok_Info_PPP") != std::string::npos) {
                         done = true;
                     }
                 }