diff --git a/drivers/modem/Kconfig.gsm b/drivers/modem/Kconfig.gsm index 780461d39fa..f1373e66597 100644 --- a/drivers/modem/Kconfig.gsm +++ b/drivers/modem/Kconfig.gsm @@ -53,6 +53,15 @@ config MODEM_GSM_APN Specify Access Point Name, i.e. the name to identify Internet IP GPRS cellular data context. +config GSM_PPP_AUTOSTART + bool "Auto-start PPP at boot" + default y + help + This setting lets driver connect to network and initialize PPP at + boot. Unselect this if you want to run application code before + modem connects to network. See contents of "drivers/gsm_ppp.h" + to get an idea of the API. + config MODEM_GSM_MANUAL_MCCMNO string "MCC/MNO for establishing network connection" help diff --git a/drivers/modem/gsm_ppp.c b/drivers/modem/gsm_ppp.c index cb98a41176a..4ff774dee42 100644 --- a/drivers/modem/gsm_ppp.c +++ b/drivers/modem/gsm_ppp.c @@ -794,7 +794,9 @@ static int gsm_init(const struct device *device) return -ENODEV; } - gsm_ppp_start(device); + if (IS_ENABLED(CONFIG_GSM_PPP_AUTOSTART)) { + gsm_ppp_start(device); + } return 0; }