Skip to content

Cellular: add plmn for CellularConnectionFSM #6629

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 4 commits into from
Apr 19, 2018

Conversation

jarvte
Copy link
Contributor

@jarvte jarvte commented Apr 13, 2018

Description

Added possibility to specify plmn to CellularConnectionFSM which to use when registering to a cellular network.

Internal ref to defect: IOTCELL-745

@AriParkkila please review

Pull request type

[ ] Fix
[ ] Refactor
[ ] New target
[X] Feature
[ ] Breaking change

nsapi_error_t err = is_automatic_registering(auto_reg);
if (err == NSAPI_ERROR_OK && !auto_reg) { // when we support plmn add this : || plmn
// automatic registering is not on, set registration and retry
if (_plmn && _retry_count == 0) {

Choose a reason for hiding this comment

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

Any chance to know current PLMN? It's possible that we might be registered in correct PLMN already.

}
} else {
if (_plmn) {
set_network_registration();

Choose a reason for hiding this comment

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

Manual registration shall be as failure tolerant as automatic registration.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 16, 2018

Please also rebase to resolve a conflict

@jarvte jarvte force-pushed the add_select_plmn_to_cellularfsm branch from 752e7f9 to 1990f63 Compare April 17, 2018 07:24
@jarvte
Copy link
Contributor Author

jarvte commented Apr 17, 2018

@0xc0170 conflicts solved

@0xc0170 0xc0170 changed the title plmn used when registering can be given for CellularConnectionFSM Cellular: add plmn for CellularConnectionFSM Apr 17, 2018
if (!names) {
tr_warn("Could not allocate new operator_names_t");
_at.resp_stop();
return _at.unlock_return_error();

Choose a reason for hiding this comment

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

Should clear op_names and return out-of-memory error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, might a better way. I'll fix.

tr_warn("Could not allocate new operator");
_at.resp_stop();
opsCount = idx;
return _at.unlock_return_error();

Choose a reason for hiding this comment

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

Should clear operators and return out-of-memory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

*
* @param plmn operator in numeric format. See more from 3GPP TS 27.007 chapter 7.3.
*/
void set_plmn(const char* plmn);

Choose a reason for hiding this comment

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

It's not clear when this need to be called and that this does not start PLMN reselection.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll update documentation

if (strcmp(_plmn, op_names->numeric)) {
names_list.delete_all();
return true;
} else {

Choose a reason for hiding this comment

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

redundant else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 18, 2018

I am confused, approved but left few comments that indicate changes. I keep this needs work and should be updated

@jarvte
Copy link
Contributor Author

jarvte commented Apr 18, 2018

@0xc0170 fixed the latest review comments. Should be ready now.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 18, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Apr 18, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Apr 18, 2018

@mbed-ci
Copy link

mbed-ci commented Apr 18, 2018

@jarvte
Copy link
Contributor Author

jarvte commented Apr 19, 2018

@0xc0170 please merge so we can continue work on top this

@0xc0170 0xc0170 merged commit 9cc4302 into ARMmbed:master Apr 19, 2018
@jarvte jarvte deleted the add_select_plmn_to_cellularfsm branch April 19, 2018 10:42
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.

5 participants