@@ -225,7 +225,7 @@ static void test_other()
225
225
if (strcmp (devi, " QUECTEL_BG96" ) != 0 && strcmp (devi, " TELIT_HE910" ) != 0 ) { // QUECTEL_BG96 does not give any specific reason for device error
226
226
if (err == NSAPI_ERROR_DEVICE_ERROR) {
227
227
TEST_ASSERT (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 && // 100 == unknown command for modem
228
- ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
228
+ ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
229
229
}
230
230
}
231
231
@@ -235,7 +235,7 @@ static void test_other()
235
235
if (err == NSAPI_ERROR_DEVICE_ERROR) {
236
236
if (strcmp (devi, " QUECTEL_BG96" ) != 0 && strcmp (devi, " TELIT_HE910" ) != 0 ) { // QUECTEL_BG96 does not give any specific reason for device error
237
237
TEST_ASSERT (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 && // 100 == unknown command for modem
238
- ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
238
+ ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
239
239
}
240
240
} else if (err == NSAPI_ERROR_PARAMETER) {
241
241
TEST_ASSERT (uplinkRate == -1 );
@@ -246,6 +246,8 @@ static void test_other()
246
246
err = nw->set_access_technology (CellularNetwork::RAT_GSM);
247
247
TEST_ASSERT (err == NSAPI_ERROR_OK || err == NSAPI_ERROR_UNSUPPORTED);
248
248
249
+ // scanning of operators requires some delay before operation is allowed(seen with WISE_1570)
250
+ wait (5 );
249
251
// scanning of operators might take a long time
250
252
cellular.get_device ()->set_timeout (240 * 1000 );
251
253
CellularNetwork::operList_t operators;
@@ -264,8 +266,9 @@ static void test_other()
264
266
TEST_ASSERT (err == NSAPI_ERROR_OK || err == NSAPI_ERROR_DEVICE_ERROR);
265
267
if (err == NSAPI_ERROR_DEVICE_ERROR) {
266
268
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
267
- TEST_ASSERT (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 && // 100 == unknown command for modem
268
- ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
269
+ TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
270
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
271
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
269
272
}
270
273
} else {
271
274
// should have some values, only not optional are apn and bearer id
@@ -278,8 +281,9 @@ static void test_other()
278
281
TEST_ASSERT (err == NSAPI_ERROR_OK || err == NSAPI_ERROR_DEVICE_ERROR);
279
282
if (err == NSAPI_ERROR_DEVICE_ERROR) {
280
283
if (strcmp (devi, " QUECTEL_BG96" ) != 0 && strcmp (devi, " TELIT_HE910" ) != 0 ) {// QUECTEL_BG96 does not give any specific reason for device error
281
- TEST_ASSERT (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 && // 100 == unknown command for modem
282
- ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
284
+ TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
285
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
286
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
283
287
}
284
288
} else {
285
289
// we should have some values which are not optional
@@ -291,9 +295,10 @@ static void test_other()
291
295
err = nw->get_signal_quality (rssi, ber);
292
296
TEST_ASSERT (err == NSAPI_ERROR_OK || err == NSAPI_ERROR_DEVICE_ERROR);
293
297
if (err == NSAPI_ERROR_DEVICE_ERROR) {
294
- TEST_ASSERT (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 && // 100 == unknown command for modem
295
- ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
296
- } else {
298
+ TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
299
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
300
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
301
+ } else {
297
302
// test for values
298
303
TEST_ASSERT (rssi >= 0 );
299
304
TEST_ASSERT (ber >= 0 );
@@ -321,8 +326,9 @@ static void test_other()
321
326
TEST_ASSERT (err == NSAPI_ERROR_OK || err == NSAPI_ERROR_DEVICE_ERROR);
322
327
if (err == NSAPI_ERROR_DEVICE_ERROR) {
323
328
// if device error then we must check was that really device error or that modem/network does not support the commands
324
- TEST_ASSERT (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 4 // 4 == NOT SUPPORTED BY THE MODEM
325
- && ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
329
+ TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
330
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 4 ) || // 4 == NOT SUPPORTED BY THE MODEM
331
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
326
332
} else {
327
333
CellularNetwork::operator_names_t *opn = op_names.get_head ();
328
334
TEST_ASSERT (strlen (opn->numeric ) > 0 );
@@ -338,8 +344,9 @@ static void test_other()
338
344
if (err == NSAPI_ERROR_DEVICE_ERROR) {
339
345
// if device error then we must check was that really device error or that modem/network does not support the commands
340
346
if (!(strcmp (devi, " TELIT_HE910" ) == 0 || strcmp (devi, " QUECTEL_BG96" ) == 0 )) {
341
- TEST_ASSERT (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 && // 100 == unknown command for modem
342
- ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
347
+ TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
348
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
349
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
343
350
}
344
351
} else {
345
352
TEST_ASSERT (supported_opt != CellularNetwork::SUPPORTED_UE_OPT_MAX);
@@ -351,8 +358,9 @@ static void test_other()
351
358
if (err == NSAPI_ERROR_DEVICE_ERROR) {
352
359
// if device error then we must check was that really device error or that modem/network does not support the commands
353
360
if (!(strcmp (devi, " TELIT_HE910" ) == 0 || strcmp (devi, " QUECTEL_BG96" ) == 0 )) {
354
- TEST_ASSERT (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 && // 100 == unknown command for modem
355
- ((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ); // 3 == CME error from the modem
361
+ TEST_ASSERT ((((AT_CellularNetwork *)nw)->get_device_error ().errType == 3 ) && // 3 == CME error from the modem
362
+ ((((AT_CellularNetwork *)nw)->get_device_error ().errCode == 100 ) || // 100 == unknown command for modem
363
+ (((AT_CellularNetwork *)nw)->get_device_error ().errCode == 50 ))); // 50 == incorrect parameters // seen in wise_1570 for not supported commands
356
364
}
357
365
}
358
366
}
0 commit comments