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?

Parents
  • 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",~

  • Hi Didrik

    Thanks for your help and info.

    One of my colleagues says that China Telecom has a server that can be used if you are using China Telecom, but we have not been able to find the IP address of that server. Is it the 221.176.0.55 server you are using?

    Yes, previous test I used 221.176.0.55 as SUPL server which is China Mobile SUPL server's IP address, but failed with China Mobile NBIoT network.

    As your suggestion, I tried China Telecom SUPL server(suplcn.sirf.com  114.80.208.5:7275) in Shanghai, but still failed:

    1) Set SUPL as "suplcn.sirf.com", device will get DNS error:

    [00:00:21.943,084] <inf> agps: New AGPS data requested, contacting SUPL server, flags 59
    [00:00:21.961,181] <inf> agps: GPS control suspended
    [00:00:39.478,698] <inf> lte: +CEREG: 2,"5AFD","0B2AFDD2",9,0,0,"11100000",~
    [00:00:47.678,375] <inf> lte: +CEREG: 1,"5AFD","0B2AFDD2",9,,,"00000001","0~
    [00:00:47.678,405] <inf> lte: Connected to LTE network.
    Established LTE link
    
    Failed to resolve hostname suplcn.sirf.com on IPv4, ret: 22, errno: 0)
    
    [00:00:51.518,493] <inf> lte: +CEREG: 0,"5AFD","0B2AFDD2",9,0,0,"11100000",~
    [00:00:51.971,923] <inf> agps: GPS restarted

    2) Set SUPL as "114.80.208.5:7275", it will get the same failure as China Mobile SUPL server.

    [00:00:13.062,683] <inf> agps: New AGPS data requested, contacting SUPL server, flags 59
    [00:00:13.080,718] <inf> agps: GPS control suspended
    [00:00:33.500,396] <inf> lte: +CEREG: 2,"5AFD","05DF7154",9,0,0,"11100000",~
    Starting SUPL session
    [00:00:38.793,487] <inf> lte: +CEREG: 1,"5AFD","05DF7154",9,,,"00000001","0~
    [00:00:38.793,487] <inf> lte: Connected to LTE network.
    Established LTE link
    
    ip 7250:d005:: (5d05072) port 7275
    
    Connected to SUPL server "114.80.208.5:7275"
    
    ULP encoding length: 38
    
    Bytes sent: 38
    
    read again
    
    read again
    
    read again
    
    read again
    
    read again
    
    read error: -1
    
    ULP ossDecode fail 5
    
    SUPL error: 1
    
    ULP encoding length: 18
    
    Sending SUPL message failed, bytes_sent: -1
    
    SUPL session internal resources released
    
    [00:00:44.063,507] <err> agps: SUPL session failed: -1
    Done
    
    [00:00:44.357,391] <inf> lte: +CEREG: 0,"5AFD","05DF7154",9,0,0,"11100000",~
    [00:00:45.021,911] <inf> agps: GPS restarted

  • Thanks for the clarification.

    I have tried to ask around for A-GPS in China tips, but unfortunately, I have not gotten any good answers.

    We have recently started providing A-GPS data through nRF Cloud, in addition to the SUPL library.

    I got a bit conflicting answers when I asked how well nRF Cloud (which is built on AWS) works in China, but it might be worth a try: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/nrf_cloud_agps/README.html

    Note that you have to use the master branch to test the nrf_cloud_agps sample.

  • Hi Didrik,

    Thanks for your sharing, but our project needs SUPL method AGPS, the nrf cloud AGPS may not suit our application.

    We will try to test the google SUPL with simulated MCC/MNC, do you think it practicable?

  • One more question:

    Does the modem fw mfw_nrf9160_1.2.0 support AGPS with SUPL session? We found the SUPL session will crash with mfw_nrf9160_1.2.0.

    Here are the test results by using the same application firmware with different modem firmware:

    1), application could download AGPS data and finish SUPL session with mfw_nrf9160_1.1.1

    [15:01:26.401]AT+CGMR
    [15:01:26.408]mfw_nrf9160_1.1.1
    OK
    
    //Debug log:
    [00:00:11.184,204] <inf> agps: GPS data id: NRF_GNSS_AGPS_DATA_ID(3)
    [00:00:11.184,234] <inf> agps: New AGPS data requested, contacting SUPL server, flags 59
    [00:00:11.184,509] <inf> agps: GPS control suspended
    Starting SUPL session
    [00:00:12.421,020] <inf> lte: +CEREG: 2,"0001","01A2D101",7,0,0,"11100000",~
    [00:00:12.772,338] <inf> lte: +CEREG: 1,"0001","01A2D101",7,,,"11100000","1~
    [00:00:12.772,369] <inf> lte: Connected to LTE network.
    Established LTE link
    
    ip 6cb1:7dc0:: (c07db16c) port 7276
    
    Connected to SUPL server "supl.google.com:7276"

    2), SUPL session will reboot when testing same application with mfw_nrf9160_1.2.0

    [15:04:07.034]AT+CGMR
    [15:04:07.041]mfw_nrf9160_1.2.0
    OK
    
    [00:00:33.969,604] <inf> agps: GPS data id: NRF_GNSS_AGPS_DATA_ID(3)
    [00:00:33.969,635] <inf> agps: New AGPS data requested, contacting SUPL server, flags 59
    [00:00:33.987,701] <inf> agps: GPS control suspended
    Starting SUPL session
    *** Booting Zephyr OS build v2.1.99-ncs1  ***

  • Siyou said:
    We will try to test the google SUPL with simulated MCC/MNC, do you think it practicable?

     I am not sure how you would do that?

    To my knowledge, the SUPL library gets the MCC/MNC directly from the modem, so you would have to do something on the network side to fool the modem.

     

    Siyou said:
    Does the modem fw mfw_nrf9160_1.2.0 support AGPS with SUPL session?

     Yes. Mfw 1.2.0 should work just fine with NCS v1.2.0, including the SUPL library.

    To me, it looks like the problem is on the application side, but if you take a modem trace, I can check that the modem behaves as normal.

    You could also try to add debug log output from the at_cmd library if you haven't already: CONFIG_AT_CMD_LOG_LEVEL=y

    As the application restarts, you might need to use immediate logging to get log output before the reboot: CONFIG_LOG_IMMEDIATE=y

Reply
  • Siyou said:
    We will try to test the google SUPL with simulated MCC/MNC, do you think it practicable?

     I am not sure how you would do that?

    To my knowledge, the SUPL library gets the MCC/MNC directly from the modem, so you would have to do something on the network side to fool the modem.

     

    Siyou said:
    Does the modem fw mfw_nrf9160_1.2.0 support AGPS with SUPL session?

     Yes. Mfw 1.2.0 should work just fine with NCS v1.2.0, including the SUPL library.

    To me, it looks like the problem is on the application side, but if you take a modem trace, I can check that the modem behaves as normal.

    You could also try to add debug log output from the at_cmd library if you haven't already: CONFIG_AT_CMD_LOG_LEVEL=y

    As the application restarts, you might need to use immediate logging to get log output before the reboot: CONFIG_LOG_IMMEDIATE=y

Children
Related