<?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>BLE connection problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24261/ble-connection-problem</link><description>Hi, 
 I&amp;#39;m using sdk12.3.0 ble_app_uart. 
 My problem is BLE connection. 
 Sometimes(almost 50%)I tried to connect BLE but fail and I have to connect again. 
 I don&amp;#39;t know why. 
 This image is messages that I captured when connection failed. 
 What</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Aug 2017 13:10:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24261/ble-connection-problem" /><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95514?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2017 13:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9de28d2d-856b-40d3-85e6-b09753286371</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi, take a look at &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;this post&lt;/a&gt; for how to debug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95515?ContentTypeID=1</link><pubDate>Sun, 20 Aug 2017 23:56:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:502cde91-1584-49b3-b186-0ccf17728810</guid><dc:creator>DragonAnger</dc:creator><description>&lt;p&gt;I found out that it&amp;#39;s not android side problem.
Error occurs at BLE module. but it&amp;#39;s not the error in nrf_error.h. Something else.
But I don&amp;#39;t know error code because SEGGER_RTT_printf() function is not working.
only SEGGER_RTT_WriteString() works.
So, I checked one by one using SEGGER_RTT_WriteString()
And I think this error can be related with UART.
How can I debug this?
Thanks for reading my question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95506?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 09:19:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebf446c2-7aaa-4f5b-9853-5149b0822c83</guid><dc:creator>DragonAnger</dc:creator><description>&lt;p&gt;Connection is like this,
My custom board-(UART serial)-&amp;gt; &lt;a href="http://www.waveshare.com/product/BLE400.htm"&gt;Motherboard&lt;/a&gt;-(BLE)-&amp;gt;Android
When I tested with PC terminal with default setting, I don&amp;#39;t get the Device is not supported message but cannot 100% sure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95505?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 07:44:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c75457f2-c52a-41af-b314-1e624a74e206</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Is this a custom board or the nRF51-DK ? On the nRF51-DK, the on-board Segger J-link programmer that have the &lt;em&gt;Virtual COM port via UART&lt;/em&gt;, uses pin 9 and 11. So if you are using the DK you won&amp;#39;t be able to send and receive data from the PC terminal if you change the pins to 5 and 6.&lt;/p&gt;
&lt;p&gt;So if you use the default pin numbers(11 and 9), then you don&amp;#39;t get the &lt;em&gt;Device is not supported message&lt;/em&gt; ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95507?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 06:15:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f30eda4f-b378-4084-a253-593e252cbba0</guid><dc:creator>DragonAnger</dc:creator><description>&lt;p&gt;Thanks for your answer!
BLE device is not paired or bonded. And If device is paired or bonded, I need software solution.
Because it didn&amp;#39;t happen always.
And I tried to your code, It didn&amp;#39;t work.
I changed RX_PIN_NUMBER and TX_PIN_NUMBER to 5 and 6 (default number is 11, 9)
to connect UART with my board. Is that something to do with?
Because this problem didn&amp;#39;t happen before that.
Again, Thank you for answering my question!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95508?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2017 09:22:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba45aec1-76b7-48d3-bc52-c0c45bdfd378</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you go into Bluetooth settings on your phone, and removed the device form the list of paired/bonded the devices? Also try to restart the phone.&lt;/p&gt;
&lt;p&gt;On the nRF51, you could try to enable the Service Changed characteristic so that changes in the application are indicated to the phone. Set &lt;code&gt;IS_SRVC_CHANGED_CHARACT_PRESENT&lt;/code&gt; to 1.&lt;/p&gt;
&lt;p&gt;Code snippet(SDK12.3):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Initialize the SoftDevice handler module.
SOFTDEVICE_HANDLER_INIT(&amp;amp;clock_lf_cfg, NULL);

ble_enable_params_t ble_enable_params;
err_code = softdevice_enable_get_default_config(CENTRAL_LINK_COUNT,
                                                PERIPHERAL_LINK_COUNT,
                                                &amp;amp;ble_enable_params);
APP_ERROR_CHECK(err_code);

ble_enable_params.gatts_enable_params.service_changed = IS_SRVC_CHANGED_CHARACT_PRESENT;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95513?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2017 06:42:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9425d586-53a8-496e-87ea-f6d324ea98ad</guid><dc:creator>DragonAnger</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;I checked the thread.&lt;/p&gt;
&lt;p&gt;I suspected that android has cached previous services from the device.&lt;/p&gt;
&lt;p&gt;So, I tried &lt;a href="https://stackoverflow.com/questions/22596951/how-to-programmatically-force-bluetooth-low-energy-service-discovery-on-android"&gt;this&lt;/a&gt; but didn&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;Is there other way to clear service cache or anyone solve this problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95509?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2017 08:36:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4d213c6-135c-4b38-a91d-55c21a828f3b</guid><dc:creator>DragonAnger</dc:creator><description>&lt;p&gt;Thank you for your answer Sigurd! I&amp;#39;ll check it and let you know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95512?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2017 08:34:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a194519-9b86-446f-b17c-692a853327cc</guid><dc:creator>DragonAnger</dc:creator><description>&lt;p&gt;I want to find way without those devices right now. But Thank you for your answer!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95511?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2017 08:34:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8009ce30-a691-474c-8103-8e3f4ecee254</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;A quote from &lt;a href="https://devzone.nordicsemi.com/question/95273/ble_app_uart-device-is-not-supported/"&gt;this thread&lt;/a&gt; on a similar issue (&lt;em&gt;Device is not supported message&lt;/em&gt;).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I suspect the android device is still
not making full device discovery for
the services and still has an old gatt
table with services that you
previously bonded with. Try to go into
Bluetooth settings on your phone,
forget all bluetooth services/devices
that you have listed there and perhaps
disable Bluetooth and enable it again.
Then try to connect with the nRF52
device.&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connection problem</title><link>https://devzone.nordicsemi.com/thread/95510?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2017 08:25:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d67db8ad-484d-43bd-a29b-1fc4021d7006</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Mobile phone is kind of black box when it comes to BLE so all logging and indications you get are indirect. If you really want to know which peer disconnected, when and probably why you need RF trace from BLE sniffer or similar network analyzer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>