Hi Folks,
Am trying to get the Nordic sample program aws_iot running on the Feather and am running into issues actually getting on the network. I have a valid SIM and have run this app successfully on the 9160DK. Does anyone have any tips? It seems like the connection manager is not trying to engage LTE. I’ve tried a number of directives to enable debugging and also obtain a modem trace but can’t seem to get a different result.

Thanks in advance for any pointers!
Jim

Hi @jfc

Getting those samples to work with the nRF9160 Feather is tricky since they’re specifically designed for the sensors on the Thingy91 and 9160DK. Usually the build will break before getting usable .hex/.bin files. I’m assuming you already made a crack at that since it’s running?

There may be some logic in the code which prompts a connection once an event occurs. The event may be created by one of the aforementioned sensors. I’d have to go back and look at their code though since that sample has changed a lot over the past few years.

  • jfc replied to this.

    jaredwolff
    Hi Jared,
    Thanks for the quick reply. Yes it compiles seemingly clean after adding the MCU directive and a minor code edit. I was also thinking along those lines of some kind of initiating event. At some point I was able to get a modem trace and it showed the modem not doing a whole lot which led me to believe the network manager wasn’t trying to bring up a connection - again suggesting a missing initiating step.

    I’ll look further for the sensor element of this sample.

    Thanks,
    Jim

    For what its worth, I did get the sample to run on the Feather and publish to AWS. I don’t fully understand why these particular combinations of CONFIG_* directives work. One file is just basic publishing and the other includes modem tracing. I used the same circuitdojo_feather_nrf9160_ns.conf and circuitdojo_feather_nrf9160_ns.overlay files as are distributed with the Feather samples. Here are the prj.conf files in case someone finds them useful.

    Could be something here is kicking the modem stack and causing it to engage with the connection manager - I really don’t know.

    Jim

    aws_iot_prj.conf-basic

    #
    # Copyright (c) 2020 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # General
    CONFIG_LOG=y
    CONFIG_LOG_BUFFER_SIZE=2048
    CONFIG_HW_ID_LIBRARY=y
    CONFIG_ASSERT=y
    CONFIG_JSON_LIBRARY=y
    
    # Heap and stacks
    CONFIG_HEAP_MEM_POOL_SIZE=8192
    CONFIG_MAIN_STACK_SIZE=4096
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_NATIVE=y
    CONFIG_NET_IPV4=y
    CONFIG_NET_CONNECTION_MANAGER=y
    
    # AWS IoT library
    CONFIG_AWS_IOT=y
    CONFIG_AWS_IOT_CLIENT_ID_STATIC="nRF-use-your-device"
    CONFIG_AWS_IOT_BROKER_HOST_NAME="use-your-endpoint"
    CONFIG_AWS_IOT_SEC_TAG=999
    CONFIG_AWS_IOT_APP_SUBSCRIPTION_LIST_COUNT=2
    CONFIG_AWS_IOT_TOPIC_UPDATE_DELTA_SUBSCRIBE=y
    CONFIG_AWS_IOT_TOPIC_GET_ACCEPTED_SUBSCRIBE=y
    CONFIG_AWS_IOT_TOPIC_GET_REJECTED_SUBSCRIBE=y
    CONFIG_AWS_IOT_LAST_WILL=y
    
    # MQTT - Maximum MQTT keepalive timeout specified by AWS IoT Core
    CONFIG_MQTT_KEEPALIVE=1200
    CONFIG_MQTT_CLEAN_SESSION=y
    
    # For Feather usage
    
    # Modem Stuff
    CONFIG_AT_CMD_PARSER=y
    CONFIG_AT_HOST_LIBRARY=y
    CONFIG_MODEM_INFO=y
    CONFIG_NRF_MODEM_LIB_NET_IF_AUTO_START=n
    CONFIG_NRF_MODEM_LIB_ON_FAULT_APPLICATION_SPECIFIC=y
    #CONFIG_NRF_MODEM_LIB_TRACE=y
    #CONFIG_NRF_MODEM_LIB_TRACE_BACKEND_UART=y
    #CONFIG_NRF_MODEM_LIB_TRACE_BACKEND_UART_ZEPHYR=y
    
    # FOTA
    CONFIG_AWS_FOTA=y
    CONFIG_DFU_TARGET=y
    CONFIG_FOTA_DOWNLOAD=y
    CONFIG_DOWNLOAD_CLIENT=y
    CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
    CONFIG_IMG_MANAGER=y
    
    # App
    CONFIG_AWS_IOT_SAMPLE_DEVICE_ID_USE_HW_ID=n
    #CONFIG_AWS_IOT_LOG_LEVEL_DBG=y
    
    # Feather Standard
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    # Flash Storage
    CONFIG_FLASH=y
    CONFIG_FLASH_MAP=y
    CONFIG_IMG_ERASE_PROGRESSIVELY=y
    CONFIG_STREAM_FLASH=y
    
    # WAN and Networking
    CONFIG_LTE_CONNECTIVITY=y
    #CONFIG_LTE_CONNECTIVITY_AUTO_DOWN=n
    #CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG=y
    #CONFIG_NET_CONNECTION_MANAGER_LOG_LEVEL_DBG=y
    CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=1024
    CONFIG_NET_IPV6_MLD=n
    CONFIG_NET_IPV6_NBR_CACHE=n
    
    # Tracing?
    CONFIG_SERIAL=y
    CONFIG_UART_INTERRUPT_DRIVEN=y

    aws_iot_prj.conf-modem-trace

    #
    # Copyright (c) 2020 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # General
    CONFIG_LOG=y
    CONFIG_LOG_BUFFER_SIZE=2048
    CONFIG_HW_ID_LIBRARY=y
    CONFIG_ASSERT=y
    CONFIG_JSON_LIBRARY=y
    
    # Heap and stacks
    CONFIG_HEAP_MEM_POOL_SIZE=8192
    CONFIG_MAIN_STACK_SIZE=4096
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_NATIVE=y
    CONFIG_NET_IPV4=y
    CONFIG_NET_CONNECTION_MANAGER=y
    
    # AWS IoT library
    CONFIG_AWS_IOT=y
    CONFIG_AWS_IOT_CLIENT_ID_STATIC="nRF-use-your-device"
    CONFIG_AWS_IOT_BROKER_HOST_NAME="use-your-endpoint"
    CONFIG_AWS_IOT_SEC_TAG=999
    CONFIG_AWS_IOT_APP_SUBSCRIPTION_LIST_COUNT=2
    CONFIG_AWS_IOT_TOPIC_UPDATE_DELTA_SUBSCRIBE=y
    CONFIG_AWS_IOT_TOPIC_GET_ACCEPTED_SUBSCRIBE=y
    CONFIG_AWS_IOT_TOPIC_GET_REJECTED_SUBSCRIBE=y
    CONFIG_AWS_IOT_LAST_WILL=y
    
    # MQTT - Maximum MQTT keepalive timeout specified by AWS IoT Core
    CONFIG_MQTT_KEEPALIVE=1200
    CONFIG_MQTT_CLEAN_SESSION=y
    
    # For Feather usage
    
    # Modem Stuff
    CONFIG_AT_CMD_PARSER=y
    CONFIG_AT_HOST_LIBRARY=y
    CONFIG_MODEM_INFO=y
    CONFIG_NRF_MODEM_LIB_NET_IF_AUTO_START=n
    CONFIG_NRF_MODEM_LIB_ON_FAULT_APPLICATION_SPECIFIC=y
    CONFIG_NRF_MODEM_LIB_TRACE=y
    CONFIG_NRF_MODEM_LIB_TRACE_BACKEND_UART=y
    CONFIG_NRF_MODEM_LIB_TRACE_BACKEND_UART_ZEPHYR=y
    
    # FOTA
    CONFIG_AWS_FOTA=y
    CONFIG_DFU_TARGET=y
    CONFIG_FOTA_DOWNLOAD=y
    CONFIG_DOWNLOAD_CLIENT=y
    CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
    CONFIG_IMG_MANAGER=y
    
    # App
    CONFIG_AWS_IOT_SAMPLE_DEVICE_ID_USE_HW_ID=n
    CONFIG_AWS_IOT_LOG_LEVEL_DBG=y
    
    # Feather Standard
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    # Flash Storage
    CONFIG_FLASH=y
    CONFIG_FLASH_MAP=y
    CONFIG_IMG_ERASE_PROGRESSIVELY=y
    CONFIG_STREAM_FLASH=y
    
    # WAN and Networking
    CONFIG_LTE_CONNECTIVITY=y
    #CONFIG_LTE_CONNECTIVITY_AUTO_DOWN=n
    #CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG=y
    #CONFIG_NET_CONNECTION_MANAGER_LOG_LEVEL_DBG=y
    CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=1024
    CONFIG_NET_IPV6_MLD=n
    CONFIG_NET_IPV6_NBR_CACHE=n
    
    # Tracing?
    CONFIG_SERIAL=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    Terms and Conditions | Privacy Policy