<?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>Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72080/disconnect-very-quickly-after-connected-reason-0x3e</link><description>Hi Supporter: 
 Hardware:nRF52840 dongle 
 Software: basic example &amp;quot;ble_app_interactive&amp;quot;, s140_nrf52_6.1.1_softdevice 
 There is a strange problem,I connect my machine with iphone nrf connect, connect is ok, discovery all normal, But when i use Dongle</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Mar 2021 08:34:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72080/disconnect-very-quickly-after-connected-reason-0x3e" /><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/298582?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 08:34:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dc8c140-0130-434b-829a-adcd2ededda4</guid><dc:creator>jay wang</dc:creator><description>&lt;p&gt;Hi Hung:&lt;/p&gt;
&lt;p&gt;I modify connect parameter, It&amp;#39;s connect success now.Thank goodness.&lt;/p&gt;
&lt;p&gt;Modification:&lt;/p&gt;
&lt;p&gt;Parameter&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Origin Value&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Modified Value&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL&amp;nbsp; &amp;nbsp; 100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_MAX_CONNECTION_INTERVAL&amp;nbsp; &amp;nbsp;300&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_SLAVE_LATENCY&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;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_SUPERVISION_TIMEOUT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;720&lt;/p&gt;
&lt;p&gt;I enabled compatibility mode.&lt;/p&gt;
&lt;p&gt;Now connect success rate is very high, Fail occasionally.&lt;/p&gt;
&lt;p&gt;Think you for your help.&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/297179?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 12:50:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44e5f185-2a18-453f-ade2-2ec1f2720b88</guid><dc:creator>jay wang</dc:creator><description>&lt;p&gt;OK, Thanks.&lt;/p&gt;
&lt;p&gt;I am agree with you, It&amp;#39;s an incompatibility issue.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try your ideas. I will tell you if any update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/297175?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 12:45:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b434537d-ca73-45f1-88fe-de3ffecb7efb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jay,&amp;nbsp;&lt;br /&gt;&amp;nbsp;It could be an incompatibility issue with the Linux device you have.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not 100% sure why it doesn&amp;#39;t work with our device, but you may want to check the clock source of the Linux device. It seems to me that it has wrong clock configuration (specifically crystal/RC tolerance) that make it missed the window size.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if it helps but you can try to reduce the LFCLK tolerance on the nRF52 , it might help in this case. Other than that I ran out of idea on how to fix this.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/297028?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 01:08:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c233413-e339-4504-a5fd-94bbc29abb0d</guid><dc:creator>jay wang</dc:creator><description>&lt;p&gt;The window offset always equal the connect interval when i enabled compat_1_mode.I add the sniffer trace in attachment:00-enabled-compat.pcapng.Please check it.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1614647255302v1.png" /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/00_2D00_enabled_2D00_compat.pcapng"&gt;devzone.nordicsemi.com/.../00_2D00_enabled_2D00_compat.pcapng&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/296965?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 16:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc50d1d4-9ab9-4442-9eed-c65ed13b58f2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jay,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="jay wang"]The window offset is not 0 when enabled the compat_mode_1.[/quote]
&lt;p&gt;&amp;nbsp;Could you clarify what&amp;#39;s the window offset was ? was it 0 or something else ? Could you provide a sniffer trace ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/296928?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 15:19:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3194c8bc-5686-4d5b-a86a-57fff1e80def</guid><dc:creator>jay wang</dc:creator><description>&lt;p&gt;Thanks for reply.&lt;/p&gt;
&lt;p&gt;I have found the&amp;nbsp;&lt;span&gt;compatibility mode today,But unfortunatly, This phenomenon is still hanppening.I catch the packet with sniffer,The window offset is not 0 when enabled the compat_mode_1.I&amp;#39;m sure that my setting is taken effort.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;I&amp;#39;ve run out of my ideas.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/296800?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 10:32:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aa102a5-2d34-4f62-b255-d0a6ef0ad1a5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jay,&amp;nbsp;&lt;br /&gt;Thanks for the info. There are some devices that don&amp;#39;t support window offset = 0 . We have created a compatibility mode to avoid using window offset = 0.&amp;nbsp;&lt;br /&gt;Please have a look at the ble_gap_opt_compat_mode_1_t struct quoted here:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**@brief Compatibility mode 1 option.
 *
 * @details This can be used with @ref sd_ble_opt_set to enable and disable
 *          compatibility mode 1. Compatibility mode 1 is disabled by default.
 *
 * @note Compatibility mode 1 enables interoperability with devices that do not support a value of
 *       0 for the WinOffset parameter in the Link Layer CONNECT_IND packet. This applies to a
 *       limited set of legacy peripheral devices from another vendor. Enabling this compatibility
 *       mode will only have an effect if the local device will act as a central device and
 *       initiate a connection to a peripheral device. In that case it may lead to the connection
 *       creation taking up to one connection interval longer to complete for all connections.
 *
 *  @retval ::NRF_SUCCESS Set successfully.
 *  @retval ::NRF_ERROR_INVALID_STATE When connection creation is ongoing while mode 1 is set.
 */
typedef struct
{
   uint8_t enable : 1;                           /**&amp;lt; Enable compatibility mode 1.*/
} ble_gap_opt_compat_mode_1_t;&lt;/pre&gt;&lt;br /&gt;This mode can be enabled by calling&amp;nbsp;sd_ble_opt_set().&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think there is an option to&amp;nbsp;do this in the CLI interface, but you can&amp;nbsp;add the call directly in the&amp;nbsp;code of &lt;span&gt;ble_app_interactive.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/296723?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 02:28:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3fa8b79-a0d4-4dc1-9af8-ab9777011739</guid><dc:creator>jay wang</dc:creator><description>&lt;p&gt;Hi Hung:&lt;/p&gt;
&lt;p&gt;My slave details:&lt;/p&gt;
&lt;p&gt;&amp;gt; HCI Event: LE Meta Event (0x3e) plen 19&lt;br /&gt; LE Connection Complete&lt;br /&gt; status 0x00 handle 1025, role slave&lt;br /&gt; bdaddr F5:CC:F0:5F:A0:DE (Random)&lt;br /&gt;&amp;lt; ACL data: handle 1025 flags 0x00 dlen 16&lt;br /&gt; L2CAP(d): cid 0x0005 len 12 [psm 0]&lt;br /&gt;Connect: de:a0:5f:f0:cc:f5&lt;br /&gt;&amp;gt; HCI Event: Number of Completed Packets (0x13) plen 5&lt;br /&gt; handle 1025 packets 1&lt;br /&gt;&amp;gt; HCI Event: Disconn Complete (0x05) plen 4&lt;br /&gt; status 0x00 handle 1025 reason 0x3e&lt;br /&gt; Reason: Connection Failed to be Established&lt;br /&gt;&amp;lt; HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1&lt;br /&gt;2020/10/31 22:48:16 l2conn: 0x0401 already disconnected&lt;br /&gt;Disconnect: de:a0:5f:f0:cc:f5&lt;br /&gt;&amp;gt; HCI Event: Command Complete (0x0e) plen 4&lt;br /&gt; LE Set Advertise Enable (0x08|0x000a) ncmd 1&lt;br /&gt; status 0x00&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/296682?ContentTypeID=1</link><pubDate>Sat, 27 Feb 2021 11:05:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc87b714-ed2e-4f6a-87f4-2bd5e751864c</guid><dc:creator>jay wang</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Good weekend, Thanks for your reply.&lt;/p&gt;
&lt;p&gt;For you question:&lt;/p&gt;
&lt;p&gt;1.&lt;span&gt;How often do you see the issue-&amp;nbsp; every time.when i connect it first.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2.Have you even managed to connect the central to the peripheral&amp;nbsp;- My &amp;quot;nRF52840 dongle&amp;quot; connect to iphone is ok.But it&amp;#39;s cannot connect to my MACHINE(It&amp;#39;s linux host and maybe TI chip,not very sure).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3.Have you tried to connect using a phone to your peripheral- Yes ,My iphone connect to my MACHINE is ok, Not any problem.I use the app NRF CONNECT.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4.Please try to test with a normal BLE application in the SDK-- My&amp;nbsp;application is used the example &amp;quot;ble_app_interactive&amp;quot; which is in the SDK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;5.Could you check the log on the peripheral-- I can see the log in my MACHINE (Use the HCIDUMP tool in linux host).It&amp;#39;s can dicovery my central device, and putout the correct mac address, But it&amp;#39;s display disconnect very soon .I can send the log to you in monday.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And i want to expain the attachment&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/00_2D00_connect_5F00_fail.pcapng"&gt;00-connect_fail.pcapng&lt;/a&gt;&amp;nbsp;: This packet is the process which connected fail.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/00_2D00_connect_5F00_success.pcapng"&gt;00-connect_success.pcapng&lt;/a&gt;&amp;nbsp;: When my nRF52840 Dongle have connected&amp;nbsp; a peripheral before, I can connect my MACHINE as second link success, This packet is the proccess which connect success as second link.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It&amp;#39;s can connect success when it&amp;#39;s as second link, This is why i feel so strange.&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If the slave cannot catch the connect request, why is connect success as sencond link? I compare the &amp;quot;fail &amp;quot;and &amp;quot;success&amp;quot; packet, The connect request content different is &amp;quot;window offset&amp;quot;, I&amp;nbsp; suspect this filed cause this problem,But the window offset and window size cannot set through soft device.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/296597?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 14:48:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc397dd7-3f70-4fc4-a0d9-82b9790b2e57</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jay,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]&amp;lt;info&amp;gt; app: CENTRAL: Disconnected, handle: 0, reason: 0x3E[/quote]
&lt;p&gt;&amp;nbsp;Disconnected reason 0x3E means:&amp;nbsp;BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED.&amp;nbsp;&lt;br /&gt;This matched with what I can observe in the sniffer trace. The central sent the connect request but there was no response from the peripheral.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There could be a few posibilities:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. The slave didn&amp;#39;t catch the connect request from the central. How often do you see the issue ? Have you even managed to connect the central to the peripheral ? Have you tried to connect using a phone to your peripheral ?&amp;nbsp; Please try to test with a normal BLE application in the SDK.&lt;br /&gt;2. The slave caught the connect request but couldn&amp;#39;t send the response packet due to timing issue. Could you check the log on the peripheral ? If it&amp;#39;s the case the log on the peripheral should also show that it&amp;#39;s connected but then quickly disconnected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect very quickly after connected,reason:0x3E</title><link>https://devzone.nordicsemi.com/thread/296402?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 01:43:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82dbf22a-d1cd-46a3-a445-32d429bd0b4f</guid><dc:creator>jay wang</dc:creator><description>&lt;p&gt;Some notice:The connect exchange data is locate the end of captue package.Lot&amp;#39;s of advertisement in the front of package.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>