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

@avtolstoy avtolstoy 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();
Copy link
Member

Choose a reason for hiding this comment

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

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();
Copy link
Member

Choose a reason for hiding this comment

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

This should also be called via a wrapper function in cellular_hal

@technobly
Copy link
Member

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 mentioned this pull request Nov 29, 2016
7 tasks
@technobly technobly modified the milestones: 0.7.x, 0.6.1 Nov 29, 2016
@avtolstoy
Copy link
Member Author

Updated

@technobly technobly merged commit bb24c38 into develop Dec 1, 2016
@technobly technobly deleted the feature/electron/modem-sleep-rts branch December 1, 2016 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants