diff --git a/features/cellular/UNITTESTS/at/at_cellularnetwork/Makefile b/features/cellular/UNITTESTS/at/at_cellularnetwork/Makefile index 55c6f75ddd..f834d5787f 100644 --- a/features/cellular/UNITTESTS/at/at_cellularnetwork/Makefile +++ b/features/cellular/UNITTESTS/at/at_cellularnetwork/Makefile @@ -21,6 +21,7 @@ TEST_SRC_FILES = \ ../../stubs/us_ticker_stub.cpp \ ../../stubs/mbed_assert_stub.cpp \ ../../stubs/SocketAddress_stub.cpp \ + ../../stubs/randLIB_stub.cpp \ include ../../MakefileWorker.mk diff --git a/features/cellular/UNITTESTS/at/at_cellularsms/test_at_cellularsms.cpp b/features/cellular/UNITTESTS/at/at_cellularsms/test_at_cellularsms.cpp index 9faac21d67..94c5884a63 100644 --- a/features/cellular/UNITTESTS/at/at_cellularsms/test_at_cellularsms.cpp +++ b/features/cellular/UNITTESTS/at/at_cellularsms/test_at_cellularsms.cpp @@ -57,7 +57,7 @@ void Test_AT_CellularSMS::test_AT_CellularSMS_initialize() AT_CellularSMS sms(at); ATHandler_stub::nsapi_error_value = NSAPI_ERROR_AUTH_FAILURE; - CHECK(NSAPI_ERROR_AUTH_FAILURE == sms.initialize(CellularSMS::CellularSMSMmodeText)); + CHECK(NSAPI_ERROR_NO_MEMORY == sms.initialize(CellularSMS::CellularSMSMmodeText)); } diff --git a/features/cellular/UNITTESTS/stubs/AT_CellularBase_stub.cpp b/features/cellular/UNITTESTS/stubs/AT_CellularBase_stub.cpp index 0a6daf2d00..e7e37ac15e 100644 --- a/features/cellular/UNITTESTS/stubs/AT_CellularBase_stub.cpp +++ b/features/cellular/UNITTESTS/stubs/AT_CellularBase_stub.cpp @@ -41,3 +41,7 @@ device_err_t AT_CellularBase::get_device_error() const return AT_CellularBase_stub::device_err_value; } +bool AT_CellularBase::is_supported(SupportedFeature feature) +{ + return true; +} diff --git a/features/cellular/UNITTESTS/stubs/AT_CellularInformation_stub.cpp b/features/cellular/UNITTESTS/stubs/AT_CellularInformation_stub.cpp index a9cf1b5b0b..e9cdd24b0a 100644 --- a/features/cellular/UNITTESTS/stubs/AT_CellularInformation_stub.cpp +++ b/features/cellular/UNITTESTS/stubs/AT_CellularInformation_stub.cpp @@ -42,3 +42,8 @@ nsapi_error_t AT_CellularInformation::get_revision(char *buf, size_t buf_size) { return 0; } + +nsapi_error_t AT_CellularInformation::get_serial_number(char *buf, size_t buf_size, SerialNumberType type) +{ + return 0; +} diff --git a/features/cellular/UNITTESTS/stubs/AT_CellularSIM_stub.cpp b/features/cellular/UNITTESTS/stubs/AT_CellularSIM_stub.cpp index 85a7f04a64..ee06161aaa 100644 --- a/features/cellular/UNITTESTS/stubs/AT_CellularSIM_stub.cpp +++ b/features/cellular/UNITTESTS/stubs/AT_CellularSIM_stub.cpp @@ -52,3 +52,8 @@ nsapi_error_t AT_CellularSIM::get_imsi(char* imsi) { return NSAPI_ERROR_OK; } + +nsapi_error_t AT_CellularSIM::get_iccid(char *buf, size_t buf_size) +{ + return NSAPI_ERROR_OK; +} diff --git a/features/cellular/framework/API/CellularPower.h b/features/cellular/framework/API/CellularPower.h index b555bc23d1..b72470e365 100644 --- a/features/cellular/framework/API/CellularPower.h +++ b/features/cellular/framework/API/CellularPower.h @@ -92,7 +92,7 @@ public: * * @return zero on success */ - virtual nsapi_error_t set_power_level(int func_level, int do_reset = 1) = 0; + virtual nsapi_error_t set_power_level(int func_level, int do_reset = 0) = 0; /** Reset and wake-up cellular device. * diff --git a/features/cellular/framework/AT/AT_CellularPower.h b/features/cellular/framework/AT/AT_CellularPower.h index 305a233a5e..eb4b2e9ab9 100644 --- a/features/cellular/framework/AT/AT_CellularPower.h +++ b/features/cellular/framework/AT/AT_CellularPower.h @@ -41,7 +41,7 @@ public: virtual nsapi_error_t set_at_mode(); - virtual nsapi_error_t set_power_level(int func_level, int do_reset = 1); + virtual nsapi_error_t set_power_level(int func_level, int do_reset = 0); virtual nsapi_error_t reset();