Skip to content
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
merged 1 commit into from
Oct 20, 2020

Conversation

technobly
Copy link
Member

@technobly technobly commented Oct 15, 2020

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 to C*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 know Particle.connected() or Cellular.ready() are false.

#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 see C*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_04

References

ch64465
#2215 addresses the root cause of the problem
ch63632


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • N/A Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

@technobly technobly force-pushed the fix/ch64465-modem-reset-recovery-gen2 branch from a8ed2bd to 265d304 Compare October 16, 2020 15:27
hal/src/electron/modem/mdm_hal.cpp Outdated Show resolved Hide resolved
hal/src/electron/modem/mdm_hal.cpp Outdated Show resolved Hide resolved
hal/src/electron/modem/mdm_hal.cpp Outdated Show resolved Hide resolved
hal/src/electron/modem/mdm_hal.cpp Outdated Show resolved Hide resolved
hal/src/electron/modem/mdm_hal.h Outdated Show resolved Hide resolved
hal/src/electron/modem/mdm_hal.cpp Outdated Show resolved Hide resolved
user/tests/wiring/no_fixture_long_running/cellular.cpp Outdated Show resolved Hide resolved
@technobly technobly force-pushed the fix/ch64465-modem-reset-recovery-gen2 branch from 265d304 to 83e6099 Compare October 19, 2020 22:29
user/tests/wiring/no_fixture_long_running/cellular.cpp Outdated Show resolved Hide resolved
hal/src/electron/modem/mdm_hal.cpp Outdated Show resolved Hide resolved
@technobly technobly force-pushed the fix/ch64465-modem-reset-recovery-gen2 branch 2 times, most recently from ad44730 to e510e15 Compare October 20, 2020 01:30
@technobly technobly force-pushed the fix/ch64465-modem-reset-recovery-gen2 branch from e510e15 to 40fdce9 Compare October 20, 2020 01:32
@avtolstoy avtolstoy merged commit cfeaa92 into develop Oct 20, 2020
@avtolstoy avtolstoy deleted the fix/ch64465-modem-reset-recovery-gen2 branch October 20, 2020 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants