# Copyright (c) 2023 PMD Device Solutions Ltd
# SPDX-License-Identifier: Apache-2.0

config MODEM_NRF9160_SLM
	bool "Support Nordic 9160 Simple LTE Modem"
	select MODEM_CONTEXT
	select MODEM_CMD_HANDLER
	select MODEM_IFACE_UART
	select NET_MGMT
	select NET_MGMT_EVENT
	select NET_OFFLOAD
	help
	  Enable support for Nordic 9160 with Simple LTE Modem sample.
	  Requires support for TLS in the application.

if MODEM_NRF9160_SLM

config MODEM_NRF9160_SLM_RX_STACK_SIZE
	int "Size of the stack allocated for receiving data from modem"
	default 512
	help
	  Sets the stack size which will be used by the GSM RX thread.

config MODEM_NRF9160_SLM_WORKQ_STACK_SIZE
	int "Size of the stack allocated for the dedicated gsm workqueue"
	default 2048
	help
	  Sets the stack size which will be used by the dedicated GSM workqueue
	  thread.

config MODEM_NRF9160_SLM_INIT_PRIORITY
	int "Init priority for the GSM modem driver"
	default 42
	range 0 99
	help
	  The GSM modem is initialized in POST_KERNEL using priority in
	  the range 0-99.

config MODEM_NRF9160_SLM_APN
	string "Access Point Name"
	default ""
	help
	  Specify Access Point Name, i.e. the name to identify Internet IP
	  GPRS cellular data context.
	  Note that most NB-IoT operators preconfugre it, set it to "" to use the SIM defaults.

config MODEM_NRF9160_SLM_ATTACH_TIMEOUT
	int "Timeout for attaching to packet service"
	default 30
	help
	  Before activating PPP, attachment to packet service is checked
	  using AT+CGATT. This setting dictates how much time in seconds
	  we give the modem before giving up.

config MODEM_NRF9160_SLM_REGISTER_TIMEOUT
	int "Timeout for registering to cellular tower"
	default 300
	help
	  Before attachment to packet service, modem is checked if it is
	  connected to the cellular tower. This setting dictates how much
	  time in seconds we give the modem before giving up.

config MODEM_NRF9160_SLM_MANUAL_MCCMNO
	string "MCC/MNO for establishing network connection"
	help
	  This setting is used in the AT+COPS command to set the MCC/MNO
	  for the network connection context.  This value is specific to
	  the network provider and may need to be changed if auto is not
	  selected.

config MODEM_NRF9160_SLM_RSSI_POLLING_PERIOD
	int "Configure RSSI polling period (in seconds)"
	default 30
	help
	  This settings is used to configure the period of RSSI polling

config MODEM_NRF9160_SLM_ENABLE_CESQ_RSSI
	bool "+CESQ RSSI measurement"
	help
	   If this is enabled, RSRP, RSCP and RXREL values are read from the
	   modem with +CESQ. Otherwise only RSSI value is read with +CSQ
	   from the modem.

config MODEM_NRF9160_SLM_URL_LEN
	int "Maximum URL length"
	default 128

config MODEM_NRF9160_SLM_HOST_LEN
	int "Maximum host name length"
	default 128

config MODEM_NRF9160_SLM_HEADER_LEN
	int "Maximum header length"
	default 1024

config MODEM_NRF9160_SLM_CONTENT_TYPE_LEN
	int "Maximum content type length"
	default 128

config MODEM_NRF9160_SLM_HTTP_CONNECT_TIMEOUT
	int "HTTP connection timeout"
	default 30
	help
	  Connection timeout for HTTP(S) connections using the internal modem API.

config MODEM_NRF9160_SLM_HTTP_SEND_TIMEOUT
	int "HTTP connection timeout"
	default 60
	help
	  Connection timeout for HTTP(S) send using the internal modem API.

config MODEM_NRF9160_SLM_DATAMODE_TERMINATOR
	string "Terminator string for data mode"
	default "+++"
	help
	  String that is used to terminate data mode in NRF9160. This must match the option
	  SLM_DATAMODE_TERMINATOR in Nordic SLM Application configuration.

endif

