GNSS

Dependents:   ublox-at-cellular-interface-ext

Fork of ublox-at-cellular-interface by u-blox

Files at this revision

API Documentation at this revision

Comitter:
fahim.alavi@u-blox.com
Date:
Mon Feb 18 11:43:58 2019 +0500
Parent:
24:c6592eec499a
Parent:
23:2e8e1c573e18
Child:
26:a16a65a4a06c
Commit message:
sync from remote master

Changed in this revision

UbloxATCellularInterface.cpp Show annotated file Show diff for this revision Revisions of this file
UbloxATCellularInterface.h Show annotated file Show diff for this revision Revisions of this file
--- a/TESTS/unit_tests/default/template_mbed_app.txt	Mon Feb 18 11:42:35 2019 +0500
+++ b/TESTS/unit_tests/default/template_mbed_app.txt	Mon Feb 18 11:43:58 2019 +0500
@@ -67,7 +67,6 @@
     },
     "target_overrides": {
         "*": {
-            "target.features_add": ["COMMON_PAL"],
             "platform.stdio-convert-newlines": true
         }
     }
--- a/UbloxATCellularInterface.cpp	Mon Feb 18 11:42:35 2019 +0500
+++ b/UbloxATCellularInterface.cpp	Mon Feb 18 11:43:58 2019 +0500
@@ -1202,7 +1202,8 @@
 UbloxATCellularInterface::UbloxATCellularInterface(PinName tx,
                                                    PinName rx,
                                                    int baud,
-                                                   bool debug_on)
+                                                   bool debug_on,
+                                                   osPriority priority)
 {
     _sim_pin_check_change_pending = false;
     _sim_pin_check_change_pending_enabled_value = false;
@@ -1233,6 +1234,7 @@
 
     // Start the event handler thread for Rx data
     event_thread.start(callback(this, &UbloxATCellularInterface::handle_event));
+    event_thread.set_priority(priority);
 
     // URC handlers for sockets
     _at->oob("+UUSORD", callback(this, &UbloxATCellularInterface::UUSORD_URC));
@@ -1373,7 +1375,7 @@
     }
 
     // Attempt to establish a connection
-#ifdef TARGET_UBLOX_C030_R410M
+#ifdef TARGET_UBLOX_C030_R41XM
     if (registered) {
 #else
     if (registered && connect_modem_stack()) {
@@ -1388,8 +1390,11 @@
 nsapi_error_t UbloxATCellularInterface::disconnect()
 {
     nsapi_error_t nsapi_error = NSAPI_ERROR_DEVICE_ERROR;
-
+#ifdef TARGET_UBLOX_C030_R41XM
+    if (nwk_deregistration()) {
+#else
     if (disconnect_modem_stack() && nwk_deregistration()) {
+#endif
         nsapi_error = NSAPI_ERROR_OK;
     }
 
@@ -1507,5 +1512,9 @@
     _connection_status_cb = cb;
 }
 
+void UbloxATCellularInterface::set_plmn(const char *plmn) {
+
+}
+
 // End of file
 
--- a/UbloxATCellularInterface.h	Mon Feb 18 11:42:35 2019 +0500
+++ b/UbloxATCellularInterface.h	Mon Feb 18 11:43:58 2019 +0500
@@ -74,7 +74,8 @@
      UbloxATCellularInterface(PinName tx = MDMTXD,
                               PinName rx = MDMRXD,
                               int baud = MBED_CONF_UBLOX_CELL_BAUD_RATE,
-                              bool debug_on = false);
+                              bool debug_on = false,
+                              osPriority priority = osPriorityNormal);
 
      /* Destructor.
       */
@@ -309,6 +310,12 @@
     // bool set_mno_profile(MNOProfile profile = SW_DEFAULT);
 #endif
 
+    /** Set the plmn. PLMN controls to what network device registers.
+     *
+     *  @param plmn     user to force what network to register.
+     */
+    virtual void set_plmn(const char *plmn);
+
 protected:
 
     /** Socket "unused" value.