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.

Files at this revision

API Documentation at this revision

Comitter:
mazgch
Date:
Sat Sep 13 16:05:07 2014 +0000
Parent:
106:18aeacdae391
Child:
109:327d209a8ab9
Commit message:
improve traces

Changed in this revision

MDM.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MDM.cpp	Tue Aug 12 08:43:15 2014 +0000
+++ b/MDM.cpp	Sat Sep 13 16:05:07 2014 +0000
@@ -945,8 +945,8 @@
 {
     bool ok = false;
     LOCK();
-    TRACE("socketIsConnected(%d)\r\n", socket);
     ok = ISSOCKET(socket) && _sockets[socket].connected;
+    TRACE("socketIsConnected(%d) %s\r\n", socket, ok?"yes":"no");
     UNLOCK();
     return ok;
 }
@@ -1122,9 +1122,12 @@
             }
         }
         UNLOCK();
-        if (!ok)
+        if (!ok) {
+            TRACE("socketRecv: ERROR\r\n");
             return SOCKET_ERROR;
+        }
     }
+    TRACE("socketRecv: %d \"%*s\"\r\n", cnt, cnt, buf-cnt);
     return cnt;
 }
 
@@ -1182,11 +1185,14 @@
             }
         }
         UNLOCK();
-        if (!ok)
+        if (!ok) {
+            TRACE("socketRecv: ERROR\r\n");
             return SOCKET_ERROR;
+        }
     }
     timer.stop();
     timer.reset();
+    TRACE("socketRecv: %d \"%*s\"\r\n", cnt, cnt, buf-cnt);
     return cnt;
 }