A library for talking to Multi-Tech's Cellular SocketModem Devices.

Dependents:   M2X_dev axeda_wrapper_dev MTS_M2x_Example1 MTS_Cellular_Connect_Example ... more

Revision:
92:57d4838f9861
Parent:
91:9439ad14d7f0
Child:
96:27bdf4aa3a31
--- a/cellular/Cellular.cpp	Fri Dec 27 20:34:42 2013 +0000
+++ b/cellular/Cellular.cpp	Fri Dec 27 20:56:09 2013 +0000
@@ -782,10 +782,12 @@
     bool started = !echoMode;
     bool done = false;
     do {
-        wait(.1);
-        timer = timer + 100;
+        wait(0.1);
+        timer += 100;
+        
         previous = result.size();
-        int size = io->read(tmp,255);    //1 less than allocated
+        //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) {
             result.append(tmp, size);
         }