<?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>How to get log messages sent through UART, not RTT?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72874/how-to-get-log-messages-sent-through-uart-not-rtt</link><description>Hello everyone, 
 I have a setup with two DK52 (nRF52832) with a mesh level client on one board and a level server on the other. Everything is working fine, no problems there. Properly provisioned with either an app running on a smartphone or using the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Mar 2021 17:33:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72874/how-to-get-log-messages-sent-through-uart-not-rtt" /><item><title>RE: How to get log messages sent through UART, not RTT?</title><link>https://devzone.nordicsemi.com/thread/300512?ContentTypeID=1</link><pubDate>Wed, 17 Mar 2021 17:33:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aa34e3c-1bfe-4391-b0f1-2f3b7b02f909</guid><dc:creator>Julio de Melo</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks to both Awneil and Tesc. I will take a look in the threads and docs mentioned, as well as going through the init code in debug mode.&lt;/p&gt;
&lt;p&gt;I did manage to get the code compiled, after adding a bunch of log-related source files. But still, no talk!&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Julio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get log messages sent through UART, not RTT?</title><link>https://devzone.nordicsemi.com/thread/300440?ContentTypeID=1</link><pubDate>Wed, 17 Mar 2021 13:55:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca325701-8ba8-4105-bd78-e6f902a865d1</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;nRF5 SDK for Mesh uses a &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fgroup__MESH__CONFIG__LOG.html"&gt;different log module&lt;/a&gt; than the one used in nRF5 SDK. While it is possible to get logging over UART, it is a bit more involved, as the Mesh log module supports only RTT out-of-the-box.&lt;/p&gt;
&lt;p&gt;You could have a look at the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fmd_examples_sdk_coexist_ble_app_proximity_coexist_README.html"&gt;SDK Proximity coexistence example&lt;/a&gt; (which combines functionality from nRF5 SDK for Mesh and nRF5 SDK.)&lt;/p&gt;
&lt;p&gt;There is an example of logging to UART provided in the answer to this thread: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/59428/adding-uart-code-to-the-light-switch-server-project"&gt;Adding UART code to the &amp;#39;light switch server&amp;#39; project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get log messages sent through UART, not RTT?</title><link>https://devzone.nordicsemi.com/thread/300435?ContentTypeID=1</link><pubDate>Wed, 17 Mar 2021 13:47:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c42f61b7-6aa4-4676-9f69-937477e5b0b4</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Personally, I&amp;#39;ve never had any trouble with it - it&amp;#39;s just been a matter of making the appropriate RTT or UART setting in the sdk_config.h.&lt;/p&gt;
&lt;p&gt;Did you start from an SDK example?&lt;/p&gt;
&lt;p&gt;I find that stepping through the init code in the debugger is the easiest way to follow the decisions that are made in enabling the logs &amp;amp; choosing the interface ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get log messages sent through UART, not RTT?</title><link>https://devzone.nordicsemi.com/thread/300424?ContentTypeID=1</link><pubDate>Wed, 17 Mar 2021 13:16:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0be8ff66-75a2-4bd0-b910-0f0c2d34bda7</guid><dc:creator>Julio de Melo</dc:creator><description>&lt;p&gt;Hi, Awneil,&lt;/p&gt;
&lt;p&gt;Thanks for the tip. I went ahead and added a whole section regarding both macros. I copied it from another sdk_config.h file.&lt;/p&gt;
&lt;p&gt;That did not solve the problem and looking further, I came across this post&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/21189/how-to-enable-uart-or-rtt-logging-in-examples"&gt;How to enable UART or RTT logging in examples? - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;, which mentions how to enable the UART for backend communication.&lt;/p&gt;
&lt;p&gt;I am still struggling with compilation to make it work as any file that you add carries dependencies on header files, but I hope I will succeed.&lt;/p&gt;
&lt;p&gt;Since this topic is frequent on the DevZone, isn&amp;#39;t it time to write down a comprehensive guide on doing USB/UART on Nordic&amp;#39;s devices?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Julio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get log messages sent through UART, not RTT?</title><link>https://devzone.nordicsemi.com/thread/300194?ContentTypeID=1</link><pubDate>Tue, 16 Mar 2021 15:06:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:491c2c8d-f3cc-41db-b237-5dc9f5e9ae50</guid><dc:creator>awneil</dc:creator><description>[quote userid="26678" url="~/f/nordic-q-a/72874/how-to-get-log-messages-sent-through-uart-not-rtt"]&lt;p&gt;NRF_LOG_BACKEND_RTT_ENABLED and&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED, as being the way to enable either output to the log messages. But none of them are defined in the sdk_config.h file, so no help there. There is also mention to&amp;nbsp;&lt;span&gt;NRF_LOG_USES_RTT, but it also is absent.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;That is a common complaint about the supplied sdk_config.h files:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/45366/missing-defines-in-generic-sdk_config-h"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/45366/missing-defines-in-generic-sdk_config-h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But that is where it should be defined.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>