<?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 disconnect every 30sec depending of the PC since Windows update</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59789/ble-disconnect-every-30sec-depending-of-the-pc-since-windows-update</link><description>Our BLE HID mouse devices has work well during several months and since some windows update, on some PC, the BLE is disconencted every 30 sec. 
 We received a BLE_GAP_EVT_DISCONNECTED from the host. 
 Then we re advertize and reconnect in loop. 
 Only</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Apr 2020 12:22:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59789/ble-disconnect-every-30sec-depending-of-the-pc-since-windows-update" /><item><title>RE: BLE disconnect every 30sec depending of the PC since Windows update</title><link>https://devzone.nordicsemi.com/thread/243184?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 12:22:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1314d3a6-dbdf-409f-8b32-a02fa2e84ff2</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Shorter than 100ms can likely be used since it is a mouse, which typically use a connection interval of 7.5ms, you only need to make sure a few connection interval have elapsed. So try with 50ms.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Keneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE disconnect every 30sec depending of the PC since Windows update</title><link>https://devzone.nordicsemi.com/thread/243133?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 09:50:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b11b958-eead-4899-9ca7-dce31e73987e</guid><dc:creator>Sebastien</dc:creator><description>&lt;p&gt;the first 100ms delay seems to fix the issue.&lt;/p&gt;
&lt;p&gt;Thanks a lot.&lt;/p&gt;
&lt;p&gt;100 ms is a lot, do you think this delay could be reduce ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE disconnect every 30sec depending of the PC since Windows update</title><link>https://devzone.nordicsemi.com/thread/243122?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 09:16:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de452b3f-91e2-47ac-8e17-1c5de8ea2d79</guid><dc:creator>Sebastien</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I will try what you proposed.&lt;/p&gt;
&lt;p&gt;We are using&amp;nbsp;s140_nrf52_6.1.0_softdevice.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sebastien&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE disconnect every 30sec depending of the PC since Windows update</title><link>https://devzone.nordicsemi.com/thread/243119?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 09:02:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2761c469-6786-4d3c-a096-11af14a8ca77</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Reason 34 = 0x22 = BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT&lt;/p&gt;
&lt;p&gt;Seems to be related to an&amp;nbsp; procedure has timed-out. I have seen in the past that some peer may not handle the case where MTU exchange/DLE update is initiated on&amp;nbsp;BLE_GAP_EVT_CONNECTED event. Using a delay of for instance 100ms can workaround in such case, e.g. in&amp;nbsp;on_connected_evt() in nrf_ble_gatt.c add a delay like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        nrf_delay_ms(100); // Add a delay
        err_code = sd_ble_gattc_exchange_mtu_request(conn_handle, p_link-&amp;gt;att_mtu_desired);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Though, it can also be something completely different, e.g. that the peer is initiating a BLE procedure that is not handled by the mouse (e.g. an event is not replied to). E.g.&amp;nbsp; case BLE_GAP_EVT_PHY_UPDATE_REQUEST event is not handled, and adding this may help:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        case BLE_GAP_EVT_PHY_UPDATE_REQUEST:
        {
            NRF_LOG_DEBUG(&amp;quot;PHY update request.&amp;quot;);
            ble_gap_phys_t const phys =
            {
                .rx_phys = BLE_GAP_PHY_AUTO,
                .tx_phys = BLE_GAP_PHY_AUTO,
            };
            err_code = sd_ble_gap_phy_update(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle, &amp;amp;phys);
            APP_ERROR_CHECK(err_code);
        } break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But to be 100% sure we need an on-air sniffer log.&lt;/p&gt;
&lt;p&gt;Btw, what softdevice and version are you using here?&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 disconnect every 30sec depending of the PC since Windows update</title><link>https://devzone.nordicsemi.com/thread/243010?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 14:38:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16bdf7e0-120a-4423-91ca-64bf594d9e52</guid><dc:creator>Sebastien</dc:creator><description>&lt;p&gt;&lt;span&gt;0&amp;gt; &amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption&lt;br /&gt;0&amp;gt; &amp;lt;info&amp;gt; app: PM_EVT_PEER_DATA_UPDATE_SUCCEEDED&lt;br /&gt;0&amp;gt; &amp;lt;info&amp;gt; app: BLE_GATTS_EVT Not Implemented ID: 26&lt;br /&gt;0&amp;gt; &amp;lt;info&amp;gt; nrf_ble_gatt: BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST&lt;br /&gt;0&amp;gt; &amp;lt;debug&amp;gt; nrf_ble_gatt: Peer on connection 0x0 requested an ATT MTU of 527 bytes.&lt;br /&gt;0&amp;gt; &amp;lt;debug&amp;gt; nrf_ble_gatt: Updating ATT MTU to 32 bytes (desired: 32) on connection 0x0.&lt;br /&gt;0&amp;gt; &amp;lt;info&amp;gt; app: BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST&lt;br /&gt;0&amp;gt; &amp;lt;info&amp;gt; nrf_ble_gatt: BLE_GATTC_EVT_EXCHANGE_MTU_RSP&lt;br /&gt;0&amp;gt; &amp;lt;info&amp;gt; nrf_ble_gatt: ATT MTU updated to 32 bytes on connection 0x0 (response).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE disconnect every 30sec depending of the PC since Windows update</title><link>https://devzone.nordicsemi.com/thread/243009?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 14:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c19780d3-d157-431a-9f7f-8781aa764aba</guid><dc:creator>Sebastien</dc:creator><description>&lt;p&gt;&lt;span&gt;0&amp;gt; &amp;lt;info&amp;gt; app: BLE_GAP_EVT_DISCONNECTED, Reason 34 (Decimal)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE disconnect every 30sec depending of the PC since Windows update</title><link>https://devzone.nordicsemi.com/thread/242996?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 14:03:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:394b8a00-765c-4791-9c45-57fccbd435a6</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;&lt;span&gt;The BLE_GAP_EVT_DISCONNECTED&lt;/span&gt; event has an additional status code. Which one do you get?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>