Own fork of C027_Support

Dependents:   MbedSmartRestMain MbedSmartRestMain

Fork of C027_Support by u-blox

Files at this revision

API Documentation at this revision

Comitter:
mazgch
Date:
Wed Apr 09 13:51:26 2014 +0000
Parent:
32:8f12ac182bbb
Child:
34:3b3b7807c0c3
Commit message:
fix parsing in C200 case

Changed in this revision

MDM.cpp Show annotated file Show diff for this revision Revisions of this file
MDM.h Show annotated file Show diff for this revision Revisions of this file
--- a/MDM.cpp	Wed Apr 09 13:03:48 2014 +0000
+++ b/MDM.cpp	Wed Apr 09 13:51:26 2014 +0000
@@ -244,7 +244,7 @@
             return false;
         // Return the pseudo ESN or MEID
         sendFormated("AT+GSN\r\n");
-        if (OK != waitFinalResp(_cbString, _dev.imei))
+        if (OK != waitFinalResp(_cbString, _dev.meid))
             return false;
     } else {
         // disable flow control
@@ -384,7 +384,7 @@
         if (OK != waitFinalResp(_cbString, _net.num))
             return false;
         // check if we have a Mobile Directory Number
-        if (memcmp(_net.num, "0000", 4) == 0);
+        if (memcmp(_net.num, "0000", 4) == 0)
             return false;
         // get the the Network access identifier string
         char nai[64];
--- a/MDM.h	Wed Apr 09 13:03:48 2014 +0000
+++ b/MDM.h	Wed Apr 09 13:51:26 2014 +0000
@@ -25,23 +25,30 @@
     // Types 
     // ----------------------------------------------------------------
     
-    //! MT models
-    typedef enum { DEV_UNKNOWN, DEV_SARA_G350, DEV_LISA_U200, DEV_LISA_C200 } Dev; 
-    //! SIM Status
-    typedef enum { SIM_UNKNOWN, SIM_PIN, SIM_READY } Sim; 
-    //! Device status
-    typedef struct { Dev dev; Sim sim; char ccid[20]; char imsi[16]; char imei[16]; 
-                     char manu[16]; char model[16]; char ver[16]; } DevStatus;
-    //! Network Registration Status
-    typedef enum { REG_UNKNOWN, REG_DENIED, REG_NONE, REG_HOME, REG_ROAMING } Reg; 
-    // Access Technology
-    typedef enum { ACT_UNKNOWN, ACT_GSM, ACT_EDGE, ACT_UTRAN, ACT_CDMA } AcT; 
-    // Network Status
-    typedef struct { Reg reg; AcT act; int rssi; char opr[17]; char num[20]; } NetStatus;
-    //! An IP address
-    typedef uint32_t IP; 
-    //! No IP address
-    #define NOIP ((MDMParser::IP)0)
+    typedef enum { DEV_UNKNOWN, DEV_SARA_G350, DEV_LISA_U200, DEV_LISA_C200 } Dev; //!< MT Device Types 
+    typedef enum { SIM_UNKNOWN, SIM_PIN, SIM_READY } Sim; //!< SIM Status
+    typedef struct { 
+        Dev dev;        //!< Device Type
+        Sim sim;        //!< SIM Card Status
+        char ccid[20];  //!< Integrated Circuit Card ID
+        char imsi[16];  //!< International Mobile Station Identity
+        char imei[16];  //!< International Mobile Equipment Identity
+        char meid[20];  //!< Mobile Equipment IDentifier
+        char manu[16];  //!< Manufacturer
+        char model[16]; //!< Model Name LISA-U200, LISA-C200 or SARA-G350
+        char ver[16];   //!< Software Version
+    } DevStatus;        //!< Device status
+    typedef enum { REG_UNKNOWN, REG_DENIED, REG_NONE, REG_HOME, REG_ROAMING } Reg; //!< Registration Status
+    typedef enum { ACT_UNKNOWN, ACT_GSM, ACT_EDGE, ACT_UTRAN, ACT_CDMA } AcT; //!< Access Technology
+    typedef struct { 
+        Reg reg;      //!< Registration Status
+        AcT act;      //!< Access Technology
+        int rssi;     //!< Received Signal Strength Indication (in dBm, range -113..-53)
+        char opr[17]; //!< Operator Name
+        char num[20]; //!< Mobile Directory Number
+    } NetStatus;      //!< Network Status
+    typedef uint32_t IP; //!< An IP address
+    #define NOIP ((MDMParser::IP)0) //!< No IP address
     // ip number formating and conversion
     #define IPSTR           "%d.%d.%d.%d"
     #define IPNUM(ip)       ((ip)>>24)&0xff, \