<?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 can I implement logging in mesh light switch example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33183/how-can-i-implement-logging-in-mesh-light-switch-example</link><description>Hi, 
 
 I am using 2 nRF52840 DK to build a network, One is the client and the other one is the server. Both of them are connected to computer with USB cable. 
 I would like to print to terminal (putty, tera term, termite) the messages what the boards</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 08 Apr 2018 13:16:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33183/how-can-i-implement-logging-in-mesh-light-switch-example" /><item><title>RE: How can I implement logging in mesh light switch example</title><link>https://devzone.nordicsemi.com/thread/127319?ContentTypeID=1</link><pubDate>Sun, 08 Apr 2018 13:16:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a9f66c0-700b-4120-9531-ecb54634e59c</guid><dc:creator>Hadi Deknache1</dc:creator><description>&lt;p&gt;Hi Jonathan,&lt;/p&gt;
&lt;p&gt;When I was running the mesh example some week ago, I managed to print out information, by using printf, to&amp;nbsp;the terminal. In order to get the prints in the terminal it was only required to add some printfs in the code and then run JlinkExe;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install&amp;nbsp;&lt;a title="jlinkexe" href="https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack"&gt; J-Link Software and Documentation Pack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Open up a terminal&lt;/li&gt;
&lt;li&gt;The first board run in terminal
&lt;p&gt;&lt;em&gt;&lt;strong&gt;JLinkExe -device NRF52 -speed 4000 -if SWD&lt;/strong&gt;&amp;nbsp;&lt;/em&gt;and after&amp;nbsp;&lt;strong&gt;&lt;em&gt;Connect&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Open a second terminal and write&amp;nbsp;&lt;strong&gt;&lt;em&gt;JLinkRTTClient&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;As for the second board open up another terminal and write now
&lt;p&gt;&lt;strong&gt;&lt;em&gt;JLinkExe -device NRF52 -speed 4000 -if SWD -SelectEmuBySN &lt;span style="text-decoration:underline;"&gt;WRITE-SN-HERE(Can be found on the dev kit)&lt;/span&gt;&amp;nbsp;-rtttelnetport 9999 &lt;/em&gt;&lt;/strong&gt;and after &lt;strong&gt;&lt;em&gt;Connect&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;Now open up another terminal and write&amp;nbsp;&lt;strong&gt;&lt;strong&gt;&lt;em&gt;JLinkRTTClient&amp;nbsp;-rtttelnetport 9999&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;The explanation to first command is to set up a server where the terminal will listen to and the other one is the client where the prints will appear, so you should get the prints in the JLinkRTTClient if everything works correctly.&lt;/p&gt;
&lt;p&gt;Hope it helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>