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

Cellular: update attach test #6350

Merged
merged 2 commits into from Mar 20, 2018

Conversation

Projects
None yet
7 participants
@mudassar-ublox
Contributor

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
Mudassar Hussain
@RobMeades

This comment has been minimized.

Contributor

RobMeades commented Mar 13, 2018

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

This comment has been minimized.

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

@cmonr cmonr added the needs: work label Mar 13, 2018

@0xc0170 0xc0170 requested a review from AnttiKauppila Mar 14, 2018

@0xc0170 0xc0170 added needs: review and removed needs: work labels Mar 14, 2018

@AnttiKauppila

This comment has been minimized.

Contributor

AnttiKauppila commented Mar 14, 2018

@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();

This comment has been minimized.

@jarvte

jarvte Mar 14, 2018

Contributor

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) { ...

This comment has been minimized.

@mudassar-ublox

mudassar-ublox Mar 14, 2018

Contributor

Will check and update soon.

Mudassar Hussain
@jarvte

jarvte approved these changes Mar 15, 2018

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Mar 15, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Mar 16, 2018

/morph build

@mbed-ci

This comment has been minimized.

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

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Mar 19, 2018

/morph test

@cmonr

This comment has been minimized.

Contributor

cmonr commented Mar 19, 2018

/morph mbed2-build

1 similar comment
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Mar 19, 2018

/morph mbed2-build

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Mar 19, 2018

/morph test

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Mar 20, 2018

/morph test

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Mar 20, 2018

@cmonr cmonr merged commit 53adeed into ARMmbed:master Mar 20, 2018

19 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Local events testing has passed
Details
travis-ci/littlefs Passed, code size is 10060B (+0.00%)
Details
travis-ci/mbed2-ATMEL Local mbed2-ATMEL testing has passed
Details
travis-ci/mbed2-MAXIM Local mbed2-MAXIM testing has passed
Details
travis-ci/mbed2-NORDIC Local mbed2-NORDIC testing has passed
Details
travis-ci/mbed2-NUVOTON Local mbed2-NUVOTON testing has passed
Details
travis-ci/mbed2-NXP Local mbed2-NXP testing has passed
Details
travis-ci/mbed2-RENESAS Local mbed2-RENESAS testing has passed
Details
travis-ci/mbed2-SILICON_LABS Local mbed2-SILICON_LABS testing has passed
Details
travis-ci/mbed2-STM Local mbed2-STM testing has passed
Details
travis-ci/tools Local tools testing has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment