Note: The NTN use case variant of the Asset Tracker Template is experimental and intended for development and testing purposes.
The NTN use case application operates in the following cycle:
- GNSS Cold Start: Acquires a GNSS location fix.
- NTN Connection: Switches to NTN system mode and establishes a connection using the acquired location.
- Data Transmission: Sends data to the configured cloud endpoint.
- Cycle: Repeats the process, triggered by a button press or the timeout defined in
CONFIG_APP_NTN_TIMER_TIMEOUT_MINUTES.
Configure the UDP endpoint IP address and port in prj.conf:
CONFIG_APP_NTN_SERVER_ADDR=""
CONFIG_APP_NTN_SERVER_PORT=
west build app -b nrf9151dk/nrf9151/ns -- -DEXTRA_CONF_FILE=overlay-ntn-skylo-monogoto.confwest build app -b nrf9151dk/nrf9151/ns -- -DEXTRA_CONF_FILE=overlay-ntn-skylo-dt.confwest build app -b nrf9151dk/nrf9151/ns -- -DEXTRA_CONF_FILE=overlay-ntn-skylo-soracom.confwest build app -b nrf9151dk/nrf9151/ns -- -DEXTRA_CONF_FILE=overlay-ntn-amari.confBy default, the device reports temperature data to the UDP endpoint. The last four digits of the device IMEI are used for identification.
Device: *xxxx, temp: xx
If CONFIG_APP_NTN_SEND_GNSS_DATA is enabled, GNSS data is sent in addition to temperature data:
Device: *xxxx, temp: xx, lat=xx.xx, lon=xx.xx, alt=xx.xx, time=xxxx-xx-xx xx:xx:xx
The application uses the NTN library to manage location updates. The library uses the AT%LOCATION command to subscribe to location update requests from the modem and to provide the necessary location data.
Additionally, the application uses PDN_LTE_LC and lte_lc_cellular_profile_configure to manage PDN contexts and cellular profiles.
The application handles LTE_LC_EVT_PDN_SUSPENDED and LTE_LC_EVT_PDN_RESUMED events. These events indicate when PDNs are active but temporarily unusable. This mechanism supports context retention during temporary coverage loss, which is critical for efficient NTN operation.
Operating in NTN networks presents challenges due to limited data rates and high latency. This requires optimized cellular link usage and connection setup strategies.
- Network Registration: Functional Mode 45 retains network registration. The modem enters offline mode but keeps the network registration tied to the active PDN profile.
- Context Retention: Switching between operating modes avoids re-attaching, conserving cost, power, and time.
- ePCO: Extended Protocol Configuration Options (ePCO) must be disabled for Skylo networks (
LTE_LC_PDN_LEGACY_PCO=y).
To optimize the search for available cells, band and channel locking can be configured via Kconfig.
Note: The NTN modem searches NTN specific bands (e.g., B23, B255, B256) only if band lock or channel lock is disabled.
Available Kconfig options:
CONFIG_APP_NTN_BANDLOCK_ENABLECONFIG_APP_NTN_BANDLOCKCONFIG_APP_NTN_CHANNEL_SELECT_ENABLECONFIG_APP_NTN_CHANNEL_SELECT
Proper location management is crucial for NTN operation as the modem requires accurate position data to synchronize with satellites.
The application receives notifications from the modem via the NTN library regarding the required location accuracy. The modem triggers a notification only when the requested accuracy changes. The application is responsible for keeping the location up to date according to these requirements.
Location is set using the NTN library function:
int ntn_location_set(double latitude, double longitude, float altitude, uint32_t validity);The validity parameter informs the modem how long the provided location remains valid.
- Update Interval: Must be calculated based on the device's maximum velocity and the modem's requested accuracy.
- Example: A device moving at 120 km/h (~33 m/s) with a requested accuracy of 200 meters requires updates at least every 6 seconds.
- Validity Duration: The validity time must be sufficient to cover the period until the next update.
If the validity expires without an update, the modem considers the location invalid and may cease network signaling. This causes the device to transition to IDLE mode and drop the cell, potentially triggering a re-connection cycle.
The modem determines the requested_accuracy based on its current state (e.g., IDLE vs. CONNECTED).
- IDLE Mode: Lower accuracy may be sufficient.
- Transition to CONNECTED: Higher accuracy is typically required to initiate a connection.