-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Cellular: add plmn for CellularConnectionFSM #6629
Conversation
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) { |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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.
Please also rebase to resolve a conflict |
…n't try to register again if we are are already in correct nw.
752e7f9
to
1990f63
Compare
@0xc0170 conflicts solved |
if (!names) { | ||
tr_warn("Could not allocate new operator_names_t"); | ||
_at.resp_stop(); | ||
return _at.unlock_return_error(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
I am confused, approved but left few comments that indicate changes. I keep this needs work and should be updated |
@0xc0170 fixed the latest review comments. Should be ready now. |
/morph build |
Build : SUCCESSBuild number : 1785 Triggering tests/morph test |
Test : SUCCESSBuild number : 1595 |
Exporter Build : SUCCESSBuild number : 1431 |
@0xc0170 please merge so we can continue work on top this |
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