-
Notifications
You must be signed in to change notification settings - Fork 3k
Cellular: retry logic for CellularContext connect #10056
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
@jarvte, thank you for your changes. |
Is this still considered a fix rather than adding new functionality (new method to cellularcontext) as result it will fix as well. |
*/ | ||
void call_network_cb(nsapi_connection_status_t status); | ||
|
||
virtual void do_connect() = 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.
This is an API break!
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.
These are protected methods and already implemented in AT_CellularContext class (exepct do_connect_with_retry). This was done so that RIL and AT layers don't have copy-paste code. So is this kind of change also prohibited?
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.
Pure virtual will cause code changes, while a function with a default implementation will not.
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.
Ok, if I change this to not pure virtual but virtual it's accepted?
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.
Agreed fix to virtual method with default implementation
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.
pushed fix. Now there is a default implementation in place.
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.
Why a new API break introduced?
see my response to your other comment |
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.
These are internal APIs.
I have no objection from IP Core point of view. Needs Cellular tech-lead to approve.
@@ -106,6 +112,11 @@ void AT_CellularContext::enable_hup(bool enable) | |||
} | |||
} | |||
|
|||
void AT_CellularContext::do_connect_with_retry() | |||
{ | |||
CellularContext::do_connect_with_retry(); |
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.
Why do you override if you just directly call the base?
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 because of EventQueue. In non blocking mode we use EventQueue to call do_connect_with_retry. We can't call CellularContext::do_connect_with_retry() as it's protected so to avoid that problem we had to introduce this function.
00b85ef
to
5626df9
Compare
New method is a protected method but I'm fine with fix or functionality change. I really don't know which would suite better. |
5626df9
to
8e58962
Compare
Force pushed doxygen updates. |
ping |
@ARMmbed/mbed-os-wan Please re-review. |
8e58962
to
b4b7128
Compare
Force pushed rebase with master to fix conflicts. |
State machine has retry logic until device is attached to network. After this CellularContext does the context activation e.g. connect. There was no retry logic for context activation. Added logic to CellularContext level so it's available for at and (upcoming)ril layers.
Info: This PR has now been rebased. If this was made in error, feel free to force-push your local branch to restore the PR. |
b4b7128
to
c6e5595
Compare
CI started |
@jarvte Rebased your PR since a seperate PR fixed the astyle issues. |
Test run: FAILEDSummary: 2 of 13 test jobs failed Failed test jobs:
|
Failures seem to be CI K66 issue +license issue. restarting CI |
Test run: FAILEDSummary: 1 of 13 test jobs failed Failed test jobs:
|
Still K66F failing, not related to this pr. |
restarted |
Test run: SUCCESSSummary: 13 of 13 test jobs passed |
@jarvte Need help with this fix. Patching this causing multiple conflicts that are not that easy to resolve - too many changes on master landing to these files? Need a branch against release-candidate branch (already having 5.12.1rc ready, just waiting for this one to land). |
Or will go to 5.12.2 with new PR targeting 5.12 branch |
Moving to 5.12.2 (if wont be manually patched for 5.12.1). |
Moving to 5.13.0-rc1. |
Description
State machine has retry logic until device is attached to network.
After this CellularContext does the context activation e.g. connect.
There was no retry logic for context activation. Added logic to
CellularContext level so it's available for at and (upcoming) ril layers.
Pull request type
Reviewers
@AriParkkila
Release Notes
Add retry logic for CellularContext connect last phase: activating pdp context / open ppp channel.
Retry logic is the same as in CellularStateMachine.