ublox-at-cellular-interface
Diff: TESTS/unit_tests/dynamic/main.cpp
- Revision:
- 37:0ceb2dfc746c
- Parent:
- 21:2a500a881a5a
- Child:
- 38:c3ad075a347b
--- a/TESTS/unit_tests/dynamic/main.cpp Mon Aug 19 17:36:04 2019 +0500 +++ b/TESTS/unit_tests/dynamic/main.cpp Wed Oct 09 14:48:57 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::STANDARD_EU)); + 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);