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

GPS FIX while moving

Hi, 

I have been implementing the GPS on my thingy:91 with the firmware v1.2.0

I'm able to do a cold start and get a FIX is if in do not move the board for around 100 seconds. And then i can trace my path.

However, if i do not stop to do the cold start, the gps will never get fix. 

Why is this happening and which settings should be change to make it work ? Frequency ? 

Parents Reply Children
  • Hi Ricardo,
    It should be possible to get a fix at pedestrian speeds.
    I would recommend you to flash mfw 1.2.0 and use NCS v1.3.0 with a-gps enabled which should improve the cold start fix much quicker.

    Do you have a nrf91DK with an external antenna to compare the performance with?


    BR,
    Martin L.

  • Hi

    No I do not have the DK yet but I will get one soon. 

    Yes I am thinking to implement A-GPS to solve this problem. For that I used the GPS sample with SUPL.

    It works well to fix the GPS (40-60s). However, when i want to sent the data through HTTP I get the error 12 with getaddrinfo after sending 2-3 messages. (I active LTE before sending the data) I already try to increase the size of the buffer CONFIG_NRF_CLOUD_MQTT_MESSAGE_BUFFER_LEN but still get the message. 

    I also try to enable PSM. However, the performance with the GPS using PSM are really bad (Over 3 minutes to get a fix without moving)...  

    Any idea of what is going on ? 

  • Hi Ricardo,
    Could you please provide the Serial Output log as well?

  • Hi

    Thanks a lot for you support. 

    Here is the serial output. 

    *** Booting Zephyr OS build v2.1.99-ncs1  ***
    Flash region		Domain		Permissions
    00 0x00000 0x08000 	Secure		rwxl
    01 0x08000 0x10000 	Secure		rwxl
    02 0x10000 0x18000 	Secure		rwxl
    03 0x18000 0x20000 	Non-Secure	rwxl
    04 0x20000 0x28000 	Non-Secure	rwxl
    05 0x28000 0x30000 	Non-Secure	rwxl
    06 0x30000 0x38000 	Non-Secure	rwxl
    07 0x38000 0x40000 	Non-Secure	rwxl
    08 0x40000 0x48000 	Non-Secure	rwxl
    09 0x48000 0x50000 	Non-Secure	rwxl
    10 0x50000 0x58000 	Non-Secure	rwxl
    11 0x58000 0x60000 	Non-Secure	rwxl
    12 0x60000 0x68000 	Non-Secure	rwxl
    13 0x68000 0x70000 	Non-Secure	rwxl
    14 0x70000 0x78000 	Non-Secure	rwxl
    15 0x78000 0x80000 	Non-Secure	rwxl
    16 0x80000 0x88000 	Non-Secure	rwxl
    17 0x88000 0x90000 	Non-Secure	rwxl
    18 0x90000 0x98000 	Non-Secure	rwxl
    19 0x98000 0xa0000 	Non-Secure	rwxl
    20 0xa0000 0xa8000 	Non-Secure	rwxl
    21 0xa8000 0xb0000 	Non-Secure	rwxl
    22 0xb0000 0xb8000 	Non-Secure	rwxl
    23 0xb8000 0xc0000 	Non-Secure	rwxl
    24 0xc0000 0xc8000 	Non-Secure	rwxl
    25 0xc8000 0xd0000 	Non-Secure	rwxl
    26 0xd0000 0xd8000 	Non-Secure	rwxl
    27 0xd8000 0xe0000 	Non-Secure	rwxl
    28 0xe0000 0xe8000 	Non-Secure	rwxl
    29 0xe8000 0xf0000 	Non-Secure	rwxl
    30 0xf0000 0xf8000 	Non-Secure	rwxl
    31 0xf8000 0x100000 	Non-Secure	rwxl
    Non-secure callable region 0 placed in flash region 2 with size 32.
    
    
    SRAM region		Domain		Permissions
    00 0x00000 0x02000	Secure		rwxl
    01 0x02000 0x04000	Secure		rwxl
    02 0x04000 0x06000	Secure		rwxl
    03 0x06000 0x08000	Secure		rwxl
    04 0x08000 0x0a000	Secure		rwxl
    05 0x0a000 0x0c000	Secure		rwxl
    06 0x0c000 0x0e000	Secure		rwxl
    07 0x0e000 0x10000	Secure		rwxl
    08 0x10000 0x12000	Non-Secure	rwxl
    09 0x12000 0x14000	Non-Secure	rwxl
    10 0x14000 0x16000	Non-Secure	rwxl
    11 0x16000 0x18000	Non-Secure	rwxl
    12 0x18000 0x1a000	Non-Secure	rwxl
    13 0x1a000 0x1c000	Non-Secure	rwxl
    14 0x1c000 0x1e000	Non-Secure	rwxl
    15 0x1e000 0x20000	Non-Secure	rwxl
    16 0x20000 0x22000	Non-Secure	rwxl
    17 0x22000 0x24000	Non-Secure	rwxl
    18 0x24000 0x26000	Non-Secure	rwxl
    19 0x26000 0x28000	Non-Secure	rwxl
    20 0x28000 0x2a000	Non-Secure	rwxl
    21 0x2a000 0x2c000	Non-Secure	rwxl
    22 0x2c000 0x2e000	Non-Secure	rwxl
    23 0x2e000 0x30000	Non-Secure	rwxl
    24 0x30000 0x32000	Non-Secure	rwxl
    25 0x32000 0x34000	Non-Secure	rwxl
    26 0x34000 0x36000	Non-Secure	rwxl
    27 0x36000 0x38000	Non-Secure	rwxl
    28 0x38000 0x3a000	Non-Secure	rwxl
    29 0x3a000 0x3c000	Non-Secure	rwxl
    30 0x3c000 0x3e000	Non-Secure	rwxl
    31 0x3e000 0x40000	Non-Secure	rwxl
    
    Peripheral		Domain		Status
    00 NRF_P0               Non-Secure	OK
    01 NRF_CLOCK            Non-Secure	OK
    02 NRF_RTC0             Non-Secure	OK
    03 NRF_RTC1             Non-Secure	OK
    04 NRF_NVMC             Non-Secure	OK
    05 NRF_UARTE1           Non-Secure	OK
    06 NRF_UARTE2           Secure		SKIP
    07 NRF_TWIM2            Non-Secure	OK
    08 NRF_SPIM3            Non-Secure	OK
    09 NRF_TIMER0           Non-Secure	OK
    10 NRF_TIMER1           Non-Secure	OK
    11 NRF_TIMER2           Non-Secure	OK
    12 NRF_SAADC            Non-Secure	OK
    13 NRF_PWM0             Non-Secure	OK
    14 NRF_PWM1             Non-Secure	OK
    15 NRF_PWM2             Non-Secure	OK
    16 NRF_PWM3             Non-Secure	OK
    17 NRF_WDT              Non-Secure	OK
    18 NRF_IPC              Non-Secure	OK
    19 NRF_VMC              Non-Secure	OK
    20 NRF_FPU              Non-Secure	OK
    21 NRF_EGU1             Non-Secure	OK
    22 NRF_EGU2             Non-Secure	OK
    23 NRF_DPPIC            Non-Secure	OK
    24 NRF_GPIOTE1          Non-Secure	OK
    25 NRF_REGULATORS       Non-Secure	OK
    
    SPM: NS image at 0x18200
    SPM: NS MSP at 0x20032138
    SPM: NS reset vector at 0x1e025
    SPM: prepare to jump to Non-Secure image.
    *** Booting Zephyr OS build v2.1.9[00:00:00.196,197] [1B][0m<inf> BH1749: BH1749 initialized[1B][0m
    9-ncs1  ***
    Init application GPS test 
    
    [00:00:00.220,092] [1B][0m<inf> asset_tracker: Asset tracker started[1B][0m
    [00:00:00.226,318] [1B][0m<inf> watchdog: Watchdog timeout installed. Timeout: 10000[1B][0m
    [00:00:00.233,917] [1B][0m<inf> watchdog: Watchdog started[1B][0m
    [00:00:00.239,257] [1B][0m<inf> watchdog: Watchdog feed enabled. Timeout: 5000[1B][0m
    [00:00:00.246,551] [1B][0m<inf> asset_tracker: Connecting to LTE network. [1B][0m
    [00:00:00.253,265] [1B][0m<inf> asset_tracker: This may take several minutes.[1B][0m
    [00:00:00.268,493] [1B][0m<dbg> lte_lc.w_lte_lc_connect: Network mode: AT%XSYSTEMMODE=1,0,1,0[1B][0m
    +CEREG: 2,"102D","01067907",7,0,0,"11100000","11100000"
    [00:00:01.301,116] [1B][0m<dbg> lte_lc.parse_nw_reg_status: Network registration status: 2[1B][0m
    +CEREG: 1,"102D","01067907",7,,,"00000000","11100000"
    [00:00:02.100,494] [1B][0m<dbg> lte_lc.parse_nw_reg_status: Network registration status: 1[1B][0m
    [00:00:02.108,764] [1B][0m<inf> asset_tracker: Connected to LTE network[1B][0m
    Staring GPS application
    Socket created
    Starting loop for getting GPS data...
    [1B][1;1H[1B][2JNew AGPS data requested, contacting SUPL server, flags 59
    Established LTE link
    ip 6cb1:7ec0:: (c07eb16c) port 7276
    Starting SUPL session
    
    ULP encoding length: 38
    Bytes sent: 38
    Bytes received: 34, total 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, total 708
    ULP ossDecode more input 4
    Bytes received: 708, total 1416
    ULP ossDecode more input 4
    Bytes received: 708, total 2124
    ULP ossDecode more input 4
    Bytes received: 708, total 2832
    ULP ossDecode more input 4
    Bytes received: 162, total 2994
    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: 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
    No integrity data available
    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: 228
    	Lat: 4362076 Lon: 382613
    	Unc semiminor/semimajor: 105/105
    	Confidence: 100
    	Orientation: 0
    SUPL POS received
    read again
    Bytes received: 34, total 34
    ULP ossDecode success, choice 6
    SUPLEND:
    	Mask: 0
    	Status: 0
    SUPL END received
    SUPL session internal resources released
    SUPL session finished
    supl_session err: 0
    
    Done
    +CEREG: 0,"102D","01067907",7,0,0,"11100000","11100000"
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 8
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 9
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 9
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 10
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 10
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 11
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 11
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 12
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 12
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 13
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 13
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 14
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 14
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 15
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 15
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 16
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 1 Using: 0 Unhealthy: 0
    Seconds since last fix 16
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 1 Using: 0 Unhealthy: 0
    Seconds since last fix 17
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 17
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 18
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 18
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 19
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 19
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 20
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 20
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 21
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 21
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 22
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 2 Using: 0 Unhealthy: 0
    Seconds since last fix 22
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 2 Using: 0 Unhealthy: 0
    Seconds since last fix 23
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 2 Using: 0 Unhealthy: 0
    Seconds since last fix 23
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 2 Using: 0 Unhealthy: 0
    Seconds since last fix 24
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 24
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 25
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 26
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 26
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 27
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 27
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 28
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 28
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 29
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 29
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 0 Unhealthy: 0
    Seconds since last fix 30
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 30
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 31
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 31
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 32
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 32
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 33
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 33
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 34
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 34
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 35
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 35
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 36
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 36
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 37
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 37
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 38
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 38
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 39
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 39
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 40
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 40
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 41
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 41
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 42
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 42
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 43
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 44
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 44
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 45
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 3 Using: 3 Unhealthy: 0
    Seconds since last fix 45
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 4 Using: 3 Unhealthy: 0
    Seconds since last fix 46
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 4 Using: 3 Unhealthy: 0
    Seconds since last fix 46
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 4 Using: 3 Unhealthy: 0
    Seconds since last fix 47
    ---------------------------------
    Searching [\]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 5 Using: 3 Unhealthy: 0
    Seconds since last fix 47
    ---------------------------------
    Searching [|]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 5 Using: 3 Unhealthy: 0
    Seconds since last fix 48
    ---------------------------------
    Searching [/]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 5 Using: 4 Unhealthy: 0
    Seconds since last fix 0
    ---------------------------------
    Longitude:  6.660797
    
    Latitude:   46.780391
    
    Altitude:   508.026917
    
    Speed:      0.045083
    
    Heading:    0.000000
    
    Date:       30-06-2020
    Time (UTC): 07:09:20
    
    NMEA strings:
    
    NMEA strings:
    $GPGGA,070920.22,4646.82346,N,00639.64784,E,1,05,2.02,508.03,M,0,,*2A
    
    
    $GPGLL,4646.82346,N,00639.64784,E,070920.22,A,A*6B
    
    
    $GPGSA,A,3,24,29,31,32,,,,,,,,,2.99,2.02,2.20,1*13
    
    
    $GPGSV,2,1,5,29,67,208,42,31,37,307,38,32,26,246,40,24,13,148,36,1*50
    
    
    $GPGSV,2,2,5,25,00,000,31,1*64
    
    
    $GPRMC,070920.22,A,4646.82346,N,00639.64784,E,0.09,0.00,300620,,,A,V*28
    
    
    +CEREG: 2,"102D","01067907",7
    +CEREG: 1,"102D","01067907",7
    HTTP example
    
    getaddrinfo err: 0
    
    client_fd: 2
    
    bind err: 0
    
    connect err: 0
    
    
    
    Prepare send buffer:
    
    
    
    Send HTTP post request.
    
    
    
    Finished. Closing socket
    active_lte err: 0
    
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 0
    ---------------------------------
    Longitude:  6.660795
    
    Latitude:   46.780390
    
    Altitude:   508.157623
    
    Speed:      0.044394
    
    Heading:    0.000000
    
    Date:       30-06-2020
    Time (UTC): 07:09:23
    
    NMEA strings:
    
    NMEA strings:
    $GPGGA,070923.77,4646.82342,N,00639.64772,E,1,,100.00,508.16,M,0,,*24
    
    
    $GPGLL,4646.82342,N,00639.64772,E,070923.77,A,A*65
    
    
    $GPGSA,A,3,,,,,,,,,,,,,100.00,100.00,100.00,1*1E
    
    
    +CEREG: 2,"102D","01067907",7
    +CEREG: 1,"102D","01067907",7
    HTTP example
    
    getaddrinfo err: 0
    
    client_fd: 2
    
    bind err: 0
    
    connect err: 0
    
    
    
    Prepare send buffer:
    
    
    
    Send HTTP post request.
    
    
    
    Finished. Closing socket
    active_lte err: 0
    
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 0
    ---------------------------------
    Searching [-]
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 4 Using: 4 Unhealthy: 0
    Seconds since last fix 0
    ---------------------------------
    Longitude:  6.660539
    
    Latitude:   46.780389
    
    Altitude:   522.554993
    
    Speed:      0.122593
    
    Heading:    0.000000
    
    Date:       30-06-2020
    Time (UTC): 07:09:49
    
    NMEA strings:
    
    NMEA strings:
    $GPGGA,070949.84,4646.82335,N,00639.63232,E,1,04,4.88,522.55,M,0,,*2C
    
    
    $GPGLL,4646.82335,N,00639.63232,E,070949.84,A,A*63
    
    
    $GPGSA,A,3,25,29,31,32,,,,,,,,,9.65,4.88,8.33,1*16
    
    
    $GPGSV,1,1,4,25,75,047,30,29,67,208,37,31,37,307,33,32,26,246,35,1*50
    
    
    $GPRMC,070949.84,A,4646.82335,N,00639.63232,E,0.24,0.00,300620,,,A,V*2F
    
    
    +CEREG: 2,"102D","01067909",7
    +CEREG: 1,"102D","01067909",7
    HTTP example
    
    getaddrinfo err: 0
    
    client_fd: 2
    
    bind err: 0
    
    connect err: 0
    
    
    
    Prepare send buffer:
    
    
    
    Send HTTP post request.
    
    
    
    Finished. Closing socket
    active_lte err: 0
    
    ---------------------------------
    
    [1B][1;1H[1B][2JTracking: 0 Using: 0 Unhealthy: 0
    Seconds since last fix 0
    ---------------------------------
    Longitude:  6.660575
    
    Latitude:   46.780394
    
    Altitude:   521.054199
    
    Speed:      0.066629
    
    Heading:    0.000000
    
    Date:       30-06-2020
    Time (UTC): 07:09:53
    
    NMEA strings:
    
    NMEA strings:
    $GPGGA,070953.96,4646.82365,N,00639.63447,E,1,,100.00,521.05,M,0,,*22
    
    
    $GPGLL,4646.82365,N,00639.63447,E,070953.96,A,A*6A
    
    
    $GPGSA,A,3,,,,,,,,,,,,,100.00,100.00,100.00,1*1E
    
    
    +CEREG: 2,"102D","01067907",7
    +CEREG: 1,"102D","01067907",7
    HTTP example
    
    getaddrinfo err: 12
    
    *** Booting Zephyr OS build v2.1.99-ncs1  ***
    Flash region		Domain		Permissions
    00 0x00000 0x08000 	Secure		rwxl
    01 0x08000 0x10000 	Secure		rwxl
    02 0x10000 0x18000 	Secure		rwxl
    03 0x18000 0x20000 	Non-Secure	rwxl
    04 0x20000 0x28000 	Non-Secure	rwxl
    05 0x28000 0x30000 	Non-Secure	rwxl
    06 0x30000 0x38000 	Non-Secure	rwxl
    07 0x38000 0x40000 	Non-Secure	rwxl
    08 0x40000 0x48000 	Non-Secure	rwxl
    09 0x48000 0x50000 	Non-Secure	rwxl
    10 0x50000 0x58000 	Non-Secure	rwxl
    11 0x58000 0x60000 	Non-Secure	rwxl
    12 0x60000 0x68000 	Non-Secure	rwxl
    13 0x68000 0x70000 	Non-Secure	rwxl
    14 0x70000 0x78000 	Non-Secure	rwxl
    15 0x78000 0x80000 	Non-Secure	rwxl
    16 0x80000 0x88000 	Non-Secure	rwxl
    17 0x88000 0x90000 	Non-Secure	rwxl
    18 0x90000 0x98000 	Non-Secure	rwxl
    19 0x98000 0xa0000 	Non-Secure	rwxl
    20 0xa0000 0xa8000 	Non-Secure	rwxl
    21 0xa8000 0xb0000 	Non-Secure	rwxl
    22 0xb0000 0xb8000 	Non-Secure	rwxl
    23 0xb8000 0xc0000 	Non-Secure	rwxl
    24 0xc0000 0xc8000 	Non-Secure	rwxl
    25 0xc8000 0xd0000 	Non-Secure	rwxl
    26 0xd0000 0xd8000 	Non-Secure	rwxl
    27 0xd8000 0xe0000 	Non-Secure	rwxl
    28 0xe0000 0xe8000 	Non-Secure	rwxl
    29 0xe8000 0xf0000 	Non-Secure	rwxl
    30 0xf0000 0xf8000 	Non-Secure	rwxl
    31 0xf8000 0x100000 	Non-Secure	rwxl
    Non-secure callable region 0 placed in flash region 2 with size 32.
    
    
    SRAM region		Domain		Permissions
    00 0x00000 0x02000	Secure		rwxl
    01 0x02000 0x04000	Secure		rwxl
    02 0x04000 0x06000	Secure		rwxl
    03 0x06000 0x08000	Secure		rwxl
    04 0x08000 0x0a000	Secure		rwxl
    05 0x0a000 0x0c000	Secure		rwxl
    06 0x0c000 0x0e000	Secure		rwxl
    07 0x0e000 0x10000	Secure		rwxl
    08 0x10000 0x12000	Non-Secure	rwxl
    09 0x12000 0x14000	Non-Secure	rwxl
    10 0x14000 0x16000	Non-Secure	rwxl
    11 0x16000 0x18000	Non-Secure	rwxl
    12 0x18000 0x1a000	Non-Secure	rwxl
    13 0x1a000 0x1c000	Non-Secure	rwxl
    14 0x1c000 0x1e000	Non-Secure	rwxl
    15 0x1e000 0x20000	Non-Secure	rwxl
    16 0x20000 0x22000	Non-Secure	rwxl
    17 0x22000 0x24000	Non-Secure	rwxl
    18 0x24000 0x26000	Non-Secure	rwxl
    19 0x26000 0x28000	Non-Secure	rwxl
    20 0x28000 0x2a000	Non-Secure	rwxl
    21 0x2a000 0x2c000	Non-Secure	rwxl
    22 0x2c000 0x2e000	Non-Secure	rwxl
    23 0x2e000 0x30000	Non-Secure	rwxl
    24 0x30000 0x32000	Non-Secure	rwxl
    25 0x32000 0x34000	Non-Secure	rwxl
    26 0x34000 0x36000	Non-Secure	rwxl
    27 0x36000 0x38000	Non-Secure	rwxl
    28 0x38000 0x3a000	Non-Secure	rwxl
    29 0x3a000 0x3c000	Non-Secure	rwxl
    30 0x3c000 0x3e000	Non-Secure	rwxl
    31 0x3e000 0x40000	Non-Secure	rwxl
    
    Peripheral		Domain		Status
    00 NRF_P0               Non-Secure	OK
    01 NRF_CLOCK            Non-Secure	OK
    02 NRF_RTC0             Non-Secure	OK
    03 NRF_RTC1             Non-Secure	OK
    04 NRF_NVMC             Non-Secure	OK
    05 NRF_UARTE1           Non-Secure	OK
    06 NRF_UARTE2           Secure		SKIP
    07 NRF_TWIM2            Non-Secure	OK
    08 NRF_SPIM3            Non-Secure	OK
    09 NRF_TIMER0           Non-Secure	OK
    10 NRF_TIMER1           Non-Secure	OK
    11 NRF_TIMER2           Non-Secure	OK
    12 NRF_SAADC            Non-Secure	OK
    13 NRF_PWM0             Non-Secure	OK
    14 NRF_PWM1             Non-Secure	OK
    15 NRF_PWM2             Non-Secure	OK
    16 NRF_PWM3             Non-Secure	OK
    17 NRF_WDT              Non-Secure	OK
    18 NRF_IPC              Non-Secure	OK
    19 NRF_VMC              Non-Secure	OK
    20 NRF_FPU              Non-Secure	OK
    21 NRF_EGU1             Non-Secure	OK
    22 NRF_EGU2             Non-Secure	OK
    23 NRF_DPPIC            Non-Secure	OK
    24 NRF_GPIOTE1          Non-Secure	OK
    25 NRF_REGULATORS       Non-Secure	OK
    
    SPM: NS image at 0x18200
    SPM: NS MSP at 0x20032138
    SPM: NS reset vector at 0x1e025
    SPM: prepare to jump to Non-Secure image.
    *** Booting Zephyr OS build v2.1.9[00:00:00.195,922] [1B][0m<inf> BH1749: BH1749 initialized[1B][0m
    9-ncs1  ***
    Init application GPS test 
    
    [00:00:00.219,818] [1B][0m<inf> asset_tracker: Asset tracker started[1B][0m
    [00:00:00.226,043] [1B][0m<inf> watchdog: Watchdog timeout installed. Timeout: 10000[1B][0m
    [00:00:00.233,642] [1B][0m<inf> watchdog: Watchdog started[1B][0m
    [00:00:00.238,983] [1B][0m<inf> watchdog: Watchdog feed enabled. Timeout: 5000[1B][0m
    [00:00:00.246,276] [1B][0m<inf> asset_tracker: Connecting to LTE network. [1B][0m
    [00:00:00.252,990] [1B][0m<inf> asset_tracker: This may take several minutes.[1B][0m
    [00:00:00.268,249] [1B][0m<dbg> lte_lc.w_lte_lc_connect: Network mode: AT%XSYSTEMMODE=1,0,1,0[1B][0m
    +CEREG: 2,"102D","01067907",7,0,0,"11100000","11100000"
    [00:00:01.576,324] [1B][0m<dbg> lte_lc.parse_nw_reg_status: Network registration status: 2[1B][0m
    +CEREG: 1,"102D","01067907",7,,,"00000000","11100000"
    [00:00:04.143,066] [1B][0m<dbg> lte_lc.parse_nw_reg_status: Network registration status: 1[1B][0m
    [00:00:04.151,306] [1B][0m<inf> asset_tracker: Connected to LTE network[1B][0m
    Staring GPS application
    Socket created
    Starting loop for getting GPS data...
    [1B][1;1H[1B][2JNew AGPS data requested, contacting SUPL server, flags 59
    Established LTE link
    ip 6cb1:7ec0:: (c07eb16c) port 7276
    Starting SUPL session
    
    ULP encoding length: 38
    Bytes sent: 38
    Bytes received: 34, total 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, total 708
    ULP ossDecode more input 4
    +CEREG: 1,"102D","01067909",7,,,"00000000","11100000"
    

    As you can see I'm able to FIX after 48s outside with open sky and a-GPS. 

    The problem is that i can send my message 2-3 times before i get error 12 with getaddrinfo. I try to use freeaddrinfo but still the same. 

    I sent you my code in a private message. 

    If you can help me out, I will be really grateful. 

Related