drivers: modem_cellular: added APP RDY signal handling #93052
+20
−2
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.
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 configuredstartup_time_ms
, improving connection setup time.This patch:
MODEM_CELLULAR_EVENT_APP_RDY
event and a corresponding unsolicited chat match.AWAIT_POWER_ON
state, so thatAPP RDY
can be captured immediately.SET_BAUDRATE
orRUN_INIT_SCRIPT
as soon asAPP 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.