ublox-at-cellular-interface_tests_pr
Diff: TESTS/unit_tests/dynamic/main.cpp
- Revision:
- 37:b7b17bfa3cdd
- Parent:
- 21:2a500a881a5a
- Child:
- 39:a79ddf9f7096
diff -r 9d48ec522cb4 -r b7b17bfa3cdd TESTS/unit_tests/dynamic/main.cpp --- a/TESTS/unit_tests/dynamic/main.cpp Mon Aug 19 17:36:04 2019 +0500 +++ b/TESTS/unit_tests/dynamic/main.cpp Mon Sep 23 17:18:50 2019 +0500 @@ -221,7 +221,6 @@ // Test that sleep is possible both // before and after running the driver. void test_sleep() { - TEST_ASSERT(sleep_manager_can_deep_sleep() == true); // Create an instance of the cellular interface @@ -232,7 +231,24 @@ interface->connection_status_cb(connection_down_cb); // Use it +#ifdef TARGET_UBLOX_C030_R41XM + int mno_profile; + if (interface->init(MBED_CONF_APP_DEFAULT_PIN) == false) //init can return false if profile set is SW_DEFAULT + { + TEST_ASSERT(interface->get_mno_profile(&mno_profile)); + if (mno_profile == UbloxATCellularInterface::SW_DEFAULT) { + TEST_ASSERT(interface->set_mno_profile((UbloxATCellularInterface::MNOProfile)MBED_CONF_UBLOX_CELL_DEFAULT_MNO_PROFILE)); + TEST_ASSERT(interface->reboot_modem()); + tr_debug("Reboot successful\n"); + wait_ms(5000); + } + } TEST_ASSERT(interface->init(MBED_CONF_APP_DEFAULT_PIN)); + + TEST_ASSERT(interface->disable_psm()); +#else + TEST_ASSERT(interface->init(MBED_CONF_APP_DEFAULT_PIN)); +#endif TEST_ASSERT(interface->connect(MBED_CONF_APP_DEFAULT_PIN, MBED_CONF_APP_APN, MBED_CONF_APP_USERNAME, MBED_CONF_APP_PASSWORD) == 0); use_connection(interface);