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:
54:7ba8e4c218e2
Parent:
52:8071747a7cb3
Child:
57:869bd35f44cc
--- a/MDM.h	Mon May 12 07:39:29 2014 +0000
+++ b/MDM.h	Mon May 12 13:00:27 2014 +0000
@@ -56,8 +56,11 @@
         Reg reg;        //!< Registration Status
         AcT act;        //!< Access Technology
         int rssi;       //!< Received Signal Strength Indication (in dBm, range -113..-53)
+        int ber;        //!< Bit Error Rate (BER), see 3GPP TS 45.008 [20] subclause 8.2.4
         char opr[16+1]; //!< Operator Name
         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)
     } NetStatus;
     //! An IP v4 address
     typedef uint32_t IP;
@@ -258,6 +261,28 @@
     bool ussdCommand(const char* cmd, char* buf);
     
     // ----------------------------------------------------------------
+    // DUMP status to standard out (printf)
+    // ----------------------------------------------------------------
+    
+    /** dump the device status to stdout using printf
+        \param status the status to convert to textual form, 
+               unavailable fields are ommited (not printed)
+    */
+    static void dumpDevStatus(MDMParser::DevStatus *status);
+
+    /** dump the network status to stdout using printf
+        \param status the status to convert to textual form, 
+               unavailable fields are ommited (not printed)
+    */
+    static void dumpNetStatus(MDMParser::NetStatus *status);
+
+    /** dump the ip address to stdout using printf
+        \param ip the ip to convert to textual form, 
+               unavailable fields are ommited (not printed)
+    */
+    static void dumpIp(MDMParser::IP ip);
+    
+    // ----------------------------------------------------------------
     // Parseing
     // ----------------------------------------------------------------
     
@@ -391,7 +416,7 @@
     static int _cbCPIN(int type, const char* buf, int len, Sim* sim);
     static int _cbCCID(int type, const char* buf, int len, char* ccid);
     // network 
-    static int _cbCSQ(int type, const char* buf, int len, int* rssi);
+    static int _cbCSQ(int type, const char* buf, int len, NetStatus* status);
     static int _cbCOPS(int type, const char* buf, int len, NetStatus* status);
     static int _cbCNUM(int type, const char* buf, int len, char* num);
     static int _cbCGATT(int type, const char* buf, int len, int* state);