This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thingy:91 Trying to disable BME680 sensor in Zephyr

I'm building an LTE device that only needs the GPS, LTE, motion, and button.

I'm trying as the first step to disable all the sensors that are not needed so that I don't send unneeded data to the cloud. Latter will have to eliminate their FW code from the project.

I could successfully eliminate the light sensor data using Configure nRF connect SDK project GUI and the GPS and everything else works fine, but when I tried to disable the BME680 sensor from Zephyr Kernel I had a strange situation where the GPS is not sending to the cloud and the button although I did not touch them in the GUI.

Best Regards,

HeTsH (Hesham) 

Parents
  • Thank you Didrik,

    Bellow is the prj.conf and this only makes the connection and no message shows on the terminal

    :

    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
    #
    # General config
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
    CONFIG_ASSERT=y
    CONFIG_REBOOT=y
    CONFIG_LOG=y
    CONFIG_LOG_IMMEDIATE=y

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

    # LTE link control
    CONFIG_POWER_OPTIMIZATION_ENABLE=n
    #CONFIG_POWER_OPTIMIZATION_ENABLE=y
    CONFIG_LTE_LINK_CONTROL=y
    CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y
    CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
    CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG=y

    CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=n
    CONFIG_LTE_LEGACY_PCO_MODE=n
    CONFIG_LTE_PSM_REQ_RPTAU="00000110"
    CONFIG_LTE_PSM_REQ_RAT="00000010"

    # Modem info
    CONFIG_MODEM_INFO=y

    # BSD library
    CONFIG_BSD_LIBRARY=y
    CONFIG_BSD_LIBRARY_TRACE_ENABLED=n

    # nRF Cloud
    CONFIG_CLOUD_API=y
    CONFIG_NRF_CLOUD=y
    CONFIG_NRF_CLOUD_LOG_LEVEL_DBG=y
    CONFIG_NRF_CLOUD_AGPS=y
    CONFIG_NRF_CLOUD_CONNECTION_POLL_THREAD=y
    CONFIG_NRF_CLOUD_NONBLOCKING_SEND=y
    # Needed for the cloud codec
    CONFIG_CJSON_LIB=y
    # Shorter to prevent NAT timeouts
    CONFIG_MQTT_KEEPALIVE=120
    # Don't resubscribe to topics if broker remembers them
    CONFIG_CLOUD_PERSISTENT_SESSIONS=y

    # Sensors
    CONFIG_ACCEL_USE_SIM=y
    #CONFIG_TEMP_USE_SIM=n
    #CONFIG_CLOUD_BUTTON=y
    CONFIG_TEMP_USE_SIM=y
    CONFIG_CLOUD_BUTTON=n

    # GPS
    CONFIG_NRF9160_GPS=y
    # CONFIG_GPS_USE_SIM=y
    CONFIG_NRF9160_GPS_LOG_LEVEL_DBG=y
    CONFIG_GPS_USE_EXTERNAL=y
    CONFIG_GPS_DEV_NAME="NRF9160_GPS"
    CONFIG_GPS_CONTROL_PSM_ENABLE_ON_START=y

    CONFIG_GPS_CONTROL_FIRST_FIX_CHECK_DELAY=10
    CONFIG_GPS_CONTROL_FIX_CHECK_INTERVAL=30
    CONFIG_GPS_CONTROL_FIX_TRY_TIME=180
    CONFIG_GPS_CONTROL_PSM_DISABLE_ON_STOP=n

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

    # Console
    CONFIG_CONSOLE_SUBSYS=y
    CONFIG_CONSOLE_HANDLER=y
    CONFIG_CONSOLE_GETCHAR=y

    # Heap and stacks
    CONFIG_HEAP_MEM_POOL_SIZE=16384
    CONFIG_MAIN_STACK_SIZE=8192
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    CONFIG_HW_STACK_PROTECTION=y

    # MCUBOOT
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_IMG_MANAGER=y
    CONFIG_MCUBOOT_IMG_MANAGER=y

    # Flash
    CONFIG_FLASH=y
    CONFIG_IMG_ERASE_PROGRESSIVELY=y

    # AWS FOTA
    CONFIG_AWS_FOTA=y
    CONFIG_FOTA_DOWNLOAD=y
    CONFIG_AWS_FOTA_LOG_LEVEL_DBG=y
    CONFIG_AWS_JOBS_LOG_LEVEL_DBG=y
    CONFIG_DFU_TARGET=y

    # Download client (needed by AWS FOTA)
    CONFIG_DOWNLOAD_CLIENT=y
    CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096

    # Fatal error
    CONFIG_RESET_ON_FATAL_ERROR=n
    CONFIG_WATCHDOG=y

  • Did you try to add CONFIG_GPS_START_AFTER_CLOUD_EVT_READY=y?

Reply Children
Related