Base class for the u-blox N2xx modems. Cannot be used standalone, only inherited by classes that do properly useful stuff. Or, to put it another way, if you are using any of the classes ending with 'n2xx', you will need this class also. Note: requires the N211 module firmware to be at least 06.57 A01.02.

Dependents:   example-ublox-cellular-interface HelloMQTT example-ublox-cellular-interface_r410M example-ublox-mbed-client ... more

Revision:
6:377997119ef1
Parent:
5:66451d314225
Child:
7:f1c3373e4ff5
--- a/UbloxCellularBaseN2xx.cpp	Thu Sep 28 15:34:08 2017 +0100
+++ b/UbloxCellularBaseN2xx.cpp	Mon Oct 30 14:44:36 2017 +0000
@@ -397,58 +397,14 @@
 
 bool UbloxCellularBaseN2xx::get_meid()
 {
-    // *** NOT IMPLEMENTED 
+    // *** NOT IMPLEMENTED on SARA-N2XX
     return false;
-    
-    bool success;
-    LOCK();
-
-    MBED_ASSERT(_at != NULL);
-    
-    // Mobile equipment identifier 
-    // AT Command Manual UBX-13002752, section 4.8
-    success = _at->send("AT+GSN") && _at->recv("%18[^\n]\nOK\n", _dev_info.meid);
-    
-    // tr_info("DevInfo: MEID=%s", _dev_info.meid);
-
-    UNLOCK();
-    return success;
 }
 
 bool UbloxCellularBaseN2xx::set_sms()
 {
-    // *** NOT IMPLEMENTED
-    return false;      
-    
-    bool success = false;
-    char buf[32];
-    LOCK();
-
-    MBED_ASSERT(_at != NULL);
-
-    // Set up SMS format and enable URC
-    // AT Command Manual UBX-13002752, section 11
-    if (_at->send("AT+CMGF=1") && _at->recv("OK")) {
-        tr_debug("SMS in text mode");
-        if (_at->send("AT+CNMI=2,1") && _at->recv("OK")) {
-            tr_debug("SMS URC enabled");
-            // Set to CS preferred since PS preferred doesn't work
-            // on some networks
-            if (_at->send("AT+CGSMS=1") && _at->recv("OK")) {
-                tr_debug("SMS set to CS preferred");
-                success = true;
-                memset (buf, 0, sizeof (buf));
-                if (_at->send("AT+CSCA?") &&
-                    _at->recv("+CSCA: \"%31[^\"]\"", buf) &&
-                    _at->recv("OK")) {
-                    tr_info("SMS Service Centre address is \"%s\"", buf);
-                }
-            }
-        }
-    }
-
-    UNLOCK();
-    return success;
+    // *** NOT IMPLEMENTED on SARA-N2XX
+    return false;
 }
 
 void UbloxCellularBaseN2xx::parser_abort_cb()
@@ -884,32 +840,6 @@
 {
     // *** NOT IMPLEMENTED on SARA-N2XX
     return false;
-
-    bool success = false;
-    LOCK();
-
-    MBED_ASSERT(_at != NULL);
-
-    if (_pin != NULL) {
-        if (_sim_pin_check_enabled && !enableNotDisable) {
-            // Disable the SIM lock
-            if (_at->send("AT+CLCK=\"SC\",0,\"%s\"", _pin) && _at->recv("OK")) {
-                _sim_pin_check_enabled = false;
-                success = true;
-            }
-        } else if (!_sim_pin_check_enabled && enableNotDisable) {
-            // Enable the SIM lock
-            if (_at->send("AT+CLCK=\"SC\",1,\"%s\"", _pin) && _at->recv("OK")) {
-                _sim_pin_check_enabled = true;
-                success = true;
-            }
-        } else {
-            success = true;
-        }
-    }
-
-    UNLOCK();
-    return success;
 }
 
 // Change the pin code for the SIM card.
@@ -917,22 +847,6 @@
 {
     // *** NOT IMPLEMENTED on SARA-N2XX
     return false;
-
-    bool success = false;
-    LOCK();
-
-    MBED_ASSERT(_at != NULL);
-
-    // Change the SIM pin
-    if ((pin != NULL) && (_pin != NULL)) {
-        if (_at->send("AT+CPWD=\"SC\",\"%s\",\"%s\"", _pin, pin) && _at->recv("OK")) {
-            _pin = pin;
-            success = true;
-        }
-    }
-
-    UNLOCK();
-    return success;
 }
 
  // Read up to size bytes from the AT interface up to a newline.