In this exercise, we will turn on both the GNSS and the LTE modem and connect to the UDP echo server used in Lesson 3. Then, pushing button 1 on your device will send GPS information to the server.
This will let us observe how the LTE and GNSS coexist in the same application, and how the <Active-Timer> plays into this.
Exercise Steps
1. In the GitHub repository for this course, go to the base code for this exercise, found in lesson6/cellfund_less6_exer2 of whichever version directory you are using (v2.2.0-v2.3.0 or v2.4.0-v2.x.x).
2. Since the LTE modem and GNSS receiver will be active simultaneously in the application, we can now send our acquired coordinates over LTE to a UDP server in real-time.
3. Modify print_fix_data() to create a string we can send.
3.1 Declare the buffer gps_data to be used when sending data to the echo server
Copy
staticuint8_tgps_data[MESSAGE_SIZE];
C
3.2 Modify print_fix_data() to create a string containing the latitude and longitude and write it to gps_data.
Copy
int err = snprintf(gps_data, MESSAGE_SIZE, "Latitude: %.06f, Longitude: %.06f", pvt_data->latitude, pvt_data->longitude); if (err < 0) {LOG_ERR("Failed to print to buffer: %d", err); }
C
3.3 In button_handler(), send this string to the UDP server upon button 1 push.
Recall that these two flags will never be set at the same time.
Copy
if (pvt_data.flags & NRF_MODEM_GNSS_PVT_FLAG_DEADLINE_MISSED) {LOG_INF("GNSS blocked by LTE activity");} if (pvt_data.flags & NRF_MODEM_GNSS_PVT_FLAG_NOT_ENOUGH_WINDOW_TIME) {LOG_INF("Insufficient GNSS time windows");}
C
6. Build the exercise and flash it to your board. Run the application for around 5 minutes, pressing button 1 occasionally to send a UDP packet.
6.1 Let’s take a look at the resulting log output, which has been a bit reduced for readability.
*** Booting nRF Connect SDK 2.6.1-3758bcbfa5cd ***[00:00:00.411,232] <inf> Lesson6_Exercise2: Initializing modem library[00:00:00.609,222] <inf> Lesson6_Exercise2: Connecting to LTE network[00:00:01.889,160] <inf> Lesson6_Exercise2: RRC mode: Connected[00:00:03.894,378] <inf> Lesson6_Exercise2: Network registration status: Connected - roaming[00:00:03.894,531] <inf> Lesson6_Exercise2: Connected to LTE network[00:00:04.055,755] <inf> Lesson6_Exercise2: IPv4 Address found 20.56.165.163[00:00:04.056,023] <inf> Lesson6_Exercise2: Successfully connected[00:00:04.060,180] <inf> Lesson6_Exercise2: Starting GNSS[00:00:05.066,711] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:05.066,772] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:07.076,568] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:07.076,629] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:09.096,343] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:09.096,405] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:10.498,535] <inf> Lesson6_Exercise2: RRC mode: Idle[00:00:10.516,632] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:12.519,836] <inf> Lesson6_Exercise2: Searching. Current satellites: 7[00:00:13.519,897] <inf> Lesson6_Exercise2: Searching. Current satellites: 8[00:00:15.521,636] <inf> Lesson6_Exercise2: Searching. Current satellites: 9[00:00:18.522,583] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:00:19.522,735] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:23.974,121] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:23.974,182] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:24.879,669] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:24.879,730] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:25.883,850] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:25.883,911] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:26.780,120] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:26.780,181] <inf> Lesson6_Exercise2: Insufficient GNSS time windows
Terminal
It’s evident from the log that the RRC Inactivity Timer is 6 seconds. That’s the time it takes from the UE has connected to the server until it’s released from RRC Connected mode and goes into RRC Idle mode.
When the UE is in RRC Connected mode, the GNSS is blocked by LTE activity. When the device is released from RRC Connected mode, it takes a little while (around 13 seconds) before the average time window granted to GNSS is below the threshold of 10 seconds and the NOT_ENOUGH_WINDOW_TIME flag is raised. This is most likely due to the LTE modem initiating page monitoring.
Even though the GNSS is tracking enough satellites, it is not given the time window required to download the satellite information and be able to calculate a valid fix.
Note
We also know the RRC Inactivity Timer for this connection is 6 seconds through communication with the network provider. This is not a timer value the UE is given when connecting, so it is not something that can be read through AT commands.
6.2 Now press button 1 to send a packet to the UDP server, and observe the output.
In our case, we get the following log output.
[00:00:58.058,593] <inf> Lesson6_Exercise2: RRC mode: Connected[00:00:58.551,483] <inf> Lesson6_Exercise2: Searching. Current satellites: 11[00:00:58.551,544] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:58.829,345] <inf> Lesson6_Exercise2: Data received from the server: (Time: 2022-10-11 09:19:32 Message: )[00:00:59.551,696] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:59.551,757] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:01:01.552,612] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:01:01.552,642] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:01:03.553,405] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:01:03.553,466] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:01:05.267,578] <inf> Lesson6_Exercise2: RRC mode: Idle[00:01:05.271,850] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:01:05.271,942] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:01:07.278,594] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:01:07.278,656] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:01:11.279,449] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:01:11.279,479] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:01:13.279,724] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:01:13.279,785] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:01:14.279,754] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:01:15.279,754] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:01:16.279,907] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:01:17.585,083] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:01:17.585,113] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:01:18.589,019] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:01:18.589,080] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:01:20.782,775] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:01:20.782,836] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:01:22.062,622] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:01:22.062,683] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:01:23.982,696] <inf> Lesson6_Exercise2: Searching. Current satellites: 2[00:01:23.982,757] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:01:24.985,198] <inf> Lesson6_Exercise2: Searching. Current satellites: 1[00:01:24.985,260] <inf> Lesson6_Exercise2: Insufficient GNSS time windows
Terminal
As soon as button 1 is pushed, the UE is in RRC Connected mode, and the GNSS is therefore blocked by LTE activity. When the UE is released from RRC Connected and enters RRC Idle mode, the GNSS has insufficient time windows, due to the average time window (taken before and after RRC Idle mode) is smaller than 10 seconds.
Notice that the flag is disabled for a short period of time after being put in RRC Idle mode, before being enabled again.
This is because the NOT_ENOUGH_WINDOW_TIME flag is based on the current average time window length given to the GNSS, and is raised if this time window is less than 10 seconds. In this case, the average time window right after being released from RRC Connected mode is very small because the time window in RRC Connected mode is very small. It takes around 9 seconds for the average time window to become larger than 10 seconds, at which point the flag is disabled. This doesn’t last long, however, as the LTE modem initiates page monitoring not long after and the average time window is again decreased to lower than 10 seconds and the flag is raised again.
It is important to note that the behavior of the modem heavily depends on the network parameters given to your UE and can vary from what is being shown here.
With power saving techniques
We have now seen that when the LTE modem is active, the GNSS receiver will not have enough time to actually produce a valid fix. Even when the modem is in RRC Idle mode, it is paging intermittently which doesn’t give GNSS a large enough time window to download satellite information and calculate a valid fix.
The solution to this is to enable PSM or eDRX in your application.
Enabling PSM puts the LTE modem in deep sleep and the GNSS receiver will be able to run freely until the LTE modem has to wake up to send the TAU.
Enabling eDRX will extend the amount of time the LTE modem sleeps between paging, and will give the GNSS large enough time windows to perform the necessary operations.
Important
If your network operator and/or SIM card does not support either PSM nor eDRX, you will have to manually deactivate and activate the modem when wanting to use the GNSS in your application. There is a workaround, by giving the GNSS priority over LTE events to help get a fix. This is not recommended, as it interferes with LTE operations.
7. Set the Kconfigs to enable eDRX and PSM in prj.conf
9. Expand the lte_handler() to notify us on the power saving events LTE_LC_EVT_PSM_UPDATE and LTE_LC_EVT_EDRX_UPDATE.
9.1 On the PSM update, we print the PSM parameters given by the network, and check the value of active time to confirm if PSM was granted.
Copy
case LTE_LC_EVT_PSM_UPDATE:LOG_INF("PSM parameter update: TAU: %d, Active time: %d", evt->psm_cfg.tau, evt->psm_cfg.active_time);if (evt->psm_cfg.active_time == -1){LOG_ERR("Network rejected PSM parameters. Failed to enable PSM"); }
C
9.2 On the eDRX update, we print the eDRX parameters given by the network (if any). If this event is never triggered, eDRX was not enabled by the network.
Copy
case LTE_LC_EVT_EDRX_UPDATE:LOG_INF("eDRX parameter update: eDRX: %f, PTW: %f", evt->edrx_cfg.edrx, evt->edrx_cfg.ptw);break;
C
If you are not able to enable either PSM or eDRX, there is a work-around to be able to achieve a GNSS fix. This is by enabling GNSS priority mode, which will give GNSS operations priority over LTE events and will allow the GNSS enough time to get a valid fix. This is not recommended and will therefore not be in the base exercise or the exercise solution.
In gnss_init_and_start(), after starting GNSS with nrf_modem_gnss_start(), you can enable GNSS priority mode.
Copy
if (nrf_modem_gnss_prio_mode_enable() != 0) {LOG_ERR("Failed to set priority mode for GNSS");} else {LOG_INF("GNSS priority mode set");}
10. Build the exercise and flash it to your board.
PSM
Let’s look at the scenario where PSM is enabled with the requested value, and eDRX is not.
*** Booting nRF Connect SDK 2.6.1-3758bcbfa5cd ***[00:00:00.334,057] <inf> Lesson6_Exercise2: Initializing modem library[00:00:00.610,565] <inf> Lesson6_Exercise2: Connecting to LTE network[00:00:01.683,746] <inf> Lesson6_Exercise2: RRC mode: Connected[00:00:03.465,942] <inf> Lesson6_Exercise2: Network registration status: Connected - roaming[00:00:03.466,094] <inf> Lesson6_Exercise2: Connected to LTE network[00:00:03.467,315] <inf> Lesson6_Exercise2: PSM parameter update: Periodic TAU: 28800 s, Active time: 16 s[00:00:03.635,864] <inf> Lesson6_Exercise2: IPv4 Address found 20.56.165.163[00:00:03.640,441] <inf> Lesson6_Exercise2: Starting GNSS[00:00:04.652,496] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:04.652,557] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:06.672,210] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:06.672,271] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:08.677,459] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:08.677,520] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:10.230,072] <inf> Lesson6_Exercise2: RRC mode: Idle[00:00:10.247,253] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:12.250,122] <inf> Lesson6_Exercise2: Searching. Current satellites: 7[00:00:16.250,152] <inf> Lesson6_Exercise2: Searching. Current satellites: 7[00:00:18.253,387] <inf> Lesson6_Exercise2: Searching. Current satellites: 8[00:00:19.252,929] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:00:21.254,608] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:23.398,712] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:00:23.398,773] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:24.402,008] <inf> Lesson6_Exercise2: Searching. Current satellites: 9[00:00:24.402,069] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:26.313,049] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:26.313,079] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:30.312,072] <inf> Lesson6_Exercise2: Searching. Current satellites: 9[00:00:30.312,133] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:34.312,072] <inf> Lesson6_Exercise2: Searching. Current satellites: 9[00:00:34.312,133] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:35.312,927] <inf> Lesson6_Exercise2: Searching. Current satellites: 9[00:00:37.313,293] <inf> Lesson6_Exercise2: Searching. Current satellites: 9[00:00:39.313,476] <inf> Lesson6_Exercise2: Searching. Current satellites: 9[00:00:40.314,239] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:00:44.314,361] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:46.314,422] <inf> Lesson6_Exercise2: Searching. Current satellites: 11[00:00:50.314,849] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:00:52.314,758] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:55.367,492] <inf> Lesson6_Exercise2: Searching. Current satellites: 11[00:00:55.367,553] <inf> Lesson6_Exercise2: Latitude: 63.421110[00:00:55.367,584] <inf> Lesson6_Exercise2: Longitude: 10.437347[00:00:55.367,584] <inf> Lesson6_Exercise2: Altitude: 151.6 m[00:00:55.367,614] <inf> Lesson6_Exercise2: Time (UTC): 09:58:30.259[00:00:55.367,919] <inf> Lesson6_Exercise2: Time to first fix: 51 s[00:00:55.369,049] <inf> Lesson6_Exercise2: GNSS enter sleep after fix
Terminal
At first glance, this log output might seems strange. We know that 16 seconds (Active Timer) after being in RRC Idle mode, the LTE modem should be in power saving mode, and the GNSS should have sufficient time windows. So why is the log saying something else?
We are seeing the same thing that we noticed in step 6, in which the NOT_ENOUGH_TIME_WINDOW flag takes a bit of time to adjust to the current average time window.
Shortly after RRC Idle mode, some higher level LTE activity is starting (probably related to page monitoring) and making the time windows granted to GNSS too short. When the modem is put in power saving mode 3 seconds later (because the Active-Timer of 16 seconds has run out) the flag is not disabled immediately because the average time window is still lower than 10 seconds. It takes some time before the average is raised above the threshold.
Let’s also illustrate another scenario, whereby we set the requested Active-Timer to 6 seconds.
Copy
CONFIG_LTE_PSM_REQ_RAT="00000011"
Kconfig
In this case, the log output looks something like this
*** Booting Zephyr OS build v3.1.99-ncs1 ***[00:00:00.334,057] <inf> Lesson6_Exercise2: Initializing modem library[00:00:00.534,057] <inf> Lesson6_Exercise2: Connecting to LTE network[00:00:01.962,707] <inf> Lesson6_Exercise2: RRC mode: Connected[00:00:03.980,194] <inf> Lesson6_Exercise2: Network registration status: Connected - roaming[00:00:03.980,346] <inf> Lesson6_Exercise2: Connected to LTE network[00:00:03.981,536] <inf> Lesson6_Exercise2: PSM parameter update: Periodic TAU: 28800 s, Active time: 6 s[00:00:04.130,645] <inf> Lesson6_Exercise2: IPv4 Address found 20.56.165.163[00:00:04.130,934] <inf> Lesson6_Exercise2: Successfully connected[00:00:04.135,284] <inf> Lesson6_Exercise2: Starting GNSS[00:00:05.147,369] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:05.147,430] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:07.157,348] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:07.157,409] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:09.177,124] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:09.177,185] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:10.584,075] <inf> Lesson6_Exercise2: RRC mode: Idle[00:00:10.599,731] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:11.604,095] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:12.605,407] <inf> Lesson6_Exercise2: Searching. Current satellites: 11[00:00:13.605,712] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:16.605,834] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:18.605,865] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:20.606,872] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:22.774,932] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:24.779,235] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:26.780,059] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:28.780,059] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:30.780,212] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:34.780,364] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:36.780,364] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:40.780,517] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:42.780,609] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:47.780,731] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:51.780,883] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:54.847,686] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:54.847,747] <inf> Lesson6_Exercise2: Latitude: 63.421110[00:00:54.847,778] <inf> Lesson6_Exercise2: Longitude: 10.437270[00:00:54.847,778] <inf> Lesson6_Exercise2: Altitude: 165.6 m[00:00:54.847,808] <inf> Lesson6_Exercise2: Time (UTC): 09:27:00.817[00:00:54.848,114] <inf> Lesson6_Exercise2: Time to first fix: 50 s[00:00:54.849,395] <inf> Lesson6_Exercise2: GNSS enter sleep after fix
Terminal
Now the UE is put in power saving mode before this higher-level LTE activity is started (or at least, before it decreases the average GNSS time window below the threshold), and the NOT_ENOUGH_WINDOW_TIME flag is never raised. Notice that the TTFF is almost the same, so this flag does not actually interfere with the GNSS performance.
Note that you might not be able to recreate this log when connected to your network, since this all depends on network provider-specific configurations.
eDRX
Let’s look at the scenario where eDRX is enabled with the requested value, and PSM is not.
*** Booting nRF Connect SDK 2.6.1-3758bcbfa5cd ***[00:00:00.334,057] <inf> Lesson6_Exercise2: Initializing modem library[00:00:00.610,900] <inf> Lesson6_Exercise2: Connecting to LTE network[00:00:02.326,904] <inf> Lesson6_Exercise2: RRC mode: Connected[00:00:03.782,470] <inf> Lesson6_Exercise2: Network registration status: Connected - roaming[00:00:03.782,623] <inf> Lesson6_Exercise2: Connected to LTE network[00:00:03.783,935] <inf> Lesson6_Exercise2: PSM update: Periodic TAU: 10800 s, Active time: -1 s[00:00:03.783,935] <err> Lesson6_Exercise2: Network rejected PSM parameters. Failed to setup network[00:00:03.784,240] <inf> Lesson6_Exercise2: eDRX parameter update: eDRX: 163.839996, PTW: 20.480000[00:00:04.871,063] <inf> Lesson6_Exercise2: IPv4 Address found 20.56.165.163[00:00:04.871,673] <inf> Lesson6_Exercise2: Successfully connected to server[00:00:04.875,366] <inf> Lesson6_Exercise2: Starting GNSS[00:00:05.877,349] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:05.877,380] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:06.878,143] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:06.878,204] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:07.878,234] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:07.878,265] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:08.878,509] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:08.878,540] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:09.879,302] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:09.879,364] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:09.955,963] <inf> Lesson6_Exercise2: RRC mode: Idle[00:00:09.962,158] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:10.965,911] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:11.966,400] <inf> Lesson6_Exercise2: Searching. Current satellites: 9[00:00:12.967,193] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:00:14.967,498] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:00:16.968,048] <inf> Lesson6_Exercise2: Searching. Current satellites: 11[00:00:19.969,177] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:20.968,597] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:26.423,706] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:27.423,553] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:28.423,645] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:29.423,645] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:30.423,767] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:32.423,797] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:34.423,950] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:36.423,950] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:37.423,950] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:38.424,072] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:39.424,041] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:40.424,102] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:41.467,559] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:41.467,620] <inf> Lesson6_Exercise2: Latitude: 63.421131[00:00:41.467,620] <inf> Lesson6_Exercise2: Longitude: 10.437294[00:00:41.467,651] <inf> Lesson6_Exercise2: Altitude: 160.4 m[00:00:41.467,651] <inf> Lesson6_Exercise2: Time (UTC): 12:57:54.752[00:00:41.467,987] <inf> Lesson6_Exercise2: Time to first fix: 36 s[00:00:41.468,963] <inf> Lesson6_Exercise2: GNSS enter sleep after fix
Terminal
As we know, the GNSS is not able to run when the modem is in RRC Connected mode. As soon as we go to RRC Idle mode, the GNSS starts running and is able to find a fix in 36 seconds.
This is much lower than the previous case, with just PSM, because the GNSS starts running right after RRC Idle mode, and isn’t limited by the page monitoring during the Active Time, like we were with PSM.
PSM and eDRX
Let’s look at the scenario where both PSM and eDRX are enabled.
*** Booting nRF Connect SDK 2.6.1-3758bcbfa5cd ***[00:00:00.334,057] <inf> Lesson6_Exercise2: Initializing modem library[00:00:00.613,403] <inf> Lesson6_Exercise2: Connecting to LTE network[00:00:03.168,640] <inf> Lesson6_Exercise2: RRC mode: Connected[00:00:04.549,194] <inf> Lesson6_Exercise2: Network registration status: Connected - roaming[00:00:04.549,346] <inf> Lesson6_Exercise2: Connected to LTE network[00:00:04.550,659] <inf> Lesson6_Exercise2: PSM parameter update: Periodic TAU: 32400 s, Active time: 240 s[00:00:04.550,933] <inf> Lesson6_Exercise2: eDRX parameter update: eDRX: 163.839996, PTW: 20.480000[00:00:04.828,765] <inf> Lesson6_Exercise2: IPv4 Address found 20.56.165.163[00:00:04.829,376] <inf> Lesson6_Exercise2: Successfully connected to server[00:00:04.833,068] <inf> Lesson6_Exercise2: Starting GNSS[00:00:05.835,052] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:05.835,113] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:06.835,815] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:06.835,876] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:07.835,906] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:07.835,968] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:08.836,181] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:08.836,242] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:09.837,036] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:09.837,097] <inf> Lesson6_Exercise2: GNSS blocked by LTE activity[00:00:09.913,696] <inf> Lesson6_Exercise2: RRC mode: Idle[00:00:09.919,067] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:10.922,119] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:11.922,760] <inf> Lesson6_Exercise2: Searching. Current satellites: 8[00:00:13.921,997] <inf> Lesson6_Exercise2: Searching. Current satellites: 8[00:00:15.924,194] <inf> Lesson6_Exercise2: Searching. Current satellites: 11[00:00:17.925,079] <inf> Lesson6_Exercise2: Searching. Current satellites: 11[00:00:18.924,438] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:22.681,030] <inf> Lesson6_Exercise2: Searching. Current satellites: 10[00:00:23.687,927] <inf> Lesson6_Exercise2: Searching. Current satellites: 0[00:00:25.687,835] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:25.687,896] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:26.687,896] <inf> Lesson6_Exercise2: Searching. Current satellites: 11[00:00:26.687,957] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:27.869,689] <inf> Lesson6_Exercise2: Searching. Current satellites: 11[00:00:27.869,750] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:28.873,626] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:28.873,657] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:29.873,657] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:29.873,718] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:30.873,626] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:30.873,718] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:31.873,657] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:31.873,718] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:32.873,748] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:32.873,779] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:33.873,626] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:33.873,687] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:34.873,748] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:34.873,779] <inf> Lesson6_Exercise2: Insufficient GNSS time windows[00:00:35.874,114] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:37.874,114] <inf> Lesson6_Exercise2: Searching. Current satellites: 11[00:00:41.875,030] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:51.875,457] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:55.875,640] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:00:59.875,762] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:01:01.875,762] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:01:03.941,680] <inf> Lesson6_Exercise2: Searching. Current satellites: 12[00:01:03.941,741] <inf> Lesson6_Exercise2: Latitude: 63.421145[00:01:03.941,772] <inf> Lesson6_Exercise2: Longitude: 10.437334[00:01:03.941,772] <inf> Lesson6_Exercise2: Altitude: 161.8 m[00:01:03.941,802] <inf> Lesson6_Exercise2: Time (UTC): 13:14:54.765[00:01:03.942,108] <inf> Lesson6_Exercise2: Time to first fix: 59 s[00:01:03.943,420] <inf> Lesson6_Exercise2: GNSS enter sleep after fix
Terminal
The solution for this exercise can be found in lesson6/cellfund_less6_exer2_solution of whichever version directory you are using (v2.2.0-v2.3.0 or v2.4.0-v2.x.x).
Nordic Developer Academy Privacy Policy
1. Introduction
In this Privacy Policy you will find information on Nordic Semiconductor ASA (“Nordic Semiconductor”) processes your personal data when you use the Nordic Developer Academy.
References to “we” and “us” in this document refers to Nordic Semiconductor.
2. Our processing of personal data when you use the Nordic Developer Academy
2.1 Nordic Developer Academy
Nordic Semiconductor processes personal data in order to provide you with the features and functionality of the Nordic Developer Academy. Creating a user account is optional, but required if you want to track you progress and view your completed courses and obtained certificates. If you choose to create a user account, we will process the following categories of personal data:
Email
Name
Password (encrypted)
Course progression (e.g. which course you have completely or partly completed)
Certificate information, which consists of name of completed course and the validity of the certificate
Course results
During your use of the Nordic Developer Academy, you may also be asked if you want to provide feedback. If you choose to respond to any such surveys, we will also process the personal data in your responses in that survey.
The legal basis for this processing is GDPR article 6 (1) b. The processing is necessary for Nordic Semiconductor to provide the Nordic Developer Academy under the Terms of Service.
2.2 Analytics
If you consent to analytics, Nordic Semiconductor will use Google Analytics to obtain statistics about how the Nordic Developer Academy is used. This includes collecting information on for example what pages are viewed, the duration of the visit, the way in which the pages are maneuvered, what links are clicked, technical information about your equipment. The information is used to learn how Nordic Developer Academy is used and how the user experience can be further developed.
2.2 Newsletter
You can consent to receive newsletters from Nordic from within the Nordic Developer Academy. How your personal data is processed when you sign up for our newsletters is described in the Nordic Semiconductor Privacy Policy.
3. Retention period
We will store your personal data for as long you use the Nordic Developer Academy. If our systems register that you have not used your account for 36 months, your account will be deleted.
4. Additional information
Additional information on how we process personal data can be found in the Nordic Semiconductor Privacy Policy and Cookie Policy.
Nordic Developer Academy Terms of Service
1. Introduction
These terms and conditions (“Terms of Use”) apply to the use of the Nordic Developer Academy, provided by Nordic Semiconductor ASA, org. nr. 966 011 726, a public limited liability company registered in Norway (“Nordic Semiconductor”).
Nordic Developer Academy allows the user to take technical courses related to Nordic Semiconductor products, software and services, and obtain a certificate certifying completion of these courses. By completing the registration process for the Nordic Developer Academy, you are agreeing to be bound by these Terms of Use.
These Terms of Use are applicable as long as you have a user account giving you access to Nordic Developer Academy.
2. Access to and use of Nordic Developer Academy
Upon acceptance of these Terms of Use you are granted a non-exclusive right of access to, and use of Nordic Developer Academy, as it is provided to you at any time. Nordic Semiconductor provides Nordic Developer Academy to you free of charge, subject to the provisions of these Terms of Use and the Nordic Developer Academy Privacy Policy.
To access select features of Nordic Developer Academy, you need to create a user account. You are solely responsible for the security associated with your user account, including always keeping your login details safe.
You will able to receive an electronic certificate from Nordic Developer Academy upon completion of courses. By issuing you such a certificate, Nordic Semiconductor certifies that you have completed the applicable course, but does not provide any further warrants or endorsements for any particular skills or professional qualifications.
Nordic Semiconductor will continuously develop Nordic Developer Academy with new features and functionality, but reserves the right to remove or alter any existing functions without notice.
3. Acceptable use
You undertake that you will use Nordic Developer Academy in accordance with applicable law and regulations, and in accordance with these Terms of Use. You must not modify, adapt, or hack Nordic Developer Academy or modify another website so as to falsely imply that it is associated with Nordic Developer Academy, Nordic Semiconductor, or any other Nordic Semiconductor product, software or service.
You agree not to reproduce, duplicate, copy, sell, resell or in any other way exploit any portion of Nordic Developer Academy, use of Nordic Developer Academy, or access to Nordic Developer Academy without the express written permission by Nordic Semiconductor. You must not upload, post, host, or transmit unsolicited email, SMS, or \”spam\” messages.
You are responsible for ensuring that the information you post and the content you share does not;
contain false, misleading or otherwise erroneous information
infringe someone else’s copyrights or other intellectual property rights
contain sensitive personal data or
contain information that might be received as offensive or insulting.
Such information may be removed without prior notice.
Nordic Semiconductor reserves the right to at any time determine whether a use of Nordic Developer Academy is in violation of its requirements for acceptable use.
Violation of the at any time applicable requirements for acceptable use may result in termination of your account. We will take reasonable steps to notify you and state the reason for termination in such cases.
4. Routines for planned maintenance
Certain types of maintenance may imply a stop or reduction in availability of Nordic Developer Academy. Nordic Semiconductor does not warrant any level of service availability but will provide its best effort to limit the impact of any planned maintenance on the availability of Nordic Developer Academy.
5. Intellectual property rights
Nordic Semiconductor retains all rights to all elements of Nordic Developer Academy. This includes, but is not limited to, the concept, design, trademarks, know-how, trade secrets, copyrights and all other intellectual property rights.
Nordic Semiconductor receives all rights to all content uploaded or created in Nordic Developer Academy. You do not receive any license or usage rights to Nordic Developer Academy beyond what is explicitly stated in this Agreement.
6. Liability and damages
Nothing within these Terms of Use is intended to limit your statutory data privacy rights as a data subject, as described in the Nordic Developer Academy Privacy Policy. You acknowledge that errors might occur from time to time and waive any right to claim for compensation as a result of errors in Nordic Developer Academy. When an error occurs, you shall notify Nordic Semiconductor of the error and provide a description of the error situation.
You agree to indemnify Nordic Semiconductor for any loss, including indirect loss, arising out of or in connection with your use of Nordic Developer Academy or violations of these Terms of Use. Nordic Semiconductor shall not be held liable for, and does not warrant that (i) Nordic Developer Academy will meet your specific requirements, (ii) Nordic Developer Academy will be uninterrupted, timely, secure, or error-free, (iii) the results that may be obtained from the use of Nordic Developer Academy will be accurate or reliable, (iv) the quality of any products, services, information, or other material purchased or obtained by you through Nordic Developer Academy will meet your expectations, or that (v) any errors in Nordic Developer Academy will be corrected.
You accept that this is a service provided to you without any payment and hence you accept that Nordic Semiconductor will not be held responsible, or liable, for any breaches of these Terms of Use or any loss connected to your use of Nordic Developer Academy. Unless otherwise follows from mandatory law, Nordic Semiconductor will not accept any such responsibility or liability.
7. Change of terms
Nordic Semiconductor may update and change the Terms of Use from time to time. Nordic Semiconductor will seek to notify you about significant changes before such changes come into force and give you a possibility to evaluate the effects of proposed changes. Continued use of Nordic Developer Academy after any such changes shall constitute your acceptance of such changes. You can review the current version of the Terms of Use at any time at https://academy.nordicsemi.com/terms-of-service/
8. Transfer of rights
Nordic Semiconductor is entitled to transfer its rights and obligation pursuant to these Terms of Use to a third party as part of a merger or acquisition process, or as a result of other organizational changes.
9. Third Party Services
To the extent Nordic Developer Academy facilitates access to services provided by a third party, you agree to comply with the terms governing such third party services. Nordic Semiconductor shall not be held liable for any errors, omissions, inaccuracies, etc. related to such third party services.
10. Dispute resolution
The Terms of Use and any other legally binding agreement between yourself and Nordic Semiconductor shall be subject to Norwegian law and Norwegian courts’ exclusive jurisdiction.