Hi,

Attempting to run the example Tracker on the 9160 feather

I get

Connecting..
Connected to /dev/ttyUSB1!
[00:00:00.487,915] <inf> regulator_fixed: nrf-ps-en sync: 0
[00:00:00.498,413] <inf> lis2dh: lis2dh@18: int1 on gpio@842500.29
[00:00:00.505,035] <inf> lis2dh: fs=2, odr=0x4 lp_en=0x8 scale=9576
*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.516,357] <inf> app_storage: Area 10 at 0xe8000 on littlefs volume for 3244032 bytes
[00:00:00.525,360] <inf> littlefs: LittleFS version 2.5, disk version 2.0
[00:00:00.533,599] <inf> littlefs: FS at w25q32jv@0:0xe8000 is 792 0x1000-byte blocks with 512 cycle
[00:00:00.543,243] <inf> littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.551,086] <inf> littlefs: /lfs mounted
[00:00:00.556,060] <inf> app_storage: /lfs mount: 0
[00:00:00.562,072] <inf> app_storage: /lfs: bsize = 16 ; frsize = 4096 ; blocks = 792 ; bfree = 790
[00:00:00.571,655] <inf> battery: Setup AIN7 got 0
[00:00:00.576,904] <inf> battery: Battery setup: 0 1
[00:00:00.582,336] <inf> golioth_system: Initializing
[00:00:00.588,012] <inf> app_main: Tracker. Version: 0.1.4-70-gf802216
[00:00:00.603,851] <err> app_gps: Failed to set GNSS use case
[00:00:00.610,321] <err> app_main: Unable to setup GPS. Err: -22

Err 22 is “invalid argument”

  • but this corresponds to the default setting for something to do with GNSS startup mode.
    I’ve tried adding another bit to this mask, but same error:

uint8_t use_case = NRF_MODEM_GNSS_USE_CASE_MULTIPLE_HOT_START | NRF_MODEM_GNSS_USE_CASE_LOW_ACCURACY;

Any pointers gratefully received.

Thx.R

I wondered if maybe the mode was already set and so commented out the error return.
It failed on the next call

[00:00:00.603,820] <err> app_gps: Failed to set GNSS use case: (-22) continuing...
[00:00:00.613,830] <err> app_gps: Failed to set GNSS power saving mode
[00:00:00.621,093] <err> app_main: Unable to setup GPS. Err: -22

I also tried enabling it on the AT interface

AT%XSYSTEMMODE=0,1,1,2

But this made no difference.

I noticed in the GNSS library API the error code (22) may also mean: the operation cannot be executed while GNSS is running.

And so I tried to turn it off before the setup call in case a bit of NVM settings started GNSS at boot.

err = app_gps_stop();
    LOG_INF("Stopped GPS: %d", err);


    /* Setup gps */
    err = app_gps_setup();
    if (err)
        LOG_ERR("Unable to setup GPS. Err: %i", err);

But I don’t think it is running - -1 means “not possible”

[00:00:00.588,165] <inf> app_main: Tracker. Version: 0.1.4-70-gf802216
[00:00:00.595,245] <wrn> app_gps: Failed to stop GPS, error: -1
[00:00:00.601,867] <inf> app_main: Stopped GPS: -1
[00:00:00.615,844] <err> app_gps: Failed to set GNSS use case: (-22) continuing...
[00:00:00.625,854] <err> app_gps: Failed to set GNSS power saving mode
[00:00:00.633,117] <err> app_main: Unable to setup GPS. Err: -22

Not sure what else I can try here….

    robshep I just pushed. If you want to do a git pull or Zephyr Tools: Update Dependencies and try again.

    
    Connecting..
    Connected to /dev/ttyUSB0!
    
    
    [00:00:00.488,677] <inf> regulator_fixed: nrf-ps-en sync: 0
    [00:00:00.501,434] <inf> lis2dh: lis2dh@18: int1 on gpio@842500.29
    [00:00:00.510,375] <inf> lis2dh: lis2dh@18: int2 on gpio@842500.30
    [00:00:00.521,575] <inf> lis2dh: fs=2, odr=0x4 lp_en=0x8 scale=9576
    uart:~$ *** Booting Zephyr OS build v3.2.99-ncs1 ***
    [00:00:00.535,186] <inf> app_storage: Area 10 at 0xe8000 on littlefs volume for 3244032 bytes
    [00:00:00.546,478] <inf> littlefs: LittleFS version 2.5, disk version 2.0
    [00:00:00.556,976] <inf> littlefs: FS at w25q32jv@0:0xe8000 is 792 0x1000-byte blocks with 512 cycle
    [00:00:00.568,908] <inf> littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
    [00:00:00.579,040] <inf> littlefs: /lfs mounted
    [00:00:00.586,273] <inf> app_storage: /lfs mount: 0
    [00:00:00.594,543] <inf> app_storage: /lfs: bsize = 16 ; frsize = 4096 ; blocks = 792 ; bfree = 790
    [00:00:00.606,414] <inf> battery: Setup AIN7 got 0
    [00:00:00.613,922] <inf> battery: Battery setup: 0 1
    [00:00:00.621,612] <inf> golioth_system: Initializing
    [00:00:00.630,035] <inf> app_main: Tracker. Version: 0.1.4-70-gf802216
    [00:00:05.368,255] <inf> app_main: IMEI: 351516178724019
    [00:00:05.376,342] <inf> golioth_system: Starting connect
    [00:00:05.376,861] <inf> lis2dh: int2_ths=0x5f range_g=2 ums2=14709974
    [00:00:05.398,376] <inf> app_main: Evt: APP_EVENT_CELLULAR_DISCONNECT
    [00:00:05.407,562] <inf> app_main: Evt: APP_EVENT_CELLULAR_CONNECTED
    [00:00:05.418,212] <inf> app_main: Evt: APP_EVENT_GPS_ACTIVE
    [00:00:06.021,820] <inf> app_main: Evt: APP_EVENT_BACKEND_ERROR
    [00:00:06.030,761] <inf> golioth_system: Client connected!
    [00:00:06.075,958] <inf> battery: raw 7230 ~ 1588 mV => 3176 mV
    [00:00:16.269,927] <inf> app_main: Evt: APP_EVENT_MOTION_DATA

    @jaredwolff just wanted to say thanks for this.
    Buried with snow today so will get to my desk after the weekend.
    Thanks

    4 days later

    Thank you for the updates Jared,
    Seems to build and run.

    After fiddling with KConfig I see connection updates from Golioth

    Status
    Connection Status offline 3 minutes ago
    Last Report 4 minutes ago

    Which updates every so often - but no other data in the stream. I was expecting to see GPS data.
    Every time I plug the device in to look at the console, it seems to disconnect from the cell network, or at least “Backend Error” is repeated every few minutes - maybe signal coverage, who knows :/

    It’s possible my choice of KConfig settings are misconfigured.
    It seems I needed to change some to allow my APN and user/pass, and to set the RAT to NBIOT.
    Some of these settings have been included automatically (e.g. COEX ??)

    I’ll be honest, not a lot of this world of NB-IoT seems easy enough for me to grasp in the time I have available.

    CONFIG_APP_VERSION_COMMIT=71
    CONFIG_APP_VERSION_HASH="g90b106b"
    CONFIG_APP_VERSION="0.1.4-71-g90b106b"
    CONFIG_SRAM_SIZE=128
    CONFIG_SRAM_BASE_ADDRESS=0x20020000
    CONFIG_PDN=y
    CONFIG_PDN_DEFAULTS_OVERRIDE=y
    CONFIG_PDN_DEFAULT_APN="mm.lpwan"
    CONFIG_PDN_DEFAULT_FAM_IPV4=y
    CONFIG_PDN_DEFAULT_AUTH_PAP=y
    CONFIG_PDN_DEFAULT_USERNAME="vodafone"
    CONFIG_PDN_DEFAULT_PASSWORD="vodafone"
    CONFIG_MODEM_ANTENNA_AT_COEX0="AT%XCOEX0=1,1,1565,1586"
    CONFIG_GOLIOTH_SYSTEM_CLIENT_PSK_ID="<mydevice>@<my_project>"
    CONFIG_GOLIOTH_SYSTEM_CLIENT_PSK="<hex>"
    CONFIG_ADD_MCUBOOT_MEDIATE_SIM_FLASH_DTS=y
    CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE=2048
    
    CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=y
    CONFIG_LTE_MODE_PREFERENCE_NBIOT=y
    CONFIG_LTE_LC_TRACE=y
    
    # Project specific
    # CONFIG_DISCONNECT_FOR_FIRST_FIX=y

      robshep CONFIG_MODEM_ANTENNA_AT_COEX0 is critical for GPS to work.

      Most likely you’re not getting a fix that’s why no data. Where are you putting the board during your testing? Does it have a direct view of the sky?

      Terms and Conditions | Privacy Policy