Add a bunch of APNs

Fork of C027_Support by Xinlei Cao

Revision:
50:d76aece8038f
Parent:
48:46ba168127d6
Child:
52:8071747a7cb3
diff -r 8175b2b72d6b -r d76aece8038f MDM.cpp
--- a/MDM.cpp	Fri May 09 17:49:32 2014 +0000
+++ b/MDM.cpp	Fri May 09 19:35:18 2014 +0000
@@ -249,6 +249,16 @@
         sendFormated("AT+GSN\r\n");
         if (OK != waitFinalResp(_cbString, _dev.meid))
             return false;
+#if 0
+        // enable power saving
+        if (_dev.lpm != LPM_DISABLED) {
+             // enable power saving (requires flow control, cts at least)
+            sendFormated("AT+UPSV=1,1280\r\n");
+            if (OK != waitFinalResp())
+                return false;  
+            _dev.lpm = LPM_ACTIVE;
+        }
+#endif
     } else {
         if (_dev.dev == DEV_LISA_U200) {
             // enable the network identification feature 
@@ -302,11 +312,20 @@
         sendFormated("AT+CGSN\r\n");
         if (OK != waitFinalResp(_cbString, _dev.imei))
             return false;
+#if 0
         // Configure New message indication
-        //sendFormated("AT+CNMI=2,1,0,0,0\r\n");
-        //if (OK != waitFinalResp())
-        //    return false;
-            
+        sendFormated("AT+CNMI=2,1,0,0,0\r\n");
+        if (OK != waitFinalResp())
+            return false;
+#endif
+        // enable power saving
+        if (_dev.lpm != LPM_DISABLED) {
+             // enable power saving (requires flow control, cts at least)
+            sendFormated("AT+UPSV=1\r\n");
+            if (OK != waitFinalResp())
+                return false;  
+            _dev.lpm = LPM_ACTIVE;
+        }
     } 
     // Setup SMS in text mode 
     sendFormated("AT+CMGF=1\r\n");
@@ -320,14 +339,6 @@
     sendFormated("AT+CIMI\r\n");
     if (OK != waitFinalResp(_cbString, _dev.imsi))
         return false;
-    // enable power saving
-    if (_dev.lpm != LPM_DISABLED) {
-         // enable power saving (requires flow control, cts at least)
-        sendFormated("AT+UPSV=1\r\n");
-        if (OK != waitFinalResp())
-            return false;  
-        _dev.lpm = LPM_ACTIVE;
-    }
     if (status)
         memcpy(status, &_dev, sizeof(DevStatus));
     return true; 
@@ -483,7 +494,7 @@
     _ip = NOIP;
     if (_dev.dev == DEV_LISA_C200) {
         // TODO: is there something to do here?
-         
+
         //Get local IP address
         sendFormated("AT+CMIP?\r\n");
         if (OK != waitFinalResp(_cbCMIP, &_ip))