Fix for HTTP return status code 1.0 in http_tls

Dependencies:   ublox-at-cellular-interface

Files at this revision

API Documentation at this revision

Comitter:
wajahat.abbas@u-blox.com
Date:
Fri Oct 11 15:35:03 2019 +0500
Parent:
29:ee96265f0867
Child:
31:b85378bb8269
Commit message:
Updated test cases for C030_R41XM

Changed in this revision

TESTS/unit_tests/ftp/main.cpp Show annotated file Show diff for this revision Revisions of this file
TESTS/unit_tests/http/main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/TESTS/unit_tests/ftp/main.cpp	Tue Aug 27 12:32:11 2019 +0500
+++ b/TESTS/unit_tests/ftp/main.cpp	Fri Oct 11 15:35:03 2019 +0500
@@ -211,8 +211,23 @@
     char portString[10];
 
     sprintf(portString, "%d", MBED_CONF_APP_FTP_SERVER_PORT);
-
+#ifdef TARGET_UBLOX_C030_R41XM
+    int mno_profile;
+    if (pDriver->init(MBED_CONF_APP_DEFAULT_PIN) == false) //init can return false if profile set is SW_DEFAULT
+    {
+        TEST_ASSERT(pDriver->get_mno_profile(&mno_profile));
+        if (mno_profile == UbloxATCellularInterface::SW_DEFAULT) {
+            TEST_ASSERT(pDriver->set_mno_profile(UbloxATCellularInterface::STANDARD_EU));
+            TEST_ASSERT(pDriver->reboot_modem());
+            tr_debug("Reboot successful\n");
+            wait_ms(5000);
+        }
+    }
     TEST_ASSERT(pDriver->init(MBED_CONF_APP_DEFAULT_PIN));
+    TEST_ASSERT(pDriver->disable_psm());
+#else
+    TEST_ASSERT(pDriver->init(MBED_CONF_APP_DEFAULT_PIN));
+#endif
 
     // Reset parameters to default to begin with
     pDriver->ftpResetPar();
--- a/TESTS/unit_tests/http/main.cpp	Tue Aug 27 12:32:11 2019 +0500
+++ b/TESTS/unit_tests/http/main.cpp	Fri Oct 11 15:35:03 2019 +0500
@@ -115,7 +115,21 @@
 void test_http_cmd() {
     int profile;
     char * pData;
-
+#ifdef TARGET_UBLOX_C030_R41XM
+    int mno_profile;
+    if (pDriver->init(MBED_CONF_APP_DEFAULT_PIN) == false) //init can return false if profile set is SW_DEFAULT
+    {
+        TEST_ASSERT(pDriver->get_mno_profile(&mno_profile));
+        if (mno_profile == UbloxATCellularInterface::SW_DEFAULT) {
+            TEST_ASSERT(pDriver->set_mno_profile(UbloxATCellularInterface::STANDARD_EU));
+            TEST_ASSERT(pDriver->reboot_modem());
+            tr_debug("Reboot successful\n");
+            wait_ms(5000);
+        }
+    }
+    TEST_ASSERT(pDriver->init(MBED_CONF_APP_DEFAULT_PIN));
+    TEST_ASSERT(pDriver->disable_psm());
+#endif
     TEST_ASSERT(pDriver->connect(MBED_CONF_APP_DEFAULT_PIN, MBED_CONF_APP_APN,
                                  MBED_CONF_APP_USERNAME, MBED_CONF_APP_PASSWORD) == 0);