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

questions for AGPS

Hi

I merged the AGPS to serial_lte_modem slm_at_gps.c but it did not work:

1, if I activate LTE in gps_thread_fn(), it will be failed in supl_session();

00> Established LTE link
00> 
00> Starting SUPL session
00> ip 6cb1:61c0:: (c061b16c) port 7276
00> 
00> ossinit failed, rc: 8
00> 
00> SUPL session internal resources released
00> 
00> Done

2, If I activated LTE and attached to network before starting GPS, the gps_data.data_id will never be NRF_GNSS_AGPS_DATA_ID, so the GPS will have no opportunity to download SUPL data from server. why?

  • SDK: NCS v1.2

    modem: mfw_nrf9160_1.1.1

    SUPL client library: nrf9160_libsupl-v0.5.2

  • Hi.

    Libsupl error 8 is LIBSUPL_SESSION_MISSING_ERR. Are you certain that you integrated the SUPL library correctly?

    Have you enabled debug logging in the library? That might provide more details about what goes wrong.

    Best regards,

    Didrik

  • Hi 

    Are you certain that you integrated the SUPL library correctly?

    How to ensure this? I download the library from your site and put them into "nrf\ext\lib\bin\supl"

    Have you enabled debug logging in the library?

    How to enable the library logging?

    Updated the agps log as below:

    00> Starting SUPL session
    00> [00:00:22.179,504] <inf> lte: +CEREG: 2,"0001","01A2D101",7,0,0,"11100000",~
    00> [00:00:22.490,875] <inf> lte: +CEREG: 1,"0001","01A2D101",7,,,"00001111","1~
    00> [00:00:22.490,875] <inf> lte: Connected to LTE network.
    00> Established LTE link
    00> 
    00> ip 6cb1:61c0:: (c061b16c) port 7276
    00> 
    00> ossinit failed, rc: 8
    00> 
    00> SUPL session internal resources released
    00> 
    00> [00:00:22.644,195] <err> agps: SUPL session failed: -15
    00> Done
    00> 
    00> [00:00:22.682,647] <inf> lte: +CEREG: 0,"0001","01A2D101",7,0,0,"11100000",~

  • Siyou said:
    How to ensure this? I download the library from your site and put them into "nrf\ext\lib\bin\supl"

     What I meant was how you had included it in your application. But yes, you have put the library in the right place.

     

    Siyou said:

    Have you enabled debug logging in the library?

    How to enable the library logging?

     After taking another look at the SUPL library, I might have misunderstood how the logging in the library works. The library should provide debug logging regardless, while you can decide if you want to print it in the log handler you provide to the library.

     

    Didrik Rokhaug said:
    Libsupl error 8 is LIBSUPL_SESSION_MISSING_ERR

     Again, I misunderstood where the error came from. It does not mean LIBSUPL_SESSION_MISSING_ERR, but OUT_MEMORY: https://www.oss.com/asn1/products/documentation/asn1_c_10.7/asn1c-runtime-return-codes.html

    In what thread are you running the SUPL library, how large stack does that thread have, and how much heap do you have?

    What happens if you increase those?

    The SUPL error is LIBSUPL_DECODE_ERR, which is expected, as the library used for decoding fails to be initialized.

  • Hi 

    In what thread are you running the SUPL library, how large stack does that thread have, and how much heap do you have?

    I start supl_session in gps_thread_fn() of slm_at_gps.c, the original THREAD_STACK_SIZE is 1KB, heap size as below:

    CONFIG_MAIN_STACK_SIZE=8192
    CONFIG_HEAP_MEM_POOL_SIZE=16384

    I tried changing the THREAD_STACK_SIZE  to 4KB but the supl_session still was failed as before.

    how large stack does the supl_session need?

Related