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

Revision:
28:4427f2e6bbab
Parent:
20:737d307fd4d6
Child:
30:da746bc48735
--- a/TESTS/unit_tests/http/main.cpp	Mon Aug 19 12:25:22 2019 +0500
+++ b/TESTS/unit_tests/http/main.cpp	Mon Aug 26 16:55:43 2019 +0500
@@ -223,9 +223,10 @@
     pDriver->httpSetTimeout(profile, HTTP_TIMEOUT);
 
     // Set up the server to talk to and TLS, using the IP address this time just for variety
-    TEST_ASSERT(pDriver->gethostbyname("amazon.com", &address) == 0);
+    TEST_ASSERT(pDriver->gethostbyname("www.amazon.com", &address) == 0);
     TEST_ASSERT(pDriver->httpSetPar(profile, UbloxATCellularInterfaceExt::HTTP_IP_ADDRESS, address.get_ip_address()));
     TEST_ASSERT(pDriver->httpSetPar(profile, UbloxATCellularInterfaceExt::HTTP_SECURE, "1"));
+    TEST_ASSERT(pDriver->httpSetPar(profile, UbloxATCellularInterfaceExt::HTTP_REQ_HEADER, "0:Host:www.amazon.com"));
 
     // Check HTTP get request
     memset(buf, 0, sizeof (buf));
@@ -235,7 +236,7 @@
                                      buf, sizeof (buf)) == NULL);
     tr_debug("Received: %s", buf);
     // This is what amazon.com returns if TLS is set
-    TEST_ASSERT(strstr(buf, "503 Service Temporarily Unavailable") != NULL);
+    TEST_ASSERT(strstr(buf, "HTTP/1.1 200 OK") != NULL);
 
     // Reset the profile and check that this now fails
     TEST_ASSERT(pDriver->httpResetProfile(profile));
@@ -247,7 +248,7 @@
                                      buf, sizeof (buf)) == NULL);
     tr_debug("Received: %s", buf);
     // This is what amazon.com returns if TLS is NOT set
-    TEST_ASSERT(strstr(buf, "301 Moved Permanently") != NULL);
+    TEST_ASSERT(strstr(buf, "HTTP/1.1 403 Forbidden") != NULL);
 
     TEST_ASSERT(pDriver->httpFreeProfile(profile));
     TEST_ASSERT(pDriver->disconnect() == 0);