modem: cellular: CELLULAR_EVENT_MODEM_SUSPENDED - #116988
Open
JordanYates wants to merge 3 commits into
Open
Conversation
zephyrbot
requested review from
JarmouniA,
SeppoTakalo,
bjarki-andreasen,
jukkar,
kartben,
nashif,
pdgendt,
rerickson1,
rlubos,
wkhadgar and
zafersn
August 21, 2026 01:22
bjarki-andreasen
previously approved these changes
Aug 21, 2026
zafersn
previously approved these changes
Aug 22, 2026
SeppoTakalo
previously approved these changes
Aug 24, 2026
jukkar
previously approved these changes
Aug 24, 2026
There was a problem hiding this comment.
Pull request overview
This PR extends Zephyr’s cellular driver event API by adding a new event emitted when the modem_cellular state machine transitions into the IDLE state, and updates the cellular modem sample to subscribe to and handle the full set of demonstrated events.
Changes:
- Adds
CELLULAR_EVENT_MODEM_SUSPENDEDto the public cellular event mask. - Emits the new event from
modem_cellular_on_idle_state_enter()inmodem_cellular. - Updates the
samples/net/cellular_modemsample to subscribe once to an “all events” mask and dispatch events via aswitch.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| samples/net/cellular_modem/src/main.c | Refactors the sample’s callback to handle multiple cellular events and subscribes to a combined event mask. |
| include/zephyr/drivers/cellular.h | Adds the new public event bit for modem IDLE/suspend transitions. |
| drivers/modem/modem_cellular.c | Emits the new event when entering the IDLE state. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
JordanYates
dismissed stale reviews from jukkar, SeppoTakalo, zafersn, and bjarki-andreasen
via
August 24, 2026 23:31
ddd8970
JordanYates
force-pushed
the
260821_modem_suspend
branch
from
August 24, 2026 23:31
823a8ec to
ddd8970
Compare
Contributor
Author
|
Added error handling for |
zafersn
previously approved these changes
Aug 25, 2026
rerickson1
previously approved these changes
Aug 25, 2026
Add a modem event that is output when the modem transitions back to the idle state. This can be used by higher level application code to monitor unexpected transitions from the `modem_cellular` state machine. Signed-off-by: Jordan Yates <jordan@embeint.com>
Always subscribe to modem events in the application, instead of only when `CONFIG_SAMPLE_CELLULAR_MODEM_AUTO_APN=y`. This will allow handling additional events with minimal further changes. Signed-off-by: Jordan Yates <jordan@embeint.com>
Handle all events in the sample to demonstrate what can be monitored at the application level. Signed-off-by: Jordan Yates <jordan@embeint.com>
JordanYates
force-pushed
the
260821_modem_suspend
branch
from
August 25, 2026 23:17
ddd8970 to
fa99acd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add a modem event that is output when the modem transitions back to the idle state. This can be used by higher level application code to monitor unexpected transitions from the
modem_cellularstate machine.Handle all events in the sample to demonstrate what can be monitored at the application level.