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:
88:135fb4bb7aac
Parent:
85:dd8f4f0d0ca9
Child:
90:3915192f6d7e
--- a/MDM.cpp	Fri Jun 06 09:00:03 2014 +0000
+++ b/MDM.cpp	Fri Jun 06 10:33:13 2014 +0000
@@ -529,13 +529,11 @@
     _net.ci = 0xFFFFFFFF;
     // check registration
     sendFormated("AT+CREG?\r\n");
-    if (RESP_OK != waitFinalResp())
-        return false;
+    waitFinalResp();     // don't fail as service could be not subscribed 
     if (_dev.dev != DEV_LISA_C200) {
         // check PSD registration
         sendFormated("AT+CGREG?\r\n");
-        if (RESP_OK != waitFinalResp())
-            return false;
+        waitFinalResp(); // don't fail as service could be not subscribed 
     }
     if (REG_OK(_net.csd) || REG_OK(_net.psd))
     {
@@ -700,23 +698,8 @@
             bool ok = false;
             // try to lookup the apn settings from our local database by mccmnc
             const char* config = NULL;
-            if (!apn && !username && !password) {
-                char mccmnc[8] = "";
-                config = apndef;
-                sendFormated("AT+UDOPN=0\r\n");
-                if ((RESP_OK == waitFinalResp(_cbUDOPN, mccmnc)) && *mccmnc) {
-                    TRACE("Lookup APN Settings for network \"%s\" from operator \"%s\"\r\n", 
-                            mccmnc, _net.opr);
-                    // many carriers use internet without username and password, os use this as default
-                    // now try to lookup the setting for our table
-                    for (int i = 0; i < sizeof(apnlut)/sizeof(*apnlut); i ++) {
-                        if (strstr(apnlut[i].mccmnc, mccmnc)) {
-                            config = apnlut[i].cfg;
-                            break;
-                        }
-                    }
-                }
-            }
+            if (!apn && !username && !password)
+                config = apnconfig(_dev.imsi);
             
             // Set up the dynamic IP address assignment.
             sendFormated("AT+UPSD=" PROFILE ",7,\"0.0.0.0\"\r\n");