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

[Electron] Modem serial pausing before going into sleep with SLEEP_NETWORK_STANDBY #1160

Merged
merged 5 commits into from Dec 1, 2016

Conversation

@avtolstoy
Copy link
Member

commented Nov 7, 2016

With introduction of proper flow control handling via RTS line in PR #1140, modem should be unconditionally paused (by deasserting RTS line) before going into sleep with SLEEP_NETWORK_STANDBY. This should allow Electron not to lose any URCs from the modem while it is sleeping.

This PR includes a cucumber-based acceptance test which demonstrates how a sleepy Electron can receive a publish posted while it was sleeping:

  • $ cd user/tests/accept
  • $ bundler install
  • $ PLATFORM=electron ./run electron_modem_pause

Includes PR #1097


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)

Enhancements

  • [Electron] Modem USART paused via HW_FLOW_CONTROL (RTS) before going into sleep with SLEEP_NETWORK_STANDBY. Receives and buffers small messages while system sleeping.

@avtolstoy avtolstoy added this to the 0.7.x milestone Nov 7, 2016

#if PLATFORM_ID==PLATFORM_ELECTRON_PRODUCTION
if (!network_sleep_flag(param)) {
// Pause the modem Serial
electronMDM.pause();

This comment has been minimized.

Copy link
@technobly

technobly Nov 29, 2016

Member

This should be called via a wrapper function in cellular_hal

#if PLATFORM_ID==PLATFORM_ELECTRON_PRODUCTION
if (!network_sleep_flag(param)) {
// Pause the modem Serial
electronMDM.resume();

This comment has been minimized.

Copy link
@technobly

technobly Nov 29, 2016

Member

This should also be called via a wrapper function in cellular_hal

@technobly

This comment has been minimized.

Copy link
Member

commented Nov 29, 2016

Since this does change the current behavior, we should add some Docs that explain what happens with received data now when the modem remains powered up while the system sleeps. The system has the ability to receive a message that was buffered by the modem during STM32 sleep. If too much data is received (how much?), what happens? (excessive data is lost or does it overwrite in circular fashion?).

@avtolstoy avtolstoy referenced this pull request Nov 29, 2016
7 of 7 tasks complete

@technobly technobly modified the milestones: 0.7.x, 0.6.1 Nov 29, 2016

@avtolstoy

This comment has been minimized.

Copy link
Member Author

commented Nov 30, 2016

Updated

@technobly technobly merged commit bb24c38 into develop Dec 1, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@technobly technobly deleted the feature/electron/modem-sleep-rts branch Dec 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.