Hi,
I'm using SDK 1.2.0 with modem fw v1.2.0
My goal is to improve the fixing time while moving (pedestrian speed). For that I implemented SUPL on my project with the following steps.
1. lte_lc_int_and_connect -> 2. Init and start GPS ->3. Get A-GPS request -> 4. Active_lte -> 5. Start SUPL session -> 6. SUPL session ends -> 7. Deactivate_lte -> 8. Wait for a FIX -> 9. Active_lte -> 10. Enable PSM -> 11. Transmission data
The issue is that sometimes I have a problem with the step 9. It takes a few seconds and when I arrive to the step 11 I get an error like the network is not available. This is a problem that happens sometimes. It is much more frequent with NB-IoT than LTE-M.
To active and deactivate the lte i used the function of the GPS sample.
static int activate_lte(bool activate) { if (activate) { if (at_cmd_write(AT_ACTIVATE_LTE, NULL, 0, NULL) != 0) { return -1; } at_notif_register_handler(NULL, wait_for_lte); if (at_cmd_write("AT+CEREG=2", NULL, 0, NULL) != 0) { return -1; } k_sem_take(<e_ready, K_FOREVER); at_notif_deregister_handler(NULL, wait_for_lte); if (at_cmd_write("AT+CEREG=0", NULL, 0, NULL) != 0) { return -1; } } else { if (at_cmd_write(AT_DEACTIVATE_LTE, NULL, 0, NULL) != 0) { return -1; } } return 0; }
#define AT_ACTIVATE_LTE "AT+CFUN=21" #define AT_DEACTIVATE_LTE "AT+CFUN=20"
Any idea of what is going on and how can I improve that ?
I tried to enable PSM since the beginning it works however the first fixing time is to bad while moving (most of the times not even working).
Regards,