<?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>Problem in Code porting from nrf51 to nrf52: nrf52 automatically disconnects after few seconds</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18761/problem-in-code-porting-from-nrf51-to-nrf52-nrf52-automatically-disconnects-after-few-seconds</link><description>hello, 
 I had written a custom application based on ble_app_uart for nrf51, which works fine. But now I have to port it for nrf52. So I followed these steps: 
 
 Changed the linker script for nrf52. 
 Changed CFLAGS and ASMFLAGS in makefile for nrf52</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Jan 2017 11:31:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18761/problem-in-code-porting-from-nrf51-to-nrf52-nrf52-automatically-disconnects-after-few-seconds" /><item><title>RE: Problem in Code porting from nrf51 to nrf52: nrf52 automatically disconnects after few seconds</title><link>https://devzone.nordicsemi.com/thread/72459?ContentTypeID=1</link><pubDate>Tue, 10 Jan 2017 11:31:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:986d340a-b048-4c68-8ecc-c97cb062dd99</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please try to catch a sniffer trace. You only need a nRF51 DK or dongle to use as the backend.&lt;/p&gt;
&lt;p&gt;BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION telling it&amp;#39;s disconnected from the other end.&lt;/p&gt;
&lt;p&gt;Have you used NRF_LOG_ERROR in your code ? Have you included all the modules and dependency ? You need to init the logger also. Please get familiar with it first on an example in the SDK v12.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in Code porting from nrf51 to nrf52: nrf52 automatically disconnects after few seconds</title><link>https://devzone.nordicsemi.com/thread/72460?ContentTypeID=1</link><pubDate>Tue, 10 Jan 2017 09:35:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acbe5dab-6ad0-459e-94a8-9b383f02bada</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;I had forgotten to replace the startup files of nrf51, which I have done currently. After these changes, I am observing desired output, but it is not consistent. My device is still getting discoonected a lot of times. As you suggested, if I find out the reason of disconnection, it shows:&lt;/p&gt;
&lt;p&gt;BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION&lt;/p&gt;
&lt;p&gt;And I am not able to see the prints from NRF_LOG_ERROR. I referred the post from:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/107568/nrf_log_debug-doesnt-produce-output/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But I did not see any logs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in Code porting from nrf51 to nrf52: nrf52 automatically disconnects after few seconds</title><link>https://devzone.nordicsemi.com/thread/72457?ContentTypeID=1</link><pubDate>Mon, 09 Jan 2017 13:41:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94e2978d-dabe-4a84-b268-648ed7e9da2c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;About the sniffer, you can have a look &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF-Sniffer/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For debugging, please look for BLE_GAP_EVT_DISCONNECTED event, usually it&amp;#39;s handled in on_ble_evt() in main.c. And you can check the reason in p_ble_evt-&amp;gt;gap_evt.disconnected.reason.&lt;/p&gt;
&lt;p&gt;Please make sure there is no assertion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in Code porting from nrf51 to nrf52: nrf52 automatically disconnects after few seconds</title><link>https://devzone.nordicsemi.com/thread/72458?ContentTypeID=1</link><pubDate>Mon, 09 Jan 2017 03:18:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac49e7ad-aba4-4b68-957f-25844b696d36</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;hello Hung Bui,
I found a link on infocenter which highlights the steps needed:
&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52%2Fdita%2Fnrf52%2Fmigration%2Fpreface.html&amp;amp;cp=2_4"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;
I am currently verifying if all these steps are followed.
Please tell me how to capture sniffer logs? Also I am new to debugging, How should I trace the reason of disconnecting?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in Code porting from nrf51 to nrf52: nrf52 automatically disconnects after few seconds</title><link>https://devzone.nordicsemi.com/thread/72456?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 09:47:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:059b0406-311d-4637-83d8-dc423fe1c19f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Anjali,&lt;/p&gt;
&lt;p&gt;Please check if there is any assertion (check the app error handler ) causing the chip to reset.
If there is no error, please check the disconnect reason when the DISCONNECTED even occurs.&lt;/p&gt;
&lt;p&gt;Also please capture a sniffer trace so we can check which side terminate the connection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in Code porting from nrf51 to nrf52: nrf52 automatically disconnects after few seconds</title><link>https://devzone.nordicsemi.com/thread/72455?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2017 10:34:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee78ecdd-29fe-4512-b841-bf4f5452186e</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;After posting this question, I also found out sdk_config.h was according to the old nrf51 code, which I changed according to nrf52. But I am observing the same behaviour&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>