@@ -223,7 +223,7 @@ static void test_credentials()
223
223
224
224
static void test_other ()
225
225
{
226
- const char * devi = CELLULAR_STRINGIFY (CELLULAR_DEVICE);
226
+ const char * devi = CELLULAR_STRINGIFY (CELLULAR_DEVICE);
227
227
TEST_ASSERT (nw->get_3gpp_error () == 0 );
228
228
229
229
CellularNetwork::RateControlExceptionReports reports;
@@ -244,8 +244,8 @@ static void test_other()
244
244
TEST_ASSERT (err == NSAPI_ERROR_OK || err == NSAPI_ERROR_DEVICE_ERROR || err == NSAPI_ERROR_PARAMETER);
245
245
if (err == NSAPI_ERROR_DEVICE_ERROR) {
246
246
if (strcmp (devi, " QUECTEL_BG96" ) != 0 && strcmp (devi, " TELIT_HE910" ) != 0 && strcmp (devi, " SARA4_PPP" ) != 0 ) { // QUECTEL_BG96 does not give any specific reason for device error
247
- TEST_ASSERT (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 && // 100 == unknown command for modem
248
- ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
247
+ TEST_ASSERT (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 && // 100 == unknown command for modem
248
+ ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
249
249
}
250
250
} else if (err == NSAPI_ERROR_PARAMETER) {
251
251
TEST_ASSERT (uplinkRate == -1 );
@@ -277,8 +277,8 @@ static void test_other()
277
277
if (err == NSAPI_ERROR_DEVICE_ERROR) {
278
278
if (strcmp (devi, " TELIT_HE910" ) != 0 ) { // TELIT_HE910 just gives an error and no specific error number so we can't know is this real error or that modem/network does not support the command
279
279
TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
280
- ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
281
- (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
280
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
281
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
282
282
}
283
283
} else {
284
284
// should have some values, only not optional are apn and bearer id
@@ -292,8 +292,8 @@ static void test_other()
292
292
if (err == NSAPI_ERROR_DEVICE_ERROR) {
293
293
if (strcmp (devi, " QUECTEL_BG96" ) != 0 && strcmp (devi, " TELIT_HE910" ) != 0 ) {// QUECTEL_BG96 does not give any specific reason for device error
294
294
TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
295
- ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
296
- (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
295
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
296
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
297
297
}
298
298
} else {
299
299
// we should have some values which are not optional
@@ -306,9 +306,9 @@ static void test_other()
306
306
TEST_ASSERT (err == NSAPI_ERROR_OK || err == NSAPI_ERROR_DEVICE_ERROR);
307
307
if (err == NSAPI_ERROR_DEVICE_ERROR) {
308
308
TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
309
- ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
310
- (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
311
- } else {
309
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
310
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
311
+ } else {
312
312
// test for values
313
313
TEST_ASSERT (rssi >= 0 );
314
314
TEST_ASSERT (ber >= 0 );
@@ -339,8 +339,8 @@ static void test_other()
339
339
if (err == NSAPI_ERROR_DEVICE_ERROR) {
340
340
// if device error then we must check was that really device error or that modem/network does not support the commands
341
341
TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
342
- ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 4 ) || // 4 == NOT SUPPORTED BY THE MODEM
343
- (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
342
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 4 ) || // 4 == NOT SUPPORTED BY THE MODEM
343
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
344
344
} else {
345
345
CellularNetwork::operator_names_t *opn = op_names.get_head ();
346
346
TEST_ASSERT (strlen (opn->numeric ) > 0 );
@@ -358,8 +358,8 @@ static void test_other()
358
358
// if device error then we must check was that really device error or that modem/network does not support the commands
359
359
if (!(strcmp (devi, " TELIT_HE910" ) == 0 || strcmp (devi, " QUECTEL_BG96" ) == 0 || strcmp (devi, " SARA4_PPP" ) == 0 )) {
360
360
TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
361
- ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
362
- (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
361
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
362
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
363
363
}
364
364
} else {
365
365
TEST_ASSERT (supported_opt != CellularNetwork::SUPPORTED_UE_OPT_MAX);
@@ -372,8 +372,8 @@ static void test_other()
372
372
// if device error then we must check was that really device error or that modem/network does not support the commands
373
373
if (!(strcmp (devi, " TELIT_HE910" ) == 0 || strcmp (devi, " QUECTEL_BG96" ) == 0 || strcmp (devi, " SARA4_PPP" ) == 0 )) {
374
374
TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
375
- ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
376
- (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
375
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
376
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
377
377
}
378
378
}
379
379
}
0 commit comments