Failed to generate JWT

Hello, 

Every time I try to run the sample gnss in SDK 1.8, I got this error gnss_sample: Failed to generate JWT, error: -8

Please can you let me what this error means and what should I do to solve this problem?

*** Booting Zephyr OS build v2.7.0-ncs1  ***
[00:00:00.230,346] <inf> gnss_sample: Starting GNSS sample
[00:00:00.246,337] <inf> gnss_sample: Connecting to LTE network
[00:00:02.068,206] <inf> gnss_sample: Connected to LTE network
[00:00:02.068,878] <inf> gnss_sample: Waiting for current time
[00:00:02.086,334] <inf> nrf_cloud_pgps: Checking P-GPS header: Schema version:1, type:10, num:1, count:42
[00:00:02.086,914] <inf> nrf_cloud_pgps:   size:2006, period (minutes):240, GPS day:15372, GPS time:57600
[00:00:02.087,493] <inf> nrf_cloud_pgps: Checking stored P-GPS data; count:42, period_min:240
[00:00:02.088,409] <inf> nrf_cloud_pgps: num blocks:42, size:2048, first_free:-1
[00:00:02.088,897] <inf> nrf_cloud_pgps: map:111111111111111111111111111111111111111111
[00:00:02.089,324] <inf> nrf_cloud_pgps: Checking if P-GPS data is expired...
[00:00:02.089,752] <inf> nrf_cloud_pgps: Looking for prediction for: GPS sec:1328862732, day:15380, time of day:30732, week:2197, day of week:1, time of week:117132, toe:7320
[00:00:02.090,606] <inf> nrf_cloud_pgps: First stored prediction: GPS sec:1328198400, day:15372, time of day:57600, week:2196, day of week:0, time of week:57600, toe:3600
[00:00:02.091,461] <inf> nrf_cloud_pgps: current offset into prediction set, sec:664332
[00:00:02.091,949] <wrn> nrf_cloud_pgps: data expired!
[00:00:02.092,285] <wrn> nrf_cloud_pgps: Predictions expired. Requesting predictions...
[00:00:02.097,839] <inf> gnss_sample: Sending request for P-GPS predictions to nRF Cloud...
[00:00:02.208,404] <err> nrf_cloud_jwt: Failed to generate JWT, error: -8
[00:00:02.208,831] <err> gnss_sample: Failed to generate JWT, error: -8
[00:00:02.209,259] <inf> gnss_sample: Assistance data needed, ephe 0xffffffff, alm 0xffffffff, flags 0x3b
[00:00:02.209,808] <inf> nrf_cloud_pgps: Searching for prediction
[00:00:02.210,235] <inf> nrf_cloud_pgps: Looking for prediction for: GPS sec:1328862732, day:15380, time of day:30732, week:2197, day of week:1, time of week:117132, toe:7320
[00:00:02.211,090] <inf> nrf_cloud_pgps: First stored prediction: GPS sec:1328198400, day:15372, time of day:57600, week:2196, day of week:0, time of week:57600, toe:3600
[00:00:02.211,944] <inf> nrf_cloud_pgps: current offset into prediction set, sec:664332
[00:00:02.212,402] <wrn> nrf_cloud_pgps: data expired!

Parents
  • Hi, 

    Please update Update Certificates as this documentation https://docs.nrfcloud.com/Guides/GettingStarted/Devices/#securely-generating-credentials-on-the-nrf9160 

    What is the modem firmware version? The latest version is v1.3.1 here

    Regards,
    Amanda

  • Thanks, Amanda, 

    I've tried to update the modem to the last version 1.31 and generate a new certification and make the provisioning again.

    It was very complicated to generate new keys and assign the public key to nrfcloud. And besides that, it didn't work by GUI of the website (NRFcloud ) to assign the public key so I had to use REST API to assign the public key of thingy91. 

    Finally, the Jwt-error doesn't appear anymore but now it seems that the GNSS methods don't work in the Location sample and only Cellular works fine, is there anything else I need to do to get AGPS/PGPS working fine? or is there any easy way to test AGPS/PGPS of nrfcloud with thingy91 without those complications :)?

    Waiting for current time
    Requesting location with short GNSS timeout to trigger fallback to cellular...
    [00:00:02.084,808] <inf> nrf_cloud_pgps: Checking P-GPS header: Schema version:0, type:0, num:0, count:0
    [00:00:02.085,357] <inf> nrf_cloud_pgps:   size:0, period (minutes):0, GPS day:0, GPS time:0
    [00:00:02.085,876] <wrn> nrf_cloud_pgps: One or more fields are wrong
    [00:00:29.777,252] <wrn> location: Timeout occurred
    [00:00:29.777,862] <wrn> location: Failed to acquire location using 'GNSS', trying with 'Cellular' next

  • Hi, 

    To build the Location sample with P-GPS support, use the -DOVERLAY_CONFIG=overlay-pgps.conf option. For example:

    west build -p -b nrf9160dk_nrf9160_ns -- -DOVERLAY_CONFIG=overlay-pgps.conf

    See Providing CMake options for more instructions on how to add this option.

    If it cannot fix the issue, please create a new support case for the new issue. This is away from the original scope. 

    -Amanda

Reply Children
No Data
Related