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

A-GPS using SUPL doesn't work

DK: v0.9.0
nrf: v1.2.0
supl fw: v0.5.2
modem fw: v1.2.0
OS: Windows10

I'm trying to use assited GPS in "gps" sample program, but it doesn't work. This is log. There is no comments about SUPL.

*** Booting Zephyr OS build v2.1.99-ncs1  ***
Staring GPS application
Socket created
Getting GPS data...
Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 0

Scanning [|] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 0

Scanning [/] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 1

Scanning [-] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 1

Scanning [\] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 2

Scanning [|] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 2

Scanning [/] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 3

Scanning [-] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 3

Scanning [\] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 4

Scanning [|] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 4

Scanning [/] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 5

Scanning [-] Tracking: 0 Using: 0 Unhealthy: 0
Seconds since last fix 5

Scanning [\]

prj.conf

CONFIG_BSD_LIBRARY=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
CONFIG_AT_CMD=y
CONFIG_AT_NOTIF=y

# Enable SUPL client support
CONFIG_SUPL_CLIENT_LIB=y # Set y 

# Networking
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y

# Disable native network stack to save some memory
CONFIG_NET_NATIVE=n

# Main thread
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_MAIN_STACK_SIZE=4096

In main.c,

supl_init function is executed successfully.
gps_data->data_id value is always 1 or 2 and it isn't set 3.

Any help?

Parents Reply Children
  • I can't get SUPL data even when I re-imported the project... I attached additional info below. Do you have any advice? Thank you in advance.

    I'm using iBasis SIM

    a-gps.zip

  • Hi,

    I tried your merged.hex, and it does not show any downloading of agps data.

    It does not seem to have picked up the library in ext/lib/bin/supl properly. Could you try to manually delete the build folder, then re-import from scratch with prj.conf holding "CONFIG_SUPL_CLIENT_LIB=y"?

     

    Kind regards,

    Håkon

  • I did as you specified, but the same result.

    I tried to set up ncs folder from scratch but the error occurs. The master branch seems to have bug.

    d9f333426871282ae83940cca8b1b89bd067a575 refs/remotes/origin/master
    Checking out files: 100% (1879/1879), done.
    Already on 'master'
    Branch 'master' set up to track remote branch 'master' from 'origin'.
    FATAL ERROR: Malformed manifest file c:\users\user1\nrf9160\ncs\.west\manifest-tmp\west.yml (schema: c:\python37\lib\site-packages\west\manifest-schema.yml):
    Schema validation failed:
     - Key 'version' was not defined. Path: ''.
     - Key 'import' was not defined. Path: '/projects/0'.

  • Hi,

     

    I think that your west is out-dated. Could you try "pip3 install west --upgrade" and see if it starts working?

    Also, could you try the latest version of SES-NE (nordic edition) to see if the behavior when compiling is similar?

     

    You could try to use west to build as well, "cd samples/nrf9160/gps && west build -b nrf9160_pca10090ns".

     

    Kind regards,

    Håkon

  • >I think that your west is out-dated. Could you try "pip3 install west --upgrade" and see if it starts working?

    This works out! Thank you so much!

    I tried AGPS with iBasis SIM and got this error.

    New AGPS data requested, contacting SUPL server, flags 59
    Established LTE link
    ip adc2:4cc0:: (c04cc2ad) port 7276
    Starting SUPL session
    
    ULP encoding length: 38
    Bytes sent: 38
    Bytes received: 34
    ULP ossDecode success, choice 3
    SUPL server responded using version 2.0.4
    SUPL response received
    ULP encoding length: 57
    Bytes sent: 57
    Bytes received: 708
    ULP ossDecode more input 4
    Bytes received: 1416
    ULP ossDecode more input 4
    Bytes received: 2124
    ULP ossDecode more input 4
    Bytes received: 2832
    ULP ossDecode more input 4
    Bytes received: 3067
    ULP ossDecode success, choice 5
    Injected AGPS data, flags: 1, size: 16
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 2, size: 72
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 3, size: 32
    Injected AGPS data, flags: 8, size: 4
    Injected AGPS data, flags: 4, size: 8
    Injected AGPS data, flags: 6, size: 144
    No location data available
    Injected AGPS data, flags: 7, size: 16
    MCC location info injected, MCC: 440
            Lat: 4603642 Lon: 2132664
            Unc semiminor: 127
            Unc semimajor: 127
            Confidence: 90
            Orientation: 0
    SUPL POS received
    read again
    read again
    read again
    read error: -1
    ULP ossDecode fail 5
    SUPL error: 1
    ULP encoding length: 34
    Sending SUPL message failed, bytes_sent: -1
    SUPL session internal resources released
    SUPL session finished
    Done

    Also I tested the same program with another SIM. Then I got another error.

    New AGPS data requested, contacting SUPL server, flags 59
    Established LTE link
    Failed to resolve hostname supl.google.com on IPv4, errno: 0)
    

    Can you give me any help?

Related