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?

  • Hello,

    Sorry to push you, our project is waiting for this agps feature, can anybody provide the support of how to integrate the SUPL client library to serial_lte_modem sample?

  • If you are using Segger Embedded Studio, did you remember to re-open the project after making the changes to the prj.conf file?

    Looking at the GPS sample, it uses a stack of 4KB and heap of 2KB, so I don't know why your configuration did not work.

    I will ask our developers if they have other suggestions for you.

  • If you are using Segger Embedded Studio, did you remember to re-open the project after making the changes to the prj.conf file?

    We built the project by gcc on linux server.

    I will ask our developers if they have other suggestions for you.

    Looking forward to your update, thank you

  • The answer I got was this:

    This code does not use the zephyr kernel memory allocation code (k_malloc), it uses the libc vanilla malloc implementation. So this heap has to be tuned with either CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE or CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE kconfig parameter, depending on which libc version is used.

    However, before you start playing around with those options, I want you to try something else:
    The GPS sample is using the Newlib libc, instead of Zephyr's standard minimal libc. However, the serial_lte_modem sample does not. Could you try to enable the Newlib libc?

    You can do that by adding CONFIG_NEWLIB_LIBC=y to your prj.conf file

  • Hi

    Still failed, the system will crash, here is the error log after enabled the Newlib libc

    And the result will be same with or without option "CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE=4096"

    Starting SUPL session
    [00:00:17.443,603] <inf> lte: +CEREG: 2,"0001","01A2D101",7,0,0,"11100000",~
    [00:00:17.874,969] <inf> lte: +CEREG: 1,"0001","01A2D101",7,,,"00001111","1~
    [00:00:17.875,000] <inf> lte: Connected to LTE network.
    Established LTE link
    
    ip 6cb1:61c0:: (c061b16c) port 7276
    
    ULP encoding length: 38
    
    [00:00:18.049,774] <err> os: r0/a1:  0x00000002  r1/a2:  0x20023788  r2/a3:  0xf0f0f0f0
    [00:00:18.049,774] <err> os: r3/a4:  0x2002fe58 r12/ip:  0x00000000 r14/lr:  0x00043dcf
    [00:00:18.049,774] <err> os:  xpsr:  0x41000000
    [00:00:18.049,774] <err> os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
    [00:00:18.049,804] <err> os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    [00:00:18.049,804] <err> os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
    [00:00:18.049,835] <err> os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
    [00:00:18.049,835] <err> os: fpscr:  0x20024acc
    [00:00:18.049,835] <err> os: Faulting instruction address (r15/pc): 0x00037bd6
    [00:00:18.049,835] <err> os: >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
    [00:00:18.049,835] <err> os: Current thread: 0x20023788 (unknown)
    [00:00:18.538,238] <err> fatal_error: Resetting system
    *** Booting Zephyr OS build v2.1.99-ncs1  ***

Related