Skip to content

Commit 6a62527

Browse files
committed
modem_celullar: simcom a76xx: optionally power on GNSS
Optionally power on the GNSS module of simcom a76xx during the chat init script. This is necessary because it does not seem possible to power on the GNSS once the modem is in CMUX mode. Configurable through `CONFIG_MODEM_CELLULAR_POWER_ON_GNSS`. Signed-off-by: Olivier Lalonde <o@syskall.com>
1 parent ba88cf3 commit 6a62527

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

drivers/modem/Kconfig.cellular

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,7 @@ config MODEM_CELLULAR_NEW_BAUDRATE_DELAY
6363
default 100 if DT_HAS_U_BLOX_LARA_R6_ENABLED
6464
default 300
6565

66+
config MODEM_CELLULAR_POWER_ON_GNSS
67+
bool "Power on the modem's GNSS module"
68+
depends on DT_HAS_SIMCOM_A76XX_ENABLED
6669
endif

drivers/modem/modem_cellular.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,6 +2076,13 @@ MODEM_CHAT_SCRIPT_CMDS_DEFINE(simcom_a76xx_init_chat_script_cmds,
20762076
MODEM_CHAT_SCRIPT_CMD_RESP_NONE("AT", 100),
20772077
MODEM_CHAT_SCRIPT_CMD_RESP_NONE("AT", 100),
20782078
MODEM_CHAT_SCRIPT_CMD_RESP("ATE0", ok_match),
2079+
#ifdef CONFIG_MODEM_CELLULAR_POWER_ON_GNSS
2080+
/* Power on the GNSS module.
2081+
* We need to do this early, otherwise it does not work when
2082+
* doing it later (e.g. from a user pipe).
2083+
*/
2084+
MODEM_CHAT_SCRIPT_CMD_RESP_MULT("AT+CGNSSPWR=1", allow_match),
2085+
#endif
20792086
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CFUN=4", ok_match),
20802087
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CMEE=1", ok_match),
20812088
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CREG=1", ok_match),

0 commit comments

Comments
 (0)