-
Notifications
You must be signed in to change notification settings - Fork 3k
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 API to clear CellularDevice #11414
Conversation
@AriParkkila, thank you for your changes. |
This will be a nice addition as I've sometimes run into situations where I needed to clear the PDP contexts (e.g. sometimes when switching between APNs). |
We have seen connectivity issues with this PR when running internal cellular tests against our network simulator. We are currently investigating the issue. |
A new API `CellularDevice::clear()` to clean-up the modem to a default initial state. Function is virtual so it can be overridden. The default implementation clears all PDP contexts, but the the first one if that has APN defined as `nsapi.default-cellular-apn`. CellularStateMachine calls `clear()` to clean-up the modem on initial `connect()`, if the flag `cellular.clear-on-connect: true` is defined.
eebffa8
to
94dcab9
Compare
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.
STM changes LGTM
Internal tests working again without issues with the latest commit. |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
A new API
CellularDevice::clear()
to clean-up the modem to a default initial state.Function is virtual so it can be overridden. The default implementation clears all PDP contexts,
but the the first one if that has APN defined as
nsapi.default-cellular-apn
.CellularStateMachine calls
clear()
to clean-up the modem on initialconnect()
,if the flag
cellular.clear-on-connect: true
is defined.Description
Pull request type
Reviewers
@mirelachirica @jarvte
Release Notes
CellularStateMachine
callsCellularDevice::clear()
to clean-up the modem on initialconnect()
.The previous functionality can be restored by defining the flag
cellular.clear-on-connect: false
.