getting started with nrf9160-dk talking to modem

I can't figure out how to run sample code that uses the LTE-M modem.

I see nrfxlib has a modem library.  But I don't know how to make a simple sample app that uses this.

I can currently run sample apps that blink an led and respond to button presses using vscode and also compiling/flashing from the command line.

But I don't know how to make this next step to integrate the nrfxlib or more generally, just have code that uses the modem.

Thanks 

Parents
  • Hi

    Please check out the "Getting started with nRF9160 DK" page that tells you how to update DK firmware, modem firmware and application firmware, as well as how to flash sample projects that use the LTE-M / NB-IoT and how to connect the DK to nRF Cloud for instance.

    Best regards,

    Simon

  • Here's an example of the errors I see constantly when I try to follow the huge quantity of documents.

    west build -p auto -b nrf9160dk_nrf9160_ns
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).                                                        
    -- Application: /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2
    -- Found Python3: /usr/bin/python3.10 (found suitable exact version "3.10.6") found components: Interpreter 
    -- Cache files will be written to: /home/dab/.cache/zephyr
    -- Zephyr version: 3.2.99 (/home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160_ns, Revision: 0.7.0
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.15.1 (/opt/zephyr-sdk-0.15.1-rc1)
    -- Found toolchain: zephyr 0.15.1 (/opt/zephyr-sdk-0.15.1-rc1)
    -- Found Dtc: /opt/zephyr-sdk-0.15.1-rc1/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
    -- Found devicetree overlay: /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/boards/nrf9160dk_nrf9160_ns.overlay
    -- Generated zephyr.dts: /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/build/zephyr/dts.cmake
    
    warning: NRF_CLOUD_AGPS (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/Kconfig.cloud_module:20) defined without a type
    
    warning: NRF_CLOUD_CELL_POS (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/Kconfig.cloud_module:40) defined without a type
    
    warning: AZURE_FOTA_APP_VERSION (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/../cloud/Kconfig.azure_fota_patch:10) defined without a type
    
    warning: AZURE_FOTA_VERSION_MAX_LEN (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/../cloud/Kconfig.azure_fota_patch:17) defined without a type
    
    warning: AZURE_FOTA_SEC_TAG (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/../cloud/Kconfig.azure_fota_patch:25) defined without a type
    
    warning: the int symbol GNSS_MODULE_ELEVATION_MASK (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/Kconfig.gnss_module:46) has a non-int default NRF_CLOUD_AGPS_ELEVATION_MASK (undefined)
    
    warning: <choice NRF_CLOUD_SEND_SOCKET> (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/Kconfig.cloud_module:32) defined with type unknown
    
    warning: <choice NRF_CLOUD_SEND_SOCKET> (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/Kconfig.cloud_module:32) defined without a prompt
    
    warning: the default selection NRF_CLOUD_SEND_TIMEOUT (undefined) of <choice NRF_CLOUD_SEND_SOCKET> (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/Kconfig.cloud_module:32) is not contained in the choice
    
    warning: <choice NRF_CLOUD_CLIENT_ID_SRC> (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/Kconfig.cloud_module:36) defined with type unknown
    
    warning: <choice NRF_CLOUD_CLIENT_ID_SRC> (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/Kconfig.cloud_module:36) defined without a prompt
    
    warning: the default selection NRF_CLOUD_CLIENT_ID_SRC_RUNTIME (undefined) of <choice NRF_CLOUD_CLIENT_ID_SRC> (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/Kconfig.cloud_module:36) is not contained in the choice
    
    warning: <choice CLOUD_SERVICE> (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/cloud/../../../../subsys/net/lib/Kconfig.cloud_choice:1) defined without a prompt
    
    warning: <choice ADXL372_BUS_TYPE> (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/../ext_sensors/Kconfig:25) defined with type unknown
    
    warning: <choice ADXL372_BUS_TYPE> (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/../ext_sensors/Kconfig:25) defined without a prompt
    
    warning: the default selection ADXL372_SPI (undefined) of <choice ADXL372_BUS_TYPE> (defined at /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/src/modules/../ext_sensors/Kconfig:25) is not contained in the choice
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:21: warning: attempt to assign the value '1024' to the undefined symbol AT_MONITOR_HEAP_SIZE
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:28: warning: attempt to assign the value 'y' to the undefined symbol NRF_MODEM_LIB
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:29: warning: attempt to assign the value 'y' to the undefined symbol NRF_MODEM_LIB_ON_FAULT_APPLICATION_SPECIFIC
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:33: warning: attempt to assign the value 'y' to the undefined symbol AT_HOST_LIBRARY
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:44: warning: attempt to assign the value 'n' to the undefined symbol LTE_AUTO_INIT_AND_CONNECT
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:45: warning: attempt to assign the value 'y' to the undefined symbol LTE_NETWORK_MODE_LTE_M_GPS
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:48: warning: attempt to assign the value '"11000001"' to the undefined symbol LTE_PSM_REQ_RPTAU
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:50: warning: attempt to assign the value '"00001010"' to the undefined symbol LTE_PSM_REQ_RAT
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:58: warning: attempt to assign the value 'y' to the undefined symbol FOTA_DOWNLOAD
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:59: warning: attempt to assign the value 'y' to the undefined symbol DFU_TARGET
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:60: warning: attempt to assign the value 'y' to the undefined symbol DOWNLOAD_CLIENT
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:61: warning: attempt to assign the value 'y' to the undefined symbol DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_1024
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:62: warning: attempt to assign the value '4096' to the undefined symbol DOWNLOAD_CLIENT_STACK_SIZE
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:63: warning: attempt to assign the value '2300' to the undefined symbol DOWNLOAD_CLIENT_BUF_SIZE
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:64: warning: attempt to assign the value '128' to the undefined symbol DOWNLOAD_CLIENT_MAX_HOSTNAME_SIZE
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:78: warning: attempt to assign the value 'y' to the undefined symbol SECURE_BOOT
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:79: warning: attempt to assign the value 'y' to the undefined symbol BUILD_S1_VARIANT
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:85: warning: attempt to assign the value 'y' to the undefined symbol APP_EVENT_MANAGER
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:86: warning: attempt to assign the value 'n' to the undefined symbol APP_EVENT_MANAGER_LOG_EVENT_TYPE
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:89: warning: attempt to assign the value 'y' to the undefined symbol CJSON_LIB
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:92: warning: attempt to assign the value 'y' to the undefined symbol CAF
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:94: warning: attempt to assign the value 'y' to the undefined symbol CAF_LEDS
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:95: warning: attempt to assign the value 'n' to the undefined symbol CAF_INIT_LOG_LED_READY_EVENTS
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:96: warning: attempt to assign the value 'n' to the undefined symbol CAF_INIT_LOG_LED_EVENTS
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:97: warning: attempt to assign the value 'n' to the undefined symbol CAF_INIT_LOG_MODULE_STATE_EVENTS
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf:100: warning: attempt to assign the value 'y' to the undefined symbol NRF_CLOUD_MQTT
    
    /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/boards/nrf9160dk_nrf9160_ns.conf:13: warning: attempt to assign the value 'y' to the undefined symbol CAF_LEDS_GPIO
    Parsing /home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/Kconfig
    Loaded configuration '/home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_defconfig'
    Merged configuration '/home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/prj.conf'
    Merged configuration '/home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/boards/nrf9160dk_nrf9160_ns.conf'
    
    error: Aborting due to Kconfig warnings
    
    CMake Error at zephyr/cmake/modules/kconfig.cmake:326 (message):
      command failed with return code: 1                                                                 
    Call Stack (most recent call first):                                                                 
      zephyr/cmake/modules/zephyr_default.cmake:108 (include)                                            
      zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)                                  
      zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)                      
      CMakeLists.txt:9 (find_package)                                                                    
                                                                                                         
                                                                                                         
    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: /bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2/build -GNinja -DBOARD=nrf9160dk_nrf9160_ns -S/home/dab/proj/datrix/centauri/nrf9160/sdk-nrf/applications/asset_tracker_v2                  

  • Or perhaps I can be more direct.

    I have a sample button press app compiling/flashing.

    I just want to add this function to it.  How do I do that?

    This gives me a link error for nrf_modem_at_cmd. 

    How do I make the compiler include the proper library (and header file)?

Reply Children
No Data
Related