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:
51:e7b81c31baec
Parent:
44:9d12223b78ff
Child:
52:8071747a7cb3
diff -r d76aece8038f -r e7b81c31baec MDM.h
--- a/MDM.h	Fri May 09 19:35:18 2014 +0000
+++ b/MDM.h	Mon May 12 07:09:31 2014 +0000
@@ -261,28 +261,31 @@
     // Parseing
     // ----------------------------------------------------------------
     
-    // waitFinalResp Responses
-    #define NOT_FOUND    0
-    #define WAIT        -1 // TIMEOUT
-    #define OK          -2 
-    #define ERROR       -3
-    #define PROMPT      -4
+    enum { 
+        // waitFinalResp Responses
+        NOT_FOUND   =  0,
+        WAIT        = -1, // TIMEOUT
+        OK          = -2, 
+        ERROR       = -3,
+        PROMPT      = -4,
     
-    // getLine Responses
-    #define LENGTH(x)  (x & 0x00FFFF)
-    #define TYPE(x)    (x & 0xFF0000)
-    #define TYPE_UNKNOWN    0x000000
-    #define TYPE_OK         0x110000
-    #define TYPE_ERROR      0x120000
-    #define TYPE_RING       0x210000
-    #define TYPE_CONNECT    0x220000
-    #define TYPE_NOCARRIER  0x230000
-    #define TYPE_NODIALTONE 0x240000
-    #define TYPE_BUSY       0x250000
-    #define TYPE_NOANSWER   0x260000
-    #define TYPE_PROMPT     0x300000
-    #define TYPE_PLUS       0x400000
-    #define TYPE_TEXT       0x500000
+        // getLine Responses
+        #define LENGTH(x)  (x & 0x00FFFF) //!< extract/mask the length
+        #define TYPE(x)    (x & 0xFF0000) //!< extract/mask the type
+        
+        TYPE_UNKNOWN    = 0x000000,
+        TYPE_OK         = 0x110000,
+        TYPE_ERROR      = 0x120000,
+        TYPE_RING       = 0x210000,
+        TYPE_CONNECT    = 0x220000,
+        TYPE_NOCARRIER  = 0x230000,
+        TYPE_NODIALTONE = 0x240000,
+        TYPE_BUSY       = 0x250000,
+        TYPE_NOANSWER   = 0x260000,
+        TYPE_PROMPT     = 0x300000,
+        TYPE_PLUS       = 0x400000,
+        TYPE_TEXT       = 0x500000
+    };
     
     /** Get a line from the physical interface. This function need 
         to be implemented in a inherited class. Usually just calls