Cellular library for MTS Socket Modem Arduino Shield devices from Multi-Tech Systems

Dependents:   mtsas mtsas mtsas mtsas

Revision:
41:8b9b5098696f
Parent:
40:ecef43f87c7a
Child:
49:1fc51c53cebf
--- a/Cellular/EasyIP.cpp	Tue Jul 29 19:39:01 2014 +0000
+++ b/Cellular/EasyIP.cpp	Wed Jul 30 20:22:23 2014 +0000
@@ -45,7 +45,7 @@
 
     logDebug("radio type: %s", Cellular::getRadioNames(type).c_str());
     //Turns on the HW flow control, equiv. to AT&K
-    if(sendBasicCommand("AT&K=3", 2000) != MTS_SUCCESS) {
+    if(sendBasicCommand("AT&K3", 2000) != MTS_SUCCESS) {
         logWarning("Failed to set flow control to radio");
     }
     return true;
@@ -352,6 +352,13 @@
         logError("port out of range (0-65535)");
         return false;
     }
+    
+    if(type == MTSMC_EV3) {
+        if(!local_port) {
+            logDebug("Local port set to 1, port 0 not supported for MTSMC_EV3");
+            local_port = 1;
+        }
+    }
 
     //3) Check PPP connection
     if(!isConnected()) {
@@ -705,7 +712,7 @@
     io->txClear();
     
     std::string result;
-    unsigned int timeoutMillis = 20000; //20s
+    unsigned int timeoutMillis = 10000; //time in ms
     const int size_cmd = 3;
     //Attempt to write command
     wait(1.2); //Format for +++ command is 1 second wait, send +++, then another second wait