-
Notifications
You must be signed in to change notification settings - Fork 3k
Cellular: Allow cellular modules to override network registration mode #7860
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
Conversation
@mirelachirica please review |
} | ||
return true; | ||
return 2; |
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.
"#define" for numbers 0 and 2 would help reading for people unfamiliar with Cellular
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 did not use define because the value comes from 3GPP spec and you need to read that in any case to understand what you are doing. Also when the mode is a define and a modem specific porting requires a new mode they also need to make a define also in the generic codes at AT layer. But I can change that if you think its more clear with define?
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'd like to echo the sentiment of no magic numbers where possible, even if they are hardcoded in some spec.
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.
#define works in this case as a hint, it might be the case that developer has read the spec and with this hint s/he finds the context immediately without reading the spec again. Let's define those.
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.
@AnttiKauppila please review
5bf93ee
to
a0b4af0
Compare
a0b4af0
to
1eb1fab
Compare
/morph build |
Build : SUCCESSBuild number : 2927 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2547 |
Test : SUCCESSBuild number : 2678 |
Description
Cellular network registration is by default in mode 2, that is defined in 3GPP TS 27.007 as [,<[lac>,]<[ci>],[],[]]
That value must be configurable because some modems support only certain modes on specific technologies and also in some cases it's required to support extended modes, such as requested in the issue #7496
Pull request type