support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.

Dependents:   HTTPClient_Cellular_HelloWorld Cellular_HelloMQTT MbedSmartRestMain Car_Bon_car_module ... more

This library is intended to be used with u-blox products such as the C027 or a shield with u-blox cellular and GPS modules like the cellular and positioning shield from Embedded Artist.

For 2G/GSM and 3G/UMTS you need to:

  • have a SIM card and know its PIN number
  • need to know you network operators APN setting These setting should be passed to the connect or init and join functions. You can also extend the APN database in MDMAPN.h.

For CDMA products you need to make sure that you have provisioned and activated the modem with either Sprint or Verizon.

Revision:
134:2fbd5723e063
Parent:
133:57b208dd96fb
Child:
135:cbccf4052d45
--- a/MDM.h	Thu Nov 26 09:42:01 2015 +0000
+++ b/MDM.h	Tue Jan 12 08:37:29 2016 +0000
@@ -36,9 +36,11 @@
                    DEV_SARA_G35, DEV_LISA_U2, DEV_LISA_U2_03S, DEV_LISA_C2, 
                    DEV_SARA_U2, DEV_LEON_G2, DEV_TOBY_L2, DEV_MPCI_L2 } Dev; 
     //! SIM Status
-    typedef enum { SIM_UNKNOWN, SIM_MISSING, SIM_PIN, SIM_READY } Sim;
+    typedef enum { SIM_UNKNOWN, SIM_MISSING, SIM_PIN, SIM_PUK, SIM_READY, WRONG_PIN } Sim;
     //! SIM Status
     typedef enum { LPM_DISABLED, LPM_ENABLED, LPM_ACTIVE } Lpm; 
+    //! COPS status
+    typedef enum { COPS_UNKOWN, COPS_AUTOMATIC_REG, COPS_MANUAL_REG, COPS_DISABLED_REG} CopsMode;
     //! Device status
     typedef struct { 
         Dev dev;            //!< Device Type
@@ -68,6 +70,7 @@
         char num[32];   //!< Mobile Directory Number
         unsigned short lac;  //!< location area code in hexadecimal format (2 bytes in hex)
         unsigned int ci;     //!< Cell ID in hexadecimal format (2 to 4 bytes in hex)
+        CopsMode regStatus;    //!< Cops mode
     } NetStatus;
    //! Cell Locate Data
    typedef struct {
@@ -452,6 +455,7 @@
         RESP_OK       = -2, 
         RESP_ERROR    = -3,
         RESP_PROMPT   = -4,
+        RESP_ERROR_CME= -5,
     
         // getLine Responses
         #define LENGTH(x)  (x & 0x00FFFF) //!< extract/mask the length
@@ -460,6 +464,7 @@
         TYPE_UNKNOWN    = 0x000000,
         TYPE_OK         = 0x110000,
         TYPE_ERROR      = 0x120000,
+        TYPE_ERROR_CME  = 0x130000,
         TYPE_RING       = 0x210000,
         TYPE_CONNECT    = 0x220000,
         TYPE_NOCARRIER  = 0x230000,