<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF Util on Ubuntu 20: unable to capture modem trace</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102774/nrf-util-on-ubuntu-20-unable-to-capture-modem-trace</link><description>Hello all, 
 I&amp;#39;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&amp;#39;m using Ubuntu Desktop 20.04.6 LTS with all packages up to date as of right now. I&amp;#39;ve installed this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Aug 2023 01:44:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102774/nrf-util-on-ubuntu-20-unable-to-capture-modem-trace" /><item><title>RE: nRF Util on Ubuntu 20: unable to capture modem trace</title><link>https://devzone.nordicsemi.com/thread/441278?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2023 01:44:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4421d7c7-bed1-4130-81b2-6816e2af2bfb</guid><dc:creator>io22m007</dc:creator><description>&lt;p&gt;Update:&lt;/p&gt;
&lt;p&gt;For Modem Firmware 1.3.5 this has been resolved with the update to version 2.1.0 of nRF Util Trace. Thank you to the Nordic team for releasing this update.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If anyone is facing this issue in the future with a newer version of the Modem Firmware, I documented the fix I applied before the update below the horizontal line.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is the long version for context:&lt;/p&gt;
&lt;p&gt;I did some further testing with nRF Util on Ubuntu 20 and Windows 11.&lt;/p&gt;
&lt;p&gt;In essence I get a very similar error on both platforms.&lt;/p&gt;
&lt;p&gt;Here is the error message I get on Windows 11:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Error: Tracing failed

Caused by:
    unable to locate db directory  plugin path: C:\Users\flori\.nrfutil\lib\nrfutil-trace/plugins\nrfml-insight-source.nrfml (error code 100)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But when I copy this path into file explorer, I&amp;#39;m able to open the file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;On both operating systems the error applies to both live capture from the COM Port directly and converting a binary file which was captured with a few lines of python code. I used the same COM Port for direct capture with nRF Util and for capture with the python code&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;These binary files can be read and converted into pcapng files with nRF Connect Cellular Monitor.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Furthermore, I tried to include the AT command&amp;nbsp;AT+CGMR at the start of my routine. My thought behind that was that it might be good to include the modem firmware version in the trace since nRF Connect Cellular Monitor also uses this information. But this didn&amp;#39;t help to resolve the issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I noticed that a new version of nRF Util trace is now available (update from 1.0.1 to 2.0.0).&lt;/p&gt;
&lt;p&gt;But even with this new version I got the same error as before on both platforms.&lt;/p&gt;
&lt;p&gt;Uninstalling and re-installing nRF Util trace didn&amp;#39;t help either&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I then looked into nRF Util trace a bit further and found the&amp;nbsp;--keep-configuration option. I exported a configuration file and found the&amp;nbsp;trace_db_locations entry. I opened the file and found that the trace db for modem firmware 1.3.5 is missing in release 2.0.0 of nRF Util trace (and probably was missing in the last release as well).&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;What is the problem: &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using modem firmware 1.3.5 and the trace db for modem firmware 1.3.5 is missing from the current release of nRF Util trace.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;This was the solution to my problem:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I downloaded the following three files from GitHub:&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/NordicSemiconductor/pc-nrfconnect-cellularmonitor/blob/main/resources/traceDB/config_v2.json"&gt;https://github.com/NordicSemiconductor/pc-nrfconnect-cellularmonitor/blob/main/resources/traceDB/config_v2.json&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/NordicSemiconductor/pc-nrfconnect-cellularmonitor/blob/main/resources/traceDB/mfw_nrf9160_1.3.5-FOTA-TEST_trace-db.json"&gt;https://github.com/NordicSemiconductor/pc-nrfconnect-cellularmonitor/blob/main/resources/traceDB/mfw_nrf9160_1.3.5-FOTA-TEST_trace-db.json&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/NordicSemiconductor/pc-nrfconnect-cellularmonitor/blob/main/resources/traceDB/mfw_nrf9160_1.3.5_trace-db.json"&gt;https://github.com/NordicSemiconductor/pc-nrfconnect-cellularmonitor/blob/main/resources/traceDB/mfw_nrf9160_1.3.5_trace-db.json&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;These should also be present on the system if nRF Connect Cellular Monitor is installed. I got them from GitHub because I&amp;nbsp;looked through this repo before and I knew where to look for these files.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I moved these files into this folder:&lt;/p&gt;
&lt;p&gt;Windows: C:\Users\&amp;lt;your_user&amp;gt;\.nrfutil\share\nrfutil-trace\auto-detect-trace-db-config&lt;/p&gt;
&lt;p&gt;Ubuntu: /home/&amp;lt;your_user&amp;gt;/.nrfutil/share/nrfutil-trace/auto-detect-trace-db-config&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the folder mentioned above the file config.json already exists.&lt;/p&gt;
&lt;p&gt;Because of this I performed the following two actions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I renamed config.json to config_old.json.&lt;/li&gt;
&lt;li&gt;I renamed config_v2.json to config.json.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now nRF Util trace works as intended with modem firmware 1.3.5.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope that this solution can help someone who is in a similar situation and that the trace db for modem firmware 1.3.5 can be included in a future release of nRF Util trace.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Util on Ubuntu 20: unable to capture modem trace</title><link>https://devzone.nordicsemi.com/thread/441048?ContentTypeID=1</link><pubDate>Sun, 13 Aug 2023 01:46:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e869d86-c490-4afa-b521-a565883f8ce5</guid><dc:creator>io22m007</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;sorry for the late reply!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I noticed that I added the wrong error message to my original post.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I meant to add the following message:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;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)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But instead, I added the following message which was from an attempt where I installed and executed nRF Util trace with sudo:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;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)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have updated the original post in order to reflect the correct error message. Apologies for the confusion.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve implemented your suggestion with the following command:&lt;br /&gt;&lt;code&gt;export NRFUTIL_HOME=/home/florian/.nrfutil&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But this results in the same error message:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;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)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The file exists at the location where nRF Util trace expects it to be:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;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:~$&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry for the confusion I&amp;#39;ve cause.&lt;/p&gt;
&lt;p&gt;I hope that with this out of the way that a solution can be found.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks in advance!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Florian&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Util on Ubuntu 20: unable to capture modem trace</title><link>https://devzone.nordicsemi.com/thread/440991?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2023 14:33:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1565aeba-4f98-4815-9aec-cbbb777a8a56</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Are you running nrfutil as root? If nrfutil is running as root it is trying to find the plugin in &lt;code&gt;$HOME(root)/.nrfutil/(...)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Could you please specify where nrfutil is installed, with the NRFUTIL_HOME environment variable? If it is home/fabian/.nrfutil, then it would be &lt;code&gt;export NRFUTIL_HOME=/home/fabian/.nrfutil&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Util on Ubuntu 20: unable to capture modem trace</title><link>https://devzone.nordicsemi.com/thread/440977?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2023 13:44:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30d7dd8f-48f6-4490-b4d9-f95b29940417</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Florian,&lt;/p&gt;
&lt;p&gt;Just letting you know we are looking into this.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>