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:
108:554585370b4a
Parent:
106:358972176b89
Child:
113:7238f9b8db17
--- a/wifi/Wifi.cpp	Tue Dec 31 16:34:22 2013 +0000
+++ b/wifi/Wifi.cpp	Tue Dec 31 17:30:45 2013 +0000
@@ -411,6 +411,12 @@
 
 Code Wifi::setDeviceIP(std::string address)
 {
+    //Check for command mode
+    if(!setCmdMode(true)) {
+        printf("[ERROR] Failed to set IP due to mode issue\r\n");
+        return FAILURE;
+    }
+    
     //Set to DHCP mode
     if(address.compare("DHCP") == 0) {
         return sendBasicCommand("set ip dhcp 1", 1000);