#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic

# Main
CONFIG_NCS_SAMPLES_DEFAULTS=n
#we want to be able to reboot
CONFIG_REBOOT=y
CONFIG_FPU=y

CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_MAIN_STACK_SIZE=16384
CONFIG_ISR_STACK_SIZE=4096
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

#Watchdog
CONFIG_WATCHDOG=y

# Following 2 are added to avoid k_timeout_t error
CONFIG_DATE_TIME=y

#Logging
# CONFIG_LOG=y
# CONFIG_AT_CMD_LOG_LEVEL_DBG=y
# CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_BSD_LIBRARY_TRACE_ENABLED=n

# Network
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_NATIVE=n
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y

# SMS
CONFIG_SMS=y

# LTE link control
#use 60 seconds timeout
CONFIG_LTE_NETWORK_TIMEOUT=60
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n


#psm
#CONFIG_LTE_LEGACY_PCO_MODE=y
#101 = minuts, 1010 = 10 (10 minutes PSM)
#CONFIG_LTE_PSM_REQ_RPTAU="10101010" 
#001 - 1 hours       00001 (1) = 1 hours, 01010 = 10 hours, 00100 = 4 hours
CONFIG_LTE_PSM_REQ_RPTAU="00100100"
#000 - 2 second      00001 (2) = 2 seconds on time, 00011 = 6 second on time
CONFIG_LTE_PSM_REQ_RAT="00000001"

#required for GPS
CONFIG_SUPL_CLIENT_LIB=y

# BSD library
CONFIG_BSD_LIBRARY=y
CONFIG_BSD_LIBRARY_SYS_INIT=n

# Library for buttons and LEDs
CONFIG_DK_LIBRARY=y
CONFIG_DK_LIBRARY_INVERT_LEDS=n

# Image manager
CONFIG_IMG_MANAGER=y
CONFIG_FLASH=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

# FOTA library
CONFIG_FOTA_DOWNLOAD=y

# Download client
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096

# DFU Target
CONFIG_DFU_TARGET=y

# Modem key management
CONFIG_MODEM_KEY_MGMT=y

# Application Upgrade support
CONFIG_BOOTLOADER_MCUBOOT=y

#AT Commands - required for GPS
CONFIG_AT_CMD=y
CONFIG_AT_NOTIF=y


#others

CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

# MQTT
CONFIG_MQTT_LIB=y
CONFIG_MQTT_LIB_TLS=n
CONFIG_MQTT_KEEPALIVE=3600
CONFIG_MQTT_CLEAN_SESSION=y
# Enable logging
CONFIG_LOG=y
CONFIG_MQTT_SIMPLE_LOG_LEVEL_DBG=y
# CONFIG_MQTT_TLS_SESSION_CACHING=y

#nrfx drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y


#CONFIG_BOARD_PCA10090_UART1_ARDUINO=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_UART_CONSOLE=y

# GPIO
CONFIG_GPIO=y
