in devacademy there are mqtt and gnss sample. when I put the mqtt configs to gnss sample. give an error. I did not add main code yet. just only put configs and cmake.
after combining mqtt to gnss , mqtt code is running but gnss code give error.
it is built, after flush when it is coming to gps int function . give failed to set gnss fix interval.
# # Copyright (c) 2019 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # # Logging CONFIG_LOG=y # Button and LED support CONFIG_DK_LIBRARY=y # Newlib CONFIG_NEWLIB_LIBC=y # STEP 2.2 - Enable printing of floating-points CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y CONFIG_FPU=y # Network CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y CONFIG_NET_SOCKETS_POSIX_NAMES=y # Memory CONFIG_HEAP_MEM_POOL_SIZE=4096 CONFIG_MAIN_STACK_SIZE=4096 # Modem library CONFIG_NRF_MODEM_LIB=y # LTE link control CONFIG_LTE_LINK_CONTROL=y CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT_GPS=y # STEP 7.1 - Request eDRX from the network CONFIG_LTE_EDRX_REQ=y # STEP 7.2 - Request PSM periodic TAU and active time CONFIG_LTE_PSM_REQ_RPTAU="00101000" CONFIG_LTE_PSM_REQ_RAT="00001000" CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT=y # MQTT # STEP 2.1 - Enable and configure the MQTT library CONFIG_MQTT_LIB=y CONFIG_MQTT_CLEAN_SESSION=y # Application CONFIG_MQTT_SUB_TOPIC="devacademy/subscribe/topic" CONFIG_BUTTON_EVENT_PUBLISH_MSG="Hi from the nRF91 Series device" CONFIG_MQTT_BROKER_PORT=1883 CONFIG_MQTT_PUB_TOPIC="" CONFIG_MQTT_BROKER_HOSTNAME="" CONFIG_MQTT_CLIENT_ID="MyClient" CONFIG_PRINTK=y CONFIG_COUNTER=y
# # Copyright (c) 2019 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # menu "Cellfund Lesson 6 Exercise" config MQTT_PUB_TOPIC string "MQTT publish topic" default "devacademy/publish/topic" config MQTT_SUB_TOPIC string "MQTT subscribe topic" default "devacademy/subscribe/topic" config MQTT_CLIENT_ID string "MQTT Client ID" help Use a custom Client ID string. If not set, the client ID will be generated based on IMEI number (for nRF91 Series based targets) or randomly (for other platforms). default "" config MQTT_BROKER_HOSTNAME string "MQTT broker hostname" default "test.mosquitto.org" config MQTT_BROKER_PORT int "MQTT broker port" default 1883 config MQTT_MESSAGE_BUFFER_SIZE int "MQTT message buffer size" default 128 config MQTT_PAYLOAD_BUFFER_SIZE int "MQTT payload buffer size" default 128 config BUTTON_EVENT_PUBLISH_MSG string "The message to publish on a button event" default "Hi from nRF91 Series device" config TURN_LED_ON_CMD string "Command to turn on LED" default "LED1ON" config TURN_LED_OFF_CMD string "Command to turn off LED" default "LED1OFF" config MQTT_RECONNECT_DELAY_S int "Seconds to delay before attempting to reconnect to the broker." default 60 config GNSS_PERIODIC_INTERVAL int "Fix interval for periodic GPS fixes. This determines your tracking frequency" range 10 65535 default 120 help Fix interval (in seconds) for periodic fixes. config GNSS_PERIODIC_TIMEOUT int "Fix timeout for periodic GPS fixes" range 0 65535 default 600 help Fix timeout (in seconds) for periodic fixes. If set to zero, GNSS is allowed to run indefinitely until a valid PVT estimate is produced. endmenu menu "Zephyr Kernel" source "Kconfig.zephyr" endmenu
# # Copyright (c) 2019 Nordic Semiconductor # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(cellular_fundamentals) # NORDIC SDK APP START target_sources(app PRIVATE src/main.c) target_sources(app PRIVATE src/mqtt_connection.c) # NORDIC SDK APP END