Hello,
I'm developing a custom asset tracker board. My software is currently a very lightly modifed asset tracker v1; my provider currently only support NB-IoT, firmware version is mfw_nrf9160_1.2.2 ; SDK version is 1.5.1. When application tries to enable the GPS I get the following error:
<inf> gps_control: Enabling PSM
<inf> gps_control: PSM enabled
<dbg> nrf9160_gps.enable_gps: GPS mode is not enabled, attempting to enable it
<err> lte_lc: Could not send AT command, error: -8
<err> nrf9160_gps: Could not enable GPS mode, error: -8
<err> nrf9160_gps: Failed to enable GPS
<err> gps_control: Failed to enable GPS, error: -5
When asset tracker initially start, it sends AT%XSYSTEMMODE=0,1,0,0 to modem and the enable_gps part of the code tries to send AT%XSYSTEMMODE=0,1,1,0 to modem. According to AT manual this command can only be sent when modem is not connected, that's why it fails. In my opinion this can be interpreted as either a bug in asset tracker v1 application or in SDK itself (lte_lc_system_mode_set
).
My current workaround is to change modem_configure()
from using lte_lc_init_and_connect()
to:
lte_lc_init();
lte_lc_system_mode_set(LTE_LC_SYSTEM_MODE_NBIOT_GPS);
lte_lc_connect();