Skip to content

Cellular: update attach test #6350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2018
Merged

Cellular: update attach test #6350

merged 2 commits into from
Mar 20, 2018

Conversation

mudassar-ublox
Copy link
Contributor

@mudassar-ublox mudassar-ublox commented Mar 13, 2018

Description

This pull request resolves the problem of test case 'attach' of cellular test suite introduced by ARM.

If AT+COPS=0 is sent and modem is already in automatic selection mode, the modem starts searching for another PLMN (different to that already in use) and takes some time. This is not required if the module is already in automatic selection mode. In this pull request, AT+COPS? is sent first to check if the module is already in automatic selection mode or not. If it is, there is no need for AT+COPS=0, otherwise it is sent and then waits for the module to register.

Pull request type

  • Fix
  • Refactor
  • New target
  • Feature
  • Breaking change

@RobMeades
Copy link
Contributor

It is worth noting that the reason for this pull request is that, in the case of u-blox modems, if the AT command to put the modem into automatic PLMN selection mode, AT+COPS=0, is received when the modem is already in automatic PLMN selection mode (which will be the case if the modem has ever been used before by this cellular driver), then this is treated as a request to deliberately select a PLMN different to that already in use, which may well take some time and may certainly be undesirable in this case as the modem will have previously selected the most attractive PLMN. This change prevents such a "double ask" for automatic mode. The change should be compatible with any 3GPP 27.007-compliant modem.

@cmonr
Copy link
Contributor

cmonr commented Mar 13, 2018

@mudassar-ublox Please update your PR description to follow the template that we provided.

An example of how that template is used can be found here: #6264

@AnttiKauppila
Copy link

@jarvte will review this

_at.cmd_start("AT+COPS=0");
uint8_t len=8;
uint8_t buf[8];
_at.cmd_start("AT+COPS?");
_at.cmd_stop();
_at.resp_start();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could do this also without need to declare buf and doing string compare:

_at.resp_start("+COPS:");
int mode = _at.read_int();
_at.resp_stop();

if (mode != 0) { ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will check and update soon.

@cmonr
Copy link
Contributor

cmonr commented Mar 16, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 16, 2018

Build : SUCCESS

Build number : 1470
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6350/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Mar 17, 2018

@mbed-ci
Copy link

mbed-ci commented Mar 17, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 19, 2018

/morph test

@cmonr
Copy link
Contributor

cmonr commented Mar 19, 2018

/morph mbed2-build

1 similar comment
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 19, 2018

/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Mar 19, 2018

@cmonr
Copy link
Contributor

cmonr commented Mar 19, 2018

/morph test

@mbed-ci
Copy link

mbed-ci commented Mar 20, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 20, 2018

/morph test

@mbed-ci
Copy link

mbed-ci commented Mar 20, 2018

@cmonr cmonr merged commit 53adeed into ARMmbed:master Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants