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:
66:69072b3c5bca
Parent:
63:42cb563a25bc
Child:
72:d1e943ad6558
--- a/MDM.h	Tue May 13 14:41:03 2014 +0000
+++ b/MDM.h	Tue May 13 15:56:28 2014 +0000
@@ -172,7 +172,7 @@
         \param timeout_ms -1 blocking, else non blocking timeout in ms
         \return 0 if successful or SOCKET_ERROR on failure 
     */
-    bool socketSetBlocking(int socket, unsigned int timeout_ms);
+    bool socketSetBlocking(int socket, int timeout_ms);
     
     /** Write socket data 
         \param socket the socket handle
@@ -324,7 +324,10 @@
         TYPE_NOANSWER   = 0x260000,
         TYPE_PROMPT     = 0x300000,
         TYPE_PLUS       = 0x400000,
-        TYPE_TEXT       = 0x500000
+        TYPE_TEXT       = 0x500000,
+        
+        // special timout constant
+        TIMEOUT_BLOCKING = -1
     };
     
     /** Get a line from the physical interface. This function need 
@@ -457,7 +460,7 @@
     IP          _ip;  //!< assigned ip address
     // management struture for sockets
     typedef enum { SOCK_FREE, SOCK_CREATED, SOCK_CONNECTED } SockState;
-    typedef struct { SockState state; int pending; unsigned int timeout_ms; } SockCtrl;
+    typedef struct { SockState state; int pending; int timeout_ms; } SockCtrl;
     // LISA-C has 6 TCP and 6 UDP sockets starting at index 18
     // LISA-U and SARA-G have 7 sockets starting at index 1
     SockCtrl _sockets[32];