CONFIG_LOG=y
CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=y
CONFIG_LOG_DEFAULT_LEVEL=2
##############################     0. Common setting     ##############################
CONFIG_MAIN_STACK_SIZE=9216
CONFIG_HEAP_MEM_POOL_SIZE=6144
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
# Power management, required to disable default behavior of deep sleep on timeout
CONFIG_PM_DEVICE=y
CONFIG_POWEROFF=y
# Enable DK LED and Buttons library
CONFIG_DK_LIBRARY=y
# Others
CONFIG_CRC=y
CONFIG_FPU=y
##############################      1. Driver Begin      ##############################
# Device drivers
CONFIG_SPI=y
CONFIG_I2C=y
CONFIG_FUEL_GAUGE=y
CONFIG_MAX17048=y
CONFIG_CHARGER_BQ24295=y
#For BME680 which on spi4, also need use Bosch BSEC lib for gas data parser
CONFIG_BME680=n
CONFIG_SETTINGS_NONE=n
CONFIG_SENSOR=y
CONFIG_BME68X_IAQ=y
CONFIG_BME68X_IAQ_SAMPLE_RATE_LOW_POWER=y
CONFIG_BME68X_IAQ_LOG_LEVEL_INF=y
#######################      2. Modem Configuration Begin      #######################
# For ublox SARA, UART, Enable the serial driver in asynchronous mode
CONFIG_UART_ASYNC_API=y
# Modem: Networking
CONFIG_NETWORKING=y
CONFIG_NET_NATIVE=y
CONFIG_NET_L2_PPP=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n
CONFIG_NET_TCP=y
CONFIG_NET_UDP=y
CONFIG_NET_SOCKETS=y
# DNS: no need when use IP address directly
CONFIG_DNS_RESOLVER=y
CONFIG_NET_L2_PPP_OPTION_DNS_USE=y
# Modem: Network management
CONFIG_NET_MGMT=y
CONFIG_NET_MGMT_EVENT=y
CONFIG_NET_MGMT_EVENT_STACK_SIZE=2048
CONFIG_NET_CONNECTION_MANAGER=y
# Modem driver
CONFIG_MODEM=y
CONFIG_MODEM_CELLULAR=y
CONFIG_MODEM_CELLULAR_APN="telenor.iot"
CONFIG_MODEM_MODULES_LOG_LEVEL_INF=y
CONFIG_MODEM_LOG_LEVEL_INF=y
# Modem buffer setting
CONFIG_NET_BUF_POOL_USAGE=y
CONFIG_NET_BUF_RX_COUNT=72
CONFIG_NET_PKT_RX_COUNT=36
CONFIG_NET_BUF_TX_COUNT=72
CONFIG_NET_PKT_TX_COUNT=36
CONFIG_NET_BUF_VARIABLE_DATA_SIZE=y
CONFIG_NET_BUF_DATA_POOL_SIZE=8192
CONFIG_MODEM_PPP_NET_BUF_FRAG_SIZE=512
# Enable the MQTT Lib and MQTT trace
CONFIG_MQTT_LIB=y
CONFIG_MQTT_LOG_LEVEL_INF=y
CONFIG_NET_LOG=y
CONFIG_NET_SHELL=n
# To support Tahu lib with strdup and clock_gettime
CONFIG_POSIX_API=y
# For debug and stack overflow guard
CONFIG_THREAD_NAME=y
CONFIG_WARN_EXPERIMENTAL=n
#######################   3. BLE Host Configuration Begin   #######################
# BLE, default CONFIG_BT_MAX_CONN=1, CONFIG_BT_MAX_PAIRED=1
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="BDS_IOTDL"
CONFIG_BT_CONN_CTX=y
CONFIG_BT_CONN_CTX_LOG_LEVEL_WRN=y
CONFIG_BT_CONN_LOG_LEVEL_WRN=y
CONFIG_BT_GATT_LOG_LEVEL_WRN=y
# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y
# For Data Length and MTU settting, MUST keep CONSISTANT with netCore!
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_USER_PHY_UPDATE=n
CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_L2CAP_TX_MTU=247
#######################         4. Log redirection          #######################
# Config logger and redirect log to JLINK RTT viewer
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_PRINTK=n
#######################    5. IoTDL test configuration      #######################
CONFIG_PM_TEST=n
CONFIG_FUELGAUGE_TEST=n
CONFIG_CHARGER_TEST=n
CONFIG_BME680_ZEPHYR=n
CONFIG_BME680_BSEC=y
CONFIG_MODEM_TEST=n
CONFIG_MQTT_TEST=n
CONFIG_SPARKPLUG_B_TEST=n
CONFIG_BLE_HOST=y

#######################              6. Storage             #######################
CONFIG_NORDIC_QSPI_NOR=y   #QSPI NOR Flash
CONFIG_PARTITION_MANAGER_ENABLED=y

CONFIG_PM_EXTERNAL_FLASH_HAS_DRIVER=y