File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
features/cellular/TESTS/api/cellular_information Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 37
37
38
38
#include " mbed.h"
39
39
40
+
41
+ #include " AT_CellularInformation.h"
40
42
#include " CellularConnectionFSM.h"
41
43
#include " CellularDevice.h"
42
44
#include " ../../cellular_tests_common.h"
@@ -81,7 +83,9 @@ static void test_information_interface()
81
83
TEST_ASSERT (info->get_manufacturer (buf, kbuf_size) == NSAPI_ERROR_OK);
82
84
TEST_ASSERT (info->get_model (buf, kbuf_size) == NSAPI_ERROR_OK);
83
85
TEST_ASSERT (info->get_revision (buf, kbuf_size) == NSAPI_ERROR_OK);
84
- TEST_ASSERT (info->get_serial_number (buf, kbuf_size, CellularInformation::SN) == NSAPI_ERROR_OK);
86
+ TEST_ASSERT ((info->get_serial_number (buf, kbuf_size, CellularInformation::SN) == NSAPI_ERROR_OK) ||
87
+ ((((AT_CellularInformation *)info)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
88
+ (((AT_CellularInformation *)info)->get_device_error ().errCode == 4 ))); // 4 == "operation not supported"
85
89
86
90
nsapi_error_t err = info->get_serial_number (buf, kbuf_size, CellularInformation::IMEI);
87
91
TEST_ASSERT (err == NSAPI_ERROR_UNSUPPORTED || err == NSAPI_ERROR_OK);
You can’t perform that action at this time.
0 commit comments