Skip to content

Commit 41fa7b7

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 348e261 commit 41fa7b7

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

drivers/modem/Kconfig.cellular

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,8 @@ 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
69+
default n
6670
endif

drivers/modem/modem_cellular.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,6 +2073,13 @@ 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+
#ifdef 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+
*/
2081+
MODEM_CHAT_SCRIPT_CMD_RESP_MULT("AT+CGNSSPWR=1", allow_match),
2082+
#endif
20762083
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CFUN=4", ok_match),
20772084
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CMEE=1", ok_match),
20782085
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CREG=1", ok_match),

0 commit comments

Comments
 (0)