ublox-at-cellular-interface-ext

Dependencies:   ublox-at-cellular-interface

Revision:
30:da746bc48735
Parent:
27:12b47e78f601
Child:
34:4f08b9dd8d03
--- 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();