-
Notifications
You must be signed in to change notification settings - Fork 513
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
[gen2][electron] modem brownout or unexpected reset causes system to think it still is connected [ch64465] #2219
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keeramis
reviewed
Oct 15, 2020
keeramis
reviewed
Oct 15, 2020
keeramis
reviewed
Oct 15, 2020
keeramis
approved these changes
Oct 16, 2020
technobly
force-pushed
the
fix/ch64465-modem-reset-recovery-gen2
branch
from
October 16, 2020 15:27
a8ed2bd
to
265d304
Compare
avtolstoy
requested changes
Oct 19, 2020
technobly
force-pushed
the
fix/ch64465-modem-reset-recovery-gen2
branch
from
October 19, 2020 22:29
265d304
to
83e6099
Compare
avtolstoy
requested changes
Oct 19, 2020
technobly
force-pushed
the
fix/ch64465-modem-reset-recovery-gen2
branch
2 times, most recently
from
October 20, 2020 01:30
ad44730
to
e510e15
Compare
…think it still is connected [ch64465]
technobly
force-pushed
the
fix/ch64465-modem-reset-recovery-gen2
branch
from
October 20, 2020 01:32
e510e15
to
40fdce9
Compare
avtolstoy
approved these changes
Oct 20, 2020
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Electron was found to suffer from a modem reset while antenna was disconnected in low signal environment on battery only (and also with USB and battery). This leads to
C*REG=2
verbose mode + URCS being reset toC*REG=0
non-verbose mode + no URCs, which causes the system firmware to not be notified that the modem has deregistered. NO_ACK publishes can continue to be sent into the breeze, and a user's firmware will not knowParticle.connected()
orCellular.ready()
arefalse
.#2215 addresses the root cause of the problem, but just in case for unexpected reasons the following solution offers a recovery method.
Solution
To periodically poll for
C*REG?
every 30 seconds look for changes to CREG verbosity. If there is a valid response, and we seeC*REG: 0,x
, URCs are disabled. Notify the system of disconnect immediately, which will reinitialize the modem.Steps to Test
Run unit tests:
TEST=wiring/no_fixture_long_running
CELLULAR_03 & CELLULAR_04References
ch64465
#2215 addresses the root cause of the problem
ch63632
Completeness