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

Listening Mode Timeout defaults and set|get API [ch318] #1182

Merged
merged 6 commits into from
Dec 8, 2016

Conversation

technobly
Copy link
Member

@technobly technobly commented Nov 21, 2016

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 and TEST=wiring/api


Doneness:

  • Contributor has signed CLA
  • Problem and Solution clearly stated
  • Code peer reviewed
  • API tests compiled
  • Run unit/integration/application tests on device
  • Add documentation
  • Add to CHANGELOG.md after merging (add links to docs and issues)

Features

  • Added 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]

@technobly technobly added this to the 0.7.x milestone Nov 21, 2016
@technobly technobly modified the milestones: 0.7.x, 0.6.1 Nov 29, 2016
Copy link
Member

@sergeuz sergeuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍


// validate the function was called.
assertEqual((int)test_val, 1);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 test cases are not related to listening mode, so instead of moving them to listening.cpp I would prefer them to be defined in some separate file.

  Conflicts:
	system/src/system_network_cellular.h
@technobly technobly merged commit 8279ebc into develop Dec 8, 2016
@technobly technobly deleted the feature/listen-timeout branch December 8, 2016 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants