<?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 Central: disconnect event received immediately after connection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97637/ble-central-disconnect-event-received-immediately-after-connection</link><description>I have BLE central device, written using legacy SDK. I also have some sensors, also written using the same SDK. 
 Quite often, there&amp;#39;s a connection problem: 
 
 &amp;lt;debug&amp;gt; ble_scan: Scanning parameters have been changed successfully &amp;lt;debug&amp;gt; ble_scan: Filter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Mar 2023 13:08:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97637/ble-central-disconnect-event-received-immediately-after-connection" /><item><title>RE: BLE Central: disconnect event received immediately after connection</title><link>https://devzone.nordicsemi.com/thread/416274?ContentTypeID=1</link><pubDate>Mon, 20 Mar 2023 13:08:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8db18a4-5af4-47fa-91bd-ed737be176a7</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Sorry for late reply.&lt;/p&gt;
[quote user="m5k8"]OK, interesting :) Any hints what can I check?[/quote]
&lt;p&gt;The service discovery seems to be taking too long. Can you use a faster connection interval while you are using a service discovery so that this is done faster.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central: disconnect event received immediately after connection</title><link>https://devzone.nordicsemi.com/thread/415132?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 10:58:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e557f719-ce54-429c-b626-9a5e5d1bace0</guid><dc:creator>m5k8</dc:creator><description>&lt;p&gt;OK, I&amp;#39;ll be back with sniffer output.&lt;/p&gt;
&lt;p&gt;But this:&lt;/p&gt;
[quote userid="114275" url="~/f/nordic-q-a/97637/ble-central-disconnect-event-received-immediately-after-connection"]&amp;lt;debug&amp;gt; nrf_ble_gq: SD is currently busy. The GATT request procedure will be attempted &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;again later. [/quote]
&lt;p&gt;happens also when connection proceeds correctly:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;&amp;lt;info&amp;gt; app: NRF_BLE_SCAN_EVT_CONNECTED CE:EF:AC:E9:70:D2 &lt;/span&gt;&lt;br /&gt;&amp;lt;info&amp;gt; app: BLE_GAP_EVT_CONNECTED &lt;br /&gt;&amp;lt;info&amp;gt; app: Connected as a central. &lt;br /&gt;&amp;lt;info&amp;gt; app: Discovering GATT database... &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Purging request queue with id: 0 &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Registering connection handle: 0x0000 &lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Starting discovery of service with UUID 0x3EC0 on connection handle 0x0. &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Adding item to the request queue &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Primary Services Discovery Request &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD is currently busy. The GATT request procedure will be attempted &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;again later. &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue... &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Primary Service Discovery Request &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD is currently busy. The GATT request procedure will be attempted &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;again la&lt;br /&gt;ter. &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue... &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Primary Service Discovery Request &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD GATT procedure (2) succeeded on connection handle: 0. &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: ATT MTU updated to 247 bytes on connection 0x0 (response). &lt;br /&gt;&amp;lt;debug&amp;gt; app: BLE_GATTC_EVT_EXCHANGE_MTU_RSP &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Data length updated to 251 on connection 0x0. &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_octets: 251 &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_octets: 251 &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_time: 2120 &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_time: 2120 &lt;br /&gt;&amp;lt;debug&amp;gt; app: BLE_GAP_EVT_DATA_LENGTH_UPDATE &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue... &lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Found service UUID 0x3EC0. &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Adding item to the request queue &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Characteristic Discovery Request &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD GATT procedure (3) succeeded on connection handle: 0. &lt;br /&gt;&amp;lt;debug&amp;gt; app: BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue... &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Adding item to the request queue &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Characteristic Discovery Request &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD GATT procedure (3) succeeded on connection handle: 0. &lt;br /&gt;&amp;lt;debug&amp;gt; app: BLE_GATTC_EVT_CHAR_DISC_RSP &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue... &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Adding item to the request queue &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Characteristic Discovery Request &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD GATT procedure (3) succeeded on connection handle: 0. &lt;br /&gt;&amp;lt;debug&amp;gt; app: BLE_GATTC_EVT_CHAR_DISC_RSP &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue... &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Adding item to the request queue &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Characteristic Descriptor Request &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD GATT procedure (4) succeeded on connection handle: 0. &lt;br /&gt;&amp;lt;debug&amp;gt; app: BLE_GATTC_EVT_CHAR_DISC_RSP &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue... &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Adding item to the request queue &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Characteristic Descriptor Request &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD GATT procedure (4) succeeded on connection handle: 0. &lt;br /&gt;&amp;lt;debug&amp;gt; app: BLE_GATTC_EVT_DESC_DISC_RSP &lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue... &lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Discovery of service with UUID 0x3EC0 completed with success on connection handle 0x0. &lt;br /&gt;&amp;lt;info&amp;gt; app: BLE_DB_DISCOVERY_COMPLETE &lt;br /&gt;&amp;lt;info&amp;gt; app: BLE_DB_DISCOVERY_AVAILABLE&lt;br /&gt; &lt;br /&gt;&lt;/span&gt;so I assumed it&amp;#39;s just normal. Is it, or not?&lt;/p&gt;
[quote userid="6207" url="~/f/nordic-q-a/97637/ble-central-disconnect-event-received-immediately-after-connection/415106"]seems interesting on what is keeping SD busy[/quote]
&lt;p&gt;OK, interesting :) Any hints what can I check?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Central: disconnect event received immediately after connection</title><link>https://devzone.nordicsemi.com/thread/415106?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 10:01:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5139d7ae-cc2a-4d77-a621-208f18db5fe8</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;It would really help in this case if you could attach the sniffer log from the connection to the disconnection.&lt;/p&gt;
&lt;p&gt;This below part seems interesting on what is keeping SD busy and also to see the source of disconnection.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD is currently busy. The GATT request procedure will be attempted                           again&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>