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:
130:5a8af68a46ec
Parent:
127:526003734633
Child:
131:da8f0e1c264a
Child:
134:50e2616ac755
--- a/wifi/Wifi.cpp	Thu Jan 02 20:59:09 2014 +0000
+++ b/wifi/Wifi.cpp	Thu Jan 02 21:46:57 2014 +0000
@@ -17,7 +17,7 @@
         return false;
     }
     instance->io = io;
-    
+
     //Check initial state of command mode
     std::string response = sendCommand("", 1000, ">");
     if(response.find(">") != string::npos) {
@@ -450,6 +450,9 @@
     host_port = 0;
     cmdOn = false;
     wait(10);
+    if(!init(io)) {
+        printf("[ERROR] Failed to reinitialize after reset.\n\r");
+    }
 }
 
 Code Wifi::setDeviceIP(std::string address)