This class adds HTTP, FTP and CellLocate client support for u-blox modules for the C027 and C030 boards (excepting the C030 N2xx flavour) from mbed 5.5 onwards. The HTTP, FTP and CellLocate operations are all hosted on the module, minimizing RAM consumption in the mbed MCU. It also sub-classes ublox-cellular-driver-gen to bring in SMS, USSD and modem file system support if you need to use these functions at the same time as the cellular interface.

Dependencies:   ublox-at-cellular-interface

Dependents:   example-ublox-at-cellular-interface-ext HelloMQTT ublox_new_driver_test example-ublox-at-cellular-interface-ext ... more

Files at this revision

API Documentation at this revision

Comitter:
fahimalavi
Date:
Fri Jun 26 11:33:47 2020 +0500
Parent:
36:5392f412d2b0
Commit message:
Reverting wrong commit to branch

Changed in this revision

UbloxATCellularInterfaceExt.cpp Show annotated file Show diff for this revision Revisions of this file
ublox-at-cellular-interface.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 5392f412d2b0 -r 1874c0d2c70e UbloxATCellularInterfaceExt.cpp
--- a/UbloxATCellularInterfaceExt.cpp	Fri Jun 26 10:32:02 2020 +0500
+++ b/UbloxATCellularInterfaceExt.cpp	Fri Jun 26 11:33:47 2020 +0500
@@ -565,14 +565,10 @@
     bool success = false;
     int httpInParNum = 0;
     SocketAddress address;
-    int at_timeout;
 
     debug_if(_debug_trace_on, "httpSetPar(%d, %d, \"%s\")\n", httpProfile, httpOpCode, httpInPar);
     if (IS_PROFILE(httpProfile)) {
         LOCK();
-        at_timeout = _at_timeout;
-        at_set_timeout(60000);
-        UNLOCK();
 
         switch(httpOpCode) {
             case HTTP_IP_ADDRESS:   // 0
@@ -611,8 +607,7 @@
                 debug_if(_debug_trace_on, "httpSetPar: unknown httpOpCode %d\n", httpOpCode);
                 break;
         }
-        LOCK();
-        at_set_timeout(at_timeout);
+
         UNLOCK();
     }
 
@@ -639,7 +634,6 @@
     if (IS_PROFILE(httpProfile)) {
         LOCK();
         at_timeout = _at_timeout; // Has to be inside LOCK()s
-        UNLOCK();
 
         if (rspFile == NULL) {
             sprintf(defaultFilename + sizeof (defaultFilename) - 2, "%1d", httpProfile);
@@ -669,11 +663,6 @@
                             _at->recv("OK");
                 break;
             case HTTP_POST_FILE:
-#if 1 // For SARA-R5
-                LOCK();
-                at_set_timeout(180*1000);
-                UNLOCK();
-#endif
                 // In this case the parameter sendStr is a filename
                 if (httpContentType != 6) {
                     atSuccess = _at->send("AT+UHTTPC=%d,%d,\"%s\",\"%s\",\"%s\",%d",
@@ -689,11 +678,6 @@
                 }
                 break;
             case HTTP_POST_DATA:
-#if 1 // For SARA-R5
-                LOCK();
-                at_set_timeout(180*1000);
-                UNLOCK();
-#endif
                 // In this case the parameter sendStr is a string containing data
                 if (httpContentType != 6) {
                     atSuccess = _at->send("AT+UHTTPC=%d,%d,\"%s\",\"%s\",\"%s\",%d",
@@ -717,9 +701,7 @@
             Timer timer;
             int read_length = 0;
 
-            LOCK();
             at_set_timeout(1000);
-            UNLOCK();
             _httpProfiles[httpProfile].pending = true;
             _httpProfiles[httpProfile].result = -1;
 
@@ -763,14 +745,15 @@
             }
             timer.stop();
 
-            LOCK();
             at_set_timeout(at_timeout);
-            UNLOCK();
 
             if (!success) {
                 debug_if(_debug_trace_on, "%s: ERROR\n", getHttpCmd(httpCmd));
             }
+
         }
+
+        UNLOCK();
     }
 
     return success ? NULL : &(_httpProfiles[httpProfile].httpError);
diff -r 5392f412d2b0 -r 1874c0d2c70e ublox-at-cellular-interface.lib
--- a/ublox-at-cellular-interface.lib	Fri Jun 26 10:32:02 2020 +0500
+++ b/ublox-at-cellular-interface.lib	Fri Jun 26 11:33:47 2020 +0500
@@ -1,1 +1,1 @@
-https://os.mbed.com/users/fahimalavi/code/ublox-at-cellular-interface-SARA-R5/
+https://developer.mbed.org/teams/ublox/code/ublox-at-cellular-interface/#69998003d95a