Skip to content

Commit 97bc179

Browse files
committed
power on gnss modem
1 parent 26415d1 commit 97bc179

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

drivers/modem/Kconfig.cellular

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,9 @@ config MODEM_CELLULAR_NEW_BAUDRATE_DELAY
6262
range 0 1000
6363
default 100 if DT_HAS_U_BLOX_LARA_R6_ENABLED
6464
default 300
65+
config MODEM_CELLULAR_POWER_ON_GNSS
66+
bool "Power on the modem's GNSS module"
67+
depends on DT_HAS_SIMCOM_A76XX_ENABLED
68+
default false
6569

6670
endif

drivers/modem/modem_cellular.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,12 @@ MODEM_CHAT_SCRIPT_CMDS_DEFINE(simcom_a76xx_init_chat_script_cmds,
20732073
MODEM_CHAT_SCRIPT_CMD_RESP_NONE("AT", 100),
20742074
MODEM_CHAT_SCRIPT_CMD_RESP_NONE("AT", 100),
20752075
MODEM_CHAT_SCRIPT_CMD_RESP("ATE0", ok_match),
2076-
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CGNSSPWR=1", ok_match),
2076+
#if CONFIG_MODEM_CELLULAR_POWER_ON_GNSS
2077+
// Power on the GNSS module.
2078+
// We need to do this early, otherwise it does not work when
2079+
// doing it later (e.g. from a user pipe).
2080+
MODEM_CHAT_SCRIPT_CMD_RESP_MULT("AT+CGNSSPWR=1", allow_match),
2081+
#endif
20772082
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CFUN=4", ok_match),
20782083
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CMEE=1", ok_match),
20792084
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CREG=1", ok_match),

0 commit comments

Comments
 (0)