<?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 peripheral disconnects after a while.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37449/ble-peripheral-disconnects-after-a-while</link><description>Hi, 
 I am connecting nrf52832 to a windows computer, and it connects to it, but after a while (30 seconds), it disconnects automatically. When i try to debug it, i see a message on serial monitor (arduino), the message says 22, which corresponds to 0x16</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Aug 2018 19:03:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37449/ble-peripheral-disconnects-after-a-while" /><item><title>RE: Ble peripheral disconnects after a while.</title><link>https://devzone.nordicsemi.com/thread/144235?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 19:03:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5190c36d-5af8-41cb-896d-b86c26264568</guid><dc:creator>howard n2wx</dc:creator><description>&lt;p&gt;If you put breakpoints at both places where sd_ble_gap_disconnect() is called as well as sleep_mode_enter() do they fire at the 30 second mark?&amp;nbsp; From this ancient thread+the two older posts linked in it maybe it&amp;#39;s timed out because the peripheral didn&amp;#39;t like the connection parameters. &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/4146/ble_hci_local_host_terminated_connection"&gt;devzone.nordicsemi.com/.../ble_hci_local_host_terminated_connection&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;gt; Why is it not connecting to this one computer and all of our other computers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is nRF connect running on all of them?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble peripheral disconnects after a while.</title><link>https://devzone.nordicsemi.com/thread/144227?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 16:29:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4dfaecc-40c4-43b6-8244-ca524cf891a6</guid><dc:creator>Shri1395</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a ble_event_handler() function which has different cases, and two of them correspond to the GATTC_TIMEOUT and a GATTS_TIMEOUT. Both of them have this line inside the case:&lt;/p&gt;
&lt;pre&gt;err_code = sd_ble_gap_disconnect(p_ble_evt-&amp;gt;evt.gattc_evt.conn_handle&lt;span&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span&gt;                                 &lt;/span&gt;BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION)&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;APP_ERROR_CHECK(err_code)&lt;span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble peripheral disconnects after a while.</title><link>https://devzone.nordicsemi.com/thread/144226?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 16:19:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3ca9b58-6337-4e47-a7e4-857e55171a78</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Have you double checked that you are not calling&amp;nbsp;sd_ble_gap_disconnect() somewhere in your application code?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble peripheral disconnects after a while.</title><link>https://devzone.nordicsemi.com/thread/144222?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 15:13:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ba6abad-b622-4e6d-9a4a-63425b9207b9</guid><dc:creator>Shri1395</dc:creator><description>&lt;p&gt;We made a program based on the ble_app_uart example. We are streaming data from our device and it does not connect to one of our laptops for some reason. We are printing the disconnect reason on Serial and it says 0x16, which is BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION. Why is it not connecting to this one computer and all of our other computers. When we connect a device with the Arduino ble uart code it connects fine, but the nordic one does not connect. Both are the same hardware, just running Arduino firmware or Nordic firmware.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble peripheral disconnects after a while.</title><link>https://devzone.nordicsemi.com/thread/144221?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 15:09:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc3eafc2-bf85-4386-94fb-ce080c20c4d1</guid><dc:creator>howard n2wx</dc:creator><description>&lt;p&gt;What are you running on your &amp;#39;832, one of the examples?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble peripheral disconnects after a while.</title><link>https://devzone.nordicsemi.com/thread/144218?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 14:52:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd9155b8-3199-43bf-a4a9-54ec6a5a2656</guid><dc:creator>Shri1395</dc:creator><description>&lt;p&gt;Hi Howard,&lt;/p&gt;
&lt;p&gt;It does have a sleep_mode_enter() function, but this isn&amp;#39;t supposed to be for the advertising problem i feel.&lt;/p&gt;
&lt;p&gt;My advertising works fine. It also gets connected, the problem is, it gets disconnected after 30 seconds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble peripheral disconnects after a while.</title><link>https://devzone.nordicsemi.com/thread/144026?ContentTypeID=1</link><pubDate>Mon, 13 Aug 2018 21:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09dea594-55f3-4442-a624-33dc704d6363</guid><dc:creator>howard n2wx</dc:creator><description>&lt;p&gt;Hi Shril, does your project have a sleep_mode_enter() function?&amp;nbsp; If it does you should be able to find the offending source by putting a breakpoint at the function entry and inspecting the call stack.&lt;/p&gt;
&lt;p&gt;In my GAP peripheral project I found it was called from an on_adv_evt() event handler in main that was firing on the BLE_ADV_EVT_IDLE event and putting the board to sleep. I replaced the sleep mode entry call with a call to restart advertising (ble_advertising_start()).&lt;/p&gt;
&lt;p&gt;You may be able to find out more info at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/11996/how-to-let-nrf51822-ble_app_uart-never-sleep/45403#45403"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/11996/how-to-let-nrf51822-ble_app_uart-never-sleep/45403#45403&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best Regards, Howard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>