<?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>DEBUG in preprocessor definition cause issue in bluetooth connection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52480/debug-in-preprocessor-definition-cause-issue-in-bluetooth-connection</link><description>hello, 
 I am using SDK v15.2.0,s140,pca100056. In my custom application I am using 3 SPI, RTC, timers, USBD, etc. 
 Actually during the development stage I have used DEBUG in preprocessor definition to see logs . All works fine according to the flow</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Oct 2019 10:36:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52480/debug-in-preprocessor-definition-cause-issue-in-bluetooth-connection" /><item><title>RE: DEBUG in preprocessor definition cause issue in bluetooth connection</title><link>https://devzone.nordicsemi.com/thread/212779?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2019 10:36:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfff6177-ea70-48fe-8b14-f05ae250bbb3</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Shilpa,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is hard to identify the issue.&amp;nbsp;It might be the device could not handle the data to plot on time or something else.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please have a look at our&amp;nbsp;&lt;/span&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.0.0/ble_sdk_app_att_mtu.html?cp=4_0_0_4_1_1_0"&gt;throughput example&lt;/a&gt;&lt;span&gt;&amp;nbsp;to learn how you can increase the speeds. If you have further questions about throughput I suggest that you open a new thread.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DEBUG in preprocessor definition cause issue in bluetooth connection</title><link>https://devzone.nordicsemi.com/thread/212564?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 11:50:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b99a3f6f-45c5-4bbc-9c70-9df058bb14e5</guid><dc:creator>shilpa</dc:creator><description>&lt;p&gt;hello,&lt;/p&gt;
&lt;p&gt;Thank you for the advice .I could successfully resolve this issue by your guidance.&lt;/p&gt;
&lt;p&gt;I want to know further that is there any parameters in sdk_config which may change the speed of sending data via bluetooth?&lt;/p&gt;
&lt;p&gt;In my application from the custom device we are actually sending some values via bluetooth and plot that values a s a graph. In my case I am able to plot the graph but on plotting for some time the speed at which the graph is plotted get reduced and is almost stuck. Later the graph retains its speed.&lt;/p&gt;
&lt;p&gt;What might be the possibility of this issue? I suspect this might be due to some parameters in sdk_config.h file. If so what could be the reason?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Shilpa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DEBUG in preprocessor definition cause issue in bluetooth connection</title><link>https://devzone.nordicsemi.com/thread/211845?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 13:16:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:053bd613-6e55-42b8-b8f5-fe7ec73b54fe</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="shilpa"]I identify it as sdk_config.h,&amp;nbsp;the value of the NRF_LOG_DEFAULT_LEVEL&amp;nbsp; is set as 4, i.e, in &amp;#39;debug&amp;#39;.&amp;nbsp; when I changed it to 0, this issue was resolved. But the bluetooth connection is getting disconnected soon.[/quote]
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="shilpa"] got disconnected soon.[/quote]
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you print the disconnect reason?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Set NRF_LOG_DEFAULT_LEVEL as 3&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In ble_evt_handler, you could do something like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;case BLE_GAP_EVT_DISCONNECTED:

NRF_LOG_INFO(&amp;quot;Disconnected reason: %d.&amp;quot;,p_ble_evt-&amp;gt;evt.gap_evt.params.disconnected.reason);
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;a href="https://devzone.nordicsemi.com/support-private/support/236321"&gt;&lt;/a&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;-Amanda H.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DEBUG in preprocessor definition cause issue in bluetooth connection</title><link>https://devzone.nordicsemi.com/thread/211815?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 12:32:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f18b98e3-8971-4914-854a-7d1765025359</guid><dc:creator>shilpa</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I identify it as sdk_config.h,&amp;nbsp;the value of the NRF_LOG_DEFAULT_LEVEL&amp;nbsp; is set as 4, i.e, in &amp;#39;debug&amp;#39;.&amp;nbsp; when I changed it to 0, this issue was resolved. But the bluetooth connection is getting disconnected soon.&lt;/p&gt;
&lt;p&gt;If I add 3 as the value DFU update is not working properly&lt;/p&gt;
&lt;p&gt;Actually in my application I am plotting a graph in our phone app by sending data from device via bluetooth. The graph becomes slower then and got disconnected soon.&lt;/p&gt;
&lt;p&gt;Why this could be so?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Shilpa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DEBUG in preprocessor definition cause issue in bluetooth connection</title><link>https://devzone.nordicsemi.com/thread/211513?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2019 11:24:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad4f7f54-1478-4727-93cf-52fcec3d50a5</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Shilpa,&lt;/p&gt;
[quote user="shilpa"]But I suspect some changes have occurred there which is the reason for this behavior.[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What are those changes in code or &lt;span&gt;sdk_config.h&lt;/span&gt;?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DEBUG in preprocessor definition cause issue in bluetooth connection</title><link>https://devzone.nordicsemi.com/thread/211405?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2019 04:17:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1afe242b-a7e7-4095-9b26-000bb7529dbb</guid><dc:creator>shilpa</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t remove any line intentionally . But I suspect some changes have occurred there which is the reason for this behavior.&lt;/p&gt;
&lt;p&gt;Is there any other possibilities for this issue&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Shilpa&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DEBUG in preprocessor definition cause issue in bluetooth connection</title><link>https://devzone.nordicsemi.com/thread/211222?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2019 11:51:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e10eb8b2-d7e5-4119-aba8-a9b1ebdd4ff8</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]But when I removed DEBUG from the preprocessor definitions, I am not able to connect my device to the phone via bluetooth.[/quote]
&lt;p&gt;Which line did you remove in the&amp;nbsp;&lt;span&gt;sdk_config.h?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I understand your problem correctly, you can set the log level to other option instead of removing.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;// &amp;lt;0=&amp;gt; Off &lt;br /&gt;// &amp;lt;1=&amp;gt; Error &lt;br /&gt;// &amp;lt;2=&amp;gt; Warning &lt;br /&gt;// &amp;lt;3=&amp;gt; Info &lt;br /&gt;// &amp;lt;4=&amp;gt; Debug&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>