nrf91_simple_tracker

Hi I am starting with nRF9160. I build and program "nrf91_simple_tracker," but while running, I got the following terminal output:

*** Booting Zephyr OS build v3.3.99-ncs1 ***
[00:00:00.254,028] .[0m<inf> Cellfund_Project: The nRF91 Simple Tracker Version 0.2.1 started
.[0m
[00:00:00.254,058] .[0m<inf> Cellfund_Project: Initializing modem library.[0m
[00:00:02.050,842] .[1;31m<err> lte_lc: Could not send AT command, error: 65536.[0m
[00:00:02.050,872] .[1;31m<err> lte_lc: Could not set system mode, error: -14.[0m
[00:00:02.050,872] .[1;31m<err> Cellfund_Project: Failed to initialize LTE link control library, error: -14.[0m
[00:00:02.050,903] .[1;31m<err> Cellfund_Project: Failed to configure the modem.[0m

I am using nRF Connect SDK v2.7.0 with VSC using SparkFun nRF9160 Thing Plus.

Any hints?

  • Hello, 

    Unfortunately, lesson 8 in the cellular fundementals course is not tested with nRF Connect SDK v2.7.0. Based on the output from your logs it does not look like you have built for v2.7.0. Can you please confirm?

    I tested with v2.6.1 and had no issues building and running on my nRF9160DK. Building with v2.7.0 you should have the following output:

    *** Booting nRF Connect SDK v2.7.0-5cb85570ca43 ***
    *** Using Zephyr OS v3.6.99-100befc70c74 ***
    [00:00:00.388,183] <inf> Cellfund_Project: The nRF91 Simple Tracker Version 0.2.1 started
    
    [00:00:00.388,244] <inf> Cellfund_Project: Initializing modem library
    [00:00:00.783,721] <inf> Cellfund_Project: Connecting to LTE network
    [00:00:00.829,772] <inf> Cellfund_Project: LTE cell changed: Cell ID: -1, Tracking area: -1
    
    [00:00:00.973,236] <inf> Cellfund_Project: Starting GNSS....
    [00:00:01.013,916] <inf> Cellfund_Project: Searching for GNSS Satellites....
    
    [00:00:02.014,709] <inf> Cellfund_Project: Searching for GNSS Satellites....

    Can you please confirm your setup? 

    What SIM card are you using?

    Kind regards,
    Øyvind

  • Hello, and thank you very much for your help. I failed to uninstall SDK v2.4; I had already uninstalled it; however, when I develop an app, the file "app_update.bin" is no longer generated. Until now, I set "CONFIG_BOOTLOADER_MCUBOOT=y" in the prj.conf in order to generate that file.

    Could you please help me?

  • I think we should stick to one issue in the ticket at first. Based on my last response, did you get it running?

    Kind regards,
    Øyvind

  • Thank you so much for your help!

    I uninstalled SDK V2.7.0 and installed SDK 2.6.1, then built and ran the app, yielding the following output:

    *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
    [00:00:00.254,089] .[0m<inf> Cellfund_Project: The nRF91 Simple Tracker Version 0.2.1 started
    .[0m
    [00:00:00.254,119] .[0m<inf> Cellfund_Project: Initializing modem library.[0m
    [00:00:00.442,443] .[1;31m<err> lte_lc: Could not send AT command, error: 65536.[0m
    [00:00:00.442,474] .[1;31m<err> lte_lc: Failed to set system mode and mode preference, err -14.[0m
    [00:00:02.024,871] .[0m<inf> Cellfund_Project: Connecting to LTE network.[0m
    [00:00:02.068,450] .[0m<inf> Cellfund_Project: LTE cell changed: Cell ID: -1, Tracking area: 65534
    .[0m
    [00:00:02.189,178] .[0m<inf> Cellfund_Project: Starting GNSS.....[0m
    [00:00:02.189,483] .[1;31m<err> Cellfund_Project: Failed to set GNSS fix interval.[0m

    My setup is:


    updated Windows 11 Pro
    Board: SparkFun nRF9160 Thing Plus
    active GNSS and LTE antennas

    Toolchain Manager v1.5.2

    nRF Connect SKD 2.6.1

    VSC extensions installed:
    *- C/C++
    *- C/C++ Extension Pack
    *- nRF Connect for VS Code
    *- CMake
    *- Cortex-Debug
    *- Kconfig for the Zephyr Project
    *- nRF Connect for VS Code Extension Pack
    *- nRF DeviceTree
    *- nRF Kconfig
    *- nRF Terminal
    *- nrf5-vscode

    My SIM card is from Telcel Mexico; with LTE-M, I already ran the app "external_rtc_time_sync" without a problem; I built the app today; however, it produced various errors that I'm not sure how to handle. is there a sheet with the error numbers and meanings?

    I got a warning:
    "UART_CONSOLE (defined at drivers/console/Kconfig:43) was assigned the value 'y' but got the kconfig [ln 43, Col 1]"

    Is there a paper including error numbers and their meanings? In order to understand what it means when I see "an error: -14" or "could not send AT command, error: 65536."

  • Hello, 

    Digisoles said:
    Is there a paper including error numbers and their meanings? In order to understand what it means when I see "an error: -14" or "could not send AT command, error: 65536."

    As described in lesson 3 of the cellular fundamentals course: The Modem library socket API sets the errno‘s as defined in nrf_errno.h, and the integration layer converts these errnos to adhere to the selected C library implementation (either minimal or Newlib).

    So for this case -14 - nrfxlib\nrf_modem\include\nrf_errno.h - translates into

    #define NRF_EFAULT 14           /**< Bad address */
    From the last log you provided we can see that this is reported by lte_lc, or the LTE Link Controller. In lte_lc.c we see that the only function returning Could not send AT command is 
     lte_lc_system_mode_set(). Looking at the header file, lte_lc.h and this function, we find:
    /**
     * Set the modem's system mode and LTE preference.
     *
     * @param[in] mode System mode.
     * @param[in] preference System mode preference.
     *
     * @retval 0 if successful.
     * @retval -EINVAL if input argument was invalid.
     * @retval -EFAULT if the network registration could not be retrieved from the modem.
     */
    int lte_lc_system_mode_set(enum lte_lc_system_mode mode,
    			   enum lte_lc_system_mode_preference preference);

    EFAULT if the network registration could not be retrieved from the modem. This could be due to AT+CFUN=1 being set before setting systemmode. Have you done any configurations to the sample or are you using the sample as on Github?

    Kind regards,
    Øyvind
Related