Skip to content

drivers: modem_cellular: Add shutdown script for BG95 #93072

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

@petrosyan-van petrosyan-van commented Jul 13, 2025

This PR adds a shutdown chat-script for BG95 that simply transmits AT+QPOWD=1 and completes as soon as the modem echoes OK. A graceful software power-down is preferable to yanking the supply, because it lets the module close the file system cleanly. This shutdown method is equivalent to the pulse shutdown via PWRKEY, but for the designs that do not have PWRKEY exposed this would be the only path: we can now shut the modem down cleanly without toggling a regulator and cutting the power too early.

According to the BG95 AT command manual the modem should print “POWERED DOWN” after the final OK, but on the BG95-M3 board I have tested (FW BG95M3LAR02A03_01.204.01.204) that URC never appears (maybe somehow related to CMUX). It appears if I try AT+QPOWD=0, which is the Immediate power-down. Since the UART stops replying at that point the lone OK is already a useful confirmation.

Note: Only tested on BG95-M3 miniPCIe module. Ideally, this should be also tested on a standard BG95 module, with PWRKEY to confirm that there is no regression

image image

Add quectel_bg95_shutdown_chat_script that issues AT+QPOWD=1 and
link it to MODEM_CELLULAR_DEVICE_QUECTEL_BG95 to enable a clean
software-initiated power-off path

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
@petrosyan-van petrosyan-van force-pushed the bg95_shutdown_script branch from 58e4bc5 to ef05e35 Compare July 13, 2025 17:00
Copy link

@petrosyan-van petrosyan-van marked this pull request as ready for review July 14, 2025 09:46
@github-actions github-actions bot requested a review from rerickson1 July 14, 2025 09:46
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.

3 participants