Listening Mode Timeout defaults and set|get API [ch318] #1182
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.
This PR addresses an issue with Electrons primarily where they can start flashing blue (Listening Mode) due to reconnects that result in no SIM found. This can happen if there is significant shock and vibration on a loose or oxidized SIM contact during a power cycle. Upon exiting Listening Mode, a power cycle and reset of the modem will occur if the SIM is not found. If it continues to be unresponsive, Listening Mode will be re-entered. Additionally, previously once in Listening Mode required user intervention to exit. Now there is a default 5 minute timeout applied to Cellular devices only. Wi-Fi devices continue to have the same behavior with no timeout from Listening Mode, and both Cellular and Wi-Fi timeouts are user configurable.
Also added an API
WiFi.set|getListenTimeout()
|Cellular.set|getListenTimeout()
to override the automatic new Listening Mode timeout (Wi-Fi = no timeout by default, Cellular = 5 minute timeout by default). [Fixes #687] [Docs]See included Docs included in PR for more info (link above will not be live until 0.7.0-rc.1 is released)
Tests added
TEST=wiring/threading
andTEST=wiring/api
Doneness:
Features
WiFi.set|getListenTimeout()
|Cellular.set|getListenTimeout()
to override the automatic new Listening Mode timeout (Wi-Fi = no timeout by default, Cellular = 5 minute timeout by default). [Fixes #687] [Docs]