Hello,
I am trying to run the A-GPS sample program but am encountering a bit of difficulty with the SUPL code.
I had to modify the LTE connection code to allow access for NB-IoT, APN and User/Pass for the SIMs we are using but encounter this error during the connection and download process:
New AGPS data requested, contacting SUPL server, flags 59 Established LTE link ip 4a7d:8cc0:: (c08c7d4a) 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 read again Bytes received: 708 ULP ossDecode more input 4 Bytes received: 2996 ULP ossDecode success, choice 5 Failed to send AGNSS data, type: 1 (err: 5) UTC conversion/injection failed, rc: 3 Generic assistance data injection failed, rc: 3 SUPL error: 2 ULP encoding length: 34 Bytes sent: 34 SUPL session internal resources released SUPL session finished Done
While building the sample program, I also was warned about an error in the SUPL code:
[38/138] Building C object modules/nrf/lib/supl/CMakeFiles/..__nrf__lib__supl.dir/os/lte_params.c.obj /Users/xxxxxx/Downloads/ncs/nrf/lib/supl/os/lte_params.c: In function 'parse_lte_mcc': /Users/xxxxxx/Downloads/ncs/nrf/lib/supl/os/lte_params.c:73:3: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration] memset(lte->mcc, 0, 3);
Could I get a bit of help decyphering what went wrong here? I have made no modifications to the SUPL code and only added code to enable connection to the Network in my local area.
static const char at_commands_NB[][50] = { AT_CFUN_OFF, AT_XSYSTEMMODE, #ifdef CONFIG_BOARD_NRF9160_PCA10090NS AT_MAGPIO_LTE, AT_BANDLOCK, AT_APN, AT_USER_PASS, #endif AT_ACTIVATE_LTE }; ********************************* static int activate_lte(bool activate) { if (activate) { for (int i = 0; i < ARRAY_SIZE(at_commands_NB); i++) { if (at_cmd_write(at_commands_NB[i], NULL, 0, NULL) != 0) { printk("Error with at_commands_NB\n"); return -1; } }
The above should be working correctly if the device was able to connect to the SUPL library in the first place so I doubt it's the above changes.
Many thanks,
MJD