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:
82:055dcfcf9dcc
Parent:
81:3966a5c17037
Child:
84:a05edb010176
--- a/MDM.cpp	Wed May 28 07:09:38 2014 +0000
+++ b/MDM.cpp	Wed May 28 07:14:21 2014 +0000
@@ -558,7 +558,7 @@
                     INFO("Start device over-the-air activation (this can take a few minutes)\r\n");
                     sendFormated("AT+CDV=*22899\r\n");
                     i = 1;
-                    if (RESP_OK != waitFinalResp(_cbUACTIND, &i, 120*1000) || (i == 1)) {
+                    if ((RESP_OK != waitFinalResp(_cbUACTIND, &i, 120*1000)) || (i == 1)) {
                         ERROR("Device over-the-air activation failed\r\n");
                         return false;
                     }
@@ -567,7 +567,7 @@
                     INFO("Start PRL over-the-air update (this can take a few minutes)\r\n");
                     sendFormated("AT+CDV=*22891\r\n");
                     i = 1;
-                    if (RESP_OK != waitFinalResp(_cbUACTIND, &i, 120*1000) || (i == 1)) {
+                    if ((RESP_OK != waitFinalResp(_cbUACTIND, &i, 120*1000)) || (i == 1)) {
                         ERROR("PRL over-the-air update failed\r\n");
                         return false;
                     }
@@ -646,7 +646,9 @@
 int MDMParser::_cbUACTIND(int type, const char* buf, int len, int* i)
 {
     if ((type == TYPE_PLUS) && i){
-        if (sscanf(buf, "\r\n+UACTIND: %d", i) == 1) {
+        int a;
+        if (sscanf(buf, "\r\n+UACTIND: %d", &a) == 1) {
+            *i = a;
         }
     }
     return WAIT;