Skip to content

drivers: modem_cellular: added APP RDY signal handling #93052

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

petrosyan-van
Copy link
Contributor

Some modems, such as the Quectel BG95/EG25-G, emit an APP RDY message when the application core has fully initialized and is ready to process AT commands. By listening for this signal, the state machine can proceed earlier than the configured startup_time_ms, improving connection setup time.

This patch:

  • Adds a new MODEM_CELLULAR_EVENT_APP_RDY event and a corresponding unsolicited chat match.
  • Opens the UART and attaches the chat parser in the AWAIT_POWER_ON state, so that APP RDY can be captured immediately.
  • Transitions to SET_BAUDRATE or RUN_INIT_SCRIPT as soon as APP RDY is seen, while keeping the existing timeout as a fallback for modems that don't emit this message.

Tested on a Quectel BG95-M3 on a custom board, where this change consistently advances the flow by several seconds, especially valuable for battery-powered applications where the modem is power-cycled frequently for short bursts of activity (e.g., uplink and shutdown). Over time, this can lead to noticeable energy savings :)

Modems that do not emit APP RDY will follow the same timeout-driven path as before. No behavioral regressions expected.

Some modems (e.g. Quectel BG95/EG25-G, several SIMCom parts) print
“APP RDY” when the application core is ready.  Parse this line and
proceed from AWAIT_POWER_ON immediately, while keeping the existing
startup timeout as a fall-back.

* add MODEM_CELLULAR_EVENT_APP_RDY + chat match
* open UART and attach chat in AWAIT_POWER_ON
* jump to SET_BAUDRATE / RUN_INIT_SCRIPT on event

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Copy link

@petrosyan-van petrosyan-van marked this pull request as ready for review July 12, 2025 14:47
@github-actions github-actions bot requested a review from rerickson1 July 12, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants