Support for LISA-N101

Fork of C027_Support by u-blox

This is a variant of the C027 driver code for the C027N version, i.e. the one with the Neul/Huawei/u-blox Cellular Internet of Things module on board. The AT command interface for this module is entirely different to the AT interface for the other u-blox modules, hence this fork of the driver. Work is underway to rearchitect the original C027 driver so that a merge can be done.

Revision:
77:55788e619858
Parent:
76:f7c3dd568dae
Child:
78:caf0014375cb
--- a/MDM.cpp	Mon May 19 13:05:41 2014 +0000
+++ b/MDM.cpp	Mon May 19 16:18:29 2014 +0000
@@ -361,10 +361,7 @@
             if ((RESP_OK != ret) && (RESP_ERROR != ret))
                 return false;
             // Enter PIN if needed
-            if (_dev.sim == SIM_MISSING) {
-                ERROR("SIM not inserted\r\n");
-                return false;
-            } else if (_dev.sim == SIM_PIN) {
+            if (_dev.sim == SIM_PIN) {
                 if (!simpin) {
                     ERROR("SIM PIN not available\r\n");
                     return false;
@@ -376,8 +373,11 @@
                 RELAX_MS(1000);
             }
         }
-        if (_dev.sim != SIM_READY)
+        if (_dev.sim != SIM_READY) {
+            if (_dev.sim == SIM_MISSING)
+                ERROR("SIM not inserted\r\n");
             return false;
+        }
         // get the manufacturer
         sendFormated("AT+CGMI\r\n");
         if (RESP_OK != waitFinalResp(_cbString, _dev.manu))