The Modem Shell (MoSh) application enables you to test various connectivity features of the nRF9151 such as LTE link handling, TCP/IP connections, data throughput (iperf3 and curl), SMS, GNSS, FOTA updates and PPP.
MoSh uses the LTE link control driver to establish an LTE connection and initializes the Zephyr shell to provide a shell command-line interface for users.
Tip
The nRF9151 Connect Kit comes pre-programmed with the Modem Shell application, enabling you to explore its various features right out of the box.
The -p always option forces a pristine build, and is recommended for new users. Users may also use the -p auto option, which will use heuristics to determine if a pristine build is required, such as when building another application.
Note
This application has Cortex-M Security Extensions (CMSE) enabled and separates the firmware between Non-Secure Processing Environment (NSPE) and Secure Processing Environment (SPE). Because of this, it automatically includes the Trusted Firmware-M (TF-M).
After building the application successfully, the firmware with the name merged.hex can be found in the build directory.
mosh:~$
at clear cloud_rest curl date device dl fota gnss
gpio_count heap help history iperf3 kernel link location ping
print rem resize rest retval shell sleep sms sock
startup_cmd th uart version
mosh:~$ ping --help
Usage: ping [options] -d destination
-d, --destination, [str] Name or IP address
Options:
-t, --timeout, [int] Ping timeout in milliseconds
-c, --count, [int] The number of times to send the ping request
-i, --interval, [int] Interval between successive packet transmissions
in milliseconds
-l, --length, [int] Payload length to be sent
-I, --cid, [int] Use this option to bind pinging to specific CID.
See link cmd for interfaces
-6, --ipv6, Force IPv6 usage with the dual stack interfaces
-r, --rai Set RAI options for ping socket. In order to use RAI,
it must be enabled with 'link rai' command.
-h, --help, Shows this help information
Use ping command to test the reachability of a host on an IP network. For example:
Fix valid: true
Leap second valid: false
Sleep between PVT: false
Deadline missed: false
Insuf. time window: false
Velocity valid: true
Scheduled download: false
Execution time: 52587 ms
Time: 22.02.2025 07:29:24.141
Latitude: 22.694009
Longitude: 113.941902
Accuracy: 3.5 m
Altitude: 103.4 m
Altitude accuracy: 5.5 m
Speed: 0.1 m/s
Speed accuracy: 0.6 m/s
V. speed: 0.2 m/s
V. speed accuracy: 0.6 m/s
Heading: 0.0 deg
Heading accuracy: 180.0 deg
PDOP: 4.6
HDOP: 2.6
VDOP: 3.7
TDOP: 3.4
Google maps URL: https://maps.google.com/?q=22.694009,113.941902
SV: 22 C/N0: 38.7 el: 42 az: 331 signal: 1 in fix: 1 unhealthy: 0
SV: 17 C/N0: 37.7 el: 43 az: 325 signal: 1 in fix: 1 unhealthy: 0
SV: 14 C/N0: 39.7 el: 63 az: 342 signal: 1 in fix: 1 unhealthy: 0
SV: 195 C/N0: 40.2 el: 63 az: 55 signal: 3 in fix: 1 unhealthy: 0
SV: 194 C/N0: 38.9 el: 61 az: 92 signal: 3 in fix: 1 unhealthy: 0
SV: 1 C/N0: 40.1 el: 37 az: 35 signal: 1 in fix: 1 unhealthy: 0
SV: 3 C/N0: 32.6 el: 40 az: 97 signal: 1 in fix: 1 unhealthy: 0
SV: 199 C/N0: 31.3 el: 0 az: 0 signal: 3 in fix: 0 unhealthy: 0
SV: 19 C/N0: 24.5 el: 0 az: 0 signal: 1 in fix: 0 unhealthy: 0
...
To turn off the GNSS, run the following command:
gnssstop
Optimize GNSS reception
GNSS signals do not usually penetrate ceilings or other structures that well. For best GNSS performance, the antenna should be placed outside on a flat surface in an open space far from sources of interference and other structures that can block the satellite signals.
The GNSS patch antenna achieves the highest gain when placed horizontally on a surface (x-y) facing the z-axis since it can receive all propagated GNSS signals. A lower gain is experienced if the patch antenna is mounted at an angle.
Try more commands to explore different connectivity features of the Modem Shell application.