nRF Util on Ubuntu 20: unable to capture modem trace

Hello all,

I'm experiencing an issue while trying to capture modem traces from nRF9160DK with modem firmware 1.3.5 using nRF Util on Ubuntu 20.

I'm using Ubuntu Desktop 20.04.6 LTS with all packages up to date as of right now. I've installed this operating system both within VMWare Workstation 17 Player and on bare metal with the same result.

I have installed the following software:

  • Segger J-Link V7.90a (installation through GUI installer)
  • nRF-Udev V1.0.1 (installation through GUI installer)
  • libusb-1.0 (was already installed)
  • nRF Util (made executable and then moved into the Path folder /usr/bin) with the device and trace tool
  • Wireshark (from apt)
  • nRF Connect Desktop V4.1.2 with Cellular Monitor, Power Profiler, Programmer, Serial Monitor and Toolchain Manager

No matter which output option I choose I always get the same error sometime after I start a modem trace:

Error: Tracing failed

Caused by:
    unable to locate db directory  plugin path: /home/florian/.nrfutil/lib/nrfutil-trace/plugins/nrfml-insight-source.nrfml (error code 100)

But the file in question is present and readable for everyone (output truncated):

florian@ubuntu:~$ ls -la /home/florian/.nrfutil/lib/nrfutil-trace/plugins/
total 20760
drwxrwxr-x 2 florian florian    4096 Aug 10 14:51 .
drwxrwxr-x 3 florian florian    4096 Aug 10 14:51 ..
-rw-r--r-- 1 florian florian 8259488 Aug 10 14:51 nrfml-insight-source.nrfml

For all output methods nothing is captured (either in a file or in Wireshark) even though I've issued AT commands with the nRF Connect Serial Terminal during these attempts.

With the same AT commands I'm able to create a modem trace using nRF Connect Cellular Monitor on the same computer.

The nRF Connect Cellular Monitor was not open during my attempts to capture modem traces with nRF Util.

I have double checked the COM Port with nRF Connect Cellular Monitor.

These are some of the commands I've issued to create a modem trace with nRF Util:

  • With output to Wireshark:

nrfutil trace lte --input-serialport /dev/ttyACM2 --output-wireshark /usr/bin/wireshark

In this case I get an additional error right after executing this command:

sh: 1: disown: not found

But disown is present on the system:

florian@ubuntu:~$ disown --help
disown: disown [-h] [-ar] [jobspec ... | pid ...]
    Remove jobs from current shell.
    
    Removes each JOBSPEC argument from the table of active jobs.  Without
    any JOBSPECs, the shell uses its notion of the current job.
    
    Options:
      -a	remove all jobs if JOBSPEC is not supplied
      -h	mark each JOBSPEC so that SIGHUP is not sent to the job if the
    		shell receives a SIGHUP
      -r	remove only running jobs
    
    Exit Status:
    Returns success unless an invalid option or JOBSPEC is given.

Wireshark opens but nothing gets captured.

  • With output to a pcapng file:

nrfutil trace lte --input-serialport /dev/ttyACM2 --output-pcapng trace.pcapng

After nRF Util crashes only a 96 Byte file is left behind. This file does not include any packets.

Here are the AT commands I'm sending to the nRF9160 DK:

AT%XMODEMTRACE=1,2
AT%XSYSTEMMODE=1,0,1,0
AT+CPSMS=1
AT+CGDCONT=0,"IP","m2m.public.at"
AT+CFUN=1
AT#XNRFCLOUD=1
AT#XAGPS=1,10,10

The APN I'm using is for a Magenta Austria IoT Sim.

I would appreciate it if someone could assist me with this issue.

Thanks in advance!

regards,

Florian

In a previous version of this ticket I included the error message where I installed and executed nRF Util trace with sudo.

Parents
  • Are you running nrfutil as root? If nrfutil is running as root it is trying to find the plugin in $HOME(root)/.nrfutil/(...).

    Could you please specify where nrfutil is installed, with the NRFUTIL_HOME environment variable? If it is home/fabian/.nrfutil, then it would be export NRFUTIL_HOME=/home/fabian/.nrfutil

  • Hi Håkon,

    sorry for the late reply!

    I noticed that I added the wrong error message to my original post. 

    I meant to add the following message:

    Error: Tracing failed
    
    Caused by:
        unable to locate db directory  plugin path: /home/florian/.nrfutil/lib/nrfutil-trace/plugins/nrfml-insight-source.nrfml (error code 100)

    But instead, I added the following message which was from an attempt where I installed and executed nRF Util trace with sudo:

    Error: Tracing failed
    
    Caused by:
        unable to locate db directory  plugin path: /root/.nrfutil/lib/nrfutil-trace/plugins/nrfml-insight-source.nrfml (error code 100)
    

    I have updated the original post in order to reflect the correct error message. Apologies for the confusion.

    I've implemented your suggestion with the following command:
    export NRFUTIL_HOME=/home/florian/.nrfutil

    But this results in the same error message:

    Error: Tracing failed
    
    Caused by:
        unable to locate db directory  plugin path: /home/florian/.nrfutil/lib/nrfutil-trace/plugins/nrfml-insight-source.nrfml (error code 100)

    The file exists at the location where nRF Util trace expects it to be:

    florian@ubuntu:~$ ls -la /home/florian/.nrfutil/lib/nrfutil-trace/plugins/
    total 20760
    drwxrwxr-x 2 florian florian    4096 Aug 12 18:20 .
    drwxrwxr-x 3 florian florian    4096 Aug 10 14:51 ..
    -rw-r--r-- 1 florian florian 1677000 Aug 10 14:51 nrfml-ascii-file-sink.nrfml
    -rw-r--r-- 1 florian florian 8259488 Aug 10 14:51 nrfml-insight-source.nrfml
    -rw-r--r-- 1 florian florian 1641960 Aug 10 14:51 nrfml-pcap-sink.nrfml
    -rw-r--r-- 1 florian florian 1540032 Aug 10 14:51 nrfml-raw-file-sink.nrfml
    -rw-r--r-- 1 florian florian   16160 Aug 10 14:51 nrfml-test-broken-sink.nrfml
    -rw-r--r-- 1 florian florian   16128 Aug 10 14:51 nrfml-test-broken-source.nrfml
    -rw-r--r-- 1 florian florian 1375376 Aug 10 14:51 nrfml-test-sink.nrfml
    -rw-r--r-- 1 florian florian 1375864 Aug 10 14:51 nrfml-test-source.nrfml
    -rw-r--r-- 1 florian florian 3695888 Aug 10 14:51 nrfml-tshark-sink.nrfml
    -rw-r--r-- 1 florian florian 1641992 Aug 10 14:51 nrfml-wireshark-named-pipe-sink.nrfml
    florian@ubuntu:~$

    I'm sorry for the confusion I've cause.

    I hope that with this out of the way that a solution can be found.

    Thanks in advance!

    regards,

    Florian

Reply
  • Hi Håkon,

    sorry for the late reply!

    I noticed that I added the wrong error message to my original post. 

    I meant to add the following message:

    Error: Tracing failed
    
    Caused by:
        unable to locate db directory  plugin path: /home/florian/.nrfutil/lib/nrfutil-trace/plugins/nrfml-insight-source.nrfml (error code 100)

    But instead, I added the following message which was from an attempt where I installed and executed nRF Util trace with sudo:

    Error: Tracing failed
    
    Caused by:
        unable to locate db directory  plugin path: /root/.nrfutil/lib/nrfutil-trace/plugins/nrfml-insight-source.nrfml (error code 100)
    

    I have updated the original post in order to reflect the correct error message. Apologies for the confusion.

    I've implemented your suggestion with the following command:
    export NRFUTIL_HOME=/home/florian/.nrfutil

    But this results in the same error message:

    Error: Tracing failed
    
    Caused by:
        unable to locate db directory  plugin path: /home/florian/.nrfutil/lib/nrfutil-trace/plugins/nrfml-insight-source.nrfml (error code 100)

    The file exists at the location where nRF Util trace expects it to be:

    florian@ubuntu:~$ ls -la /home/florian/.nrfutil/lib/nrfutil-trace/plugins/
    total 20760
    drwxrwxr-x 2 florian florian    4096 Aug 12 18:20 .
    drwxrwxr-x 3 florian florian    4096 Aug 10 14:51 ..
    -rw-r--r-- 1 florian florian 1677000 Aug 10 14:51 nrfml-ascii-file-sink.nrfml
    -rw-r--r-- 1 florian florian 8259488 Aug 10 14:51 nrfml-insight-source.nrfml
    -rw-r--r-- 1 florian florian 1641960 Aug 10 14:51 nrfml-pcap-sink.nrfml
    -rw-r--r-- 1 florian florian 1540032 Aug 10 14:51 nrfml-raw-file-sink.nrfml
    -rw-r--r-- 1 florian florian   16160 Aug 10 14:51 nrfml-test-broken-sink.nrfml
    -rw-r--r-- 1 florian florian   16128 Aug 10 14:51 nrfml-test-broken-source.nrfml
    -rw-r--r-- 1 florian florian 1375376 Aug 10 14:51 nrfml-test-sink.nrfml
    -rw-r--r-- 1 florian florian 1375864 Aug 10 14:51 nrfml-test-source.nrfml
    -rw-r--r-- 1 florian florian 3695888 Aug 10 14:51 nrfml-tshark-sink.nrfml
    -rw-r--r-- 1 florian florian 1641992 Aug 10 14:51 nrfml-wireshark-named-pipe-sink.nrfml
    florian@ubuntu:~$

    I'm sorry for the confusion I've cause.

    I hope that with this out of the way that a solution can be found.

    Thanks in advance!

    regards,

    Florian

Children
No Data
Related