This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

AGPS with nrf cloud, Cannot parse schema version: 123

Hello,

I come to you because I wanted to recover the GPS data in my project for that I based on the sample agps, however when I launch my project at the time of the reception of data of the cloud I have this error:

ASSERTION FAIL [version == (1)] @ WEST_TOPDIR/nrf/subsys/net/lib/nrf_cloud/src/nrf_cloud_agps.c549
Cannot parse schema version: 123
This problem does not appear when I run the sample, do you have any idea what the problem is or what I missed?

  • Hello Tatiana,

    I unfortunately do not have a straight forward answer to your problem, but I’ll check this internally and come back to you as soon as possible.

    Would you mind elaborate what you mean by “...launch my project at the time of the reception of data of the cloud...” compared to “This problem does not appear when I run the sample, ...”, just to make sure I understand the problem you are facing? Thanks!

    Regards,

    Markus

  • Hello, Thank you for your answer.

    When I run the agps sample project, I have no errors and the GPS data is received and sent to the cloud.  When I create a project in which I take parts of the code when the event CLOUD_EVT_DATA_RECEIVED is triggered in the function gps_process_agps_data I have the error that I told you above. I'm using the SDK 1.5.1. 

    I think that when I take parts of the code, despite a copy of the configuration, there must be a step or other that is missing to fix the problem.

  • Hello again Tatiana,

    Thanks a lot for your feedback! So, the ASSERT in nrf_cloud_agps.c, which actually is located on line 850, is the following:

    version = buf[NRF_CLOUD_AGPS_BIN_SCHEMA_VERSION_INDEX];
    
    parsed_len += NRF_CLOUD_AGPS_BIN_SCHEMA_VERSION_SIZE;
    
    
    
    __ASSERT(version == NRF_CLOUD_AGPS_BIN_SCHEMA_VERSION,
    
    "Cannot parse schema version: %d", version);
    
    

    The binary schema version is supposed to be 1, as defined in nrf_cloud_agps_schema_v1.h:16:

    #define NRF_CLOUD_AGPS_BIN_SCHEMA_VERSION (1)

    However, the value which comes in from your application via the argument evt->data.msg.buf is obviously 123, which causes the ASSERT.

    int err = gps_process_agps_data(evt->data.msg.buf, evt->data.msg.len);

    A good starting point might be to check why your application applies this value to the cloud message.

    I hope this will help you!

    Regards,

    Markus

Related