Build and flash the application with overlay-modem-trace-over-uart.conf and overlay-modem-trace-shmem.overlay:
west build -p -b <board> --sysbuild -- \
-DEXTRA_CONF_FILE="overlay-modem-trace-over-uart.conf" \
-DEXTRA_DTC_OVERLAY_FILE="overlay-modem-trace-shmem.overlay" \
&& west flash --recover
Capture the traces with the Cellular Monitor application in nRF Connect for Desktop, or manually with nRF Util:
nrfutil trace lte --input-serialport /dev/tty.usbmodem141405 --output-pcapng trace.pcapng
~/pcap ❯ nrfutil trace lte --input-serialport /dev/tty.usbmodem141405 --output-pcapng trace.pcapng 10:25:31
⠒ Saving trace to trace.pcapng (11952 bytes)
If nRF Util captures no traces, reset the device. After the capture, open the trace in Wireshark:
wireshark trace.pcapng
You can also trace live by piping the traces to Wireshark:
nrfutil trace lte --input-serialport /dev/tty.usbmodem141405 --output-pcapng trace.pcapng --output-wireshark wireshark