<?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>Central and Peripheral disconnect error!</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67839/central-and-peripheral-disconnect-error</link><description>Hello, 
 I have a central and Peripheral beacon on nrf52832. I am usıng nus services on both devices. After the data transfer I call the 
 ıt works fluently on the central side. But at the Peripheral side disconnection reason become 
 
 BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Nov 2020 14:18:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67839/central-and-peripheral-disconnect-error" /><item><title>RE: Central and Peripheral disconnect error!</title><link>https://devzone.nordicsemi.com/thread/278107?ContentTypeID=1</link><pubDate>Mon, 02 Nov 2020 14:18:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:643c698e-8673-4aee-b7d2-6ce09185aa0d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You will get BLE_HCI_CONNECTION_TIMEOUT if there is a supervision timeout. However, if there was never any packets successfully transferred after the connection request, the timeout is shorter, and the reason will be&amp;nbsp;BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED. &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/34200/nrf52832-sdk-15-custom-board-s132-ble_hci_conn_failed_to_be_established/131650#131650"&gt;This post&lt;/a&gt; describes it well. More details form the BT spec (4.2):&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;The Connection Failed to be Established error code indicates that the LL&lt;/em&gt;&lt;br /&gt;&lt;em&gt;initiated a connection but the connection has failed to be established.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If you only see this when doing a lot of(?) flash operations, it could be that the SoftDevices schedules flash writes so that ble events are missed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central and Peripheral disconnect error!</title><link>https://devzone.nordicsemi.com/thread/277967?ContentTypeID=1</link><pubDate>Mon, 02 Nov 2020 08:28:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc62e43d-9100-44b7-82f5-e930c6fd0bb0</guid><dc:creator>srac</dc:creator><description>&lt;p&gt;Thank you &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central and Peripheral disconnect error!</title><link>https://devzone.nordicsemi.com/thread/277965?ContentTypeID=1</link><pubDate>Mon, 02 Nov 2020 08:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e059d15f-ef00-4992-8801-84266684e06b</guid><dc:creator>srac</dc:creator><description>[quote userid="7377" url="~/f/nordic-q-a/67839/central-and-peripheral-disconnect-error/277873#277873"]This is not clear to me. Can you clarify if the nRF acts as a central or peripheral when this error occurs?[/quote]
&lt;p&gt;Both devices are nrf52832. I am doing some flash operations and changing advertising data after the connection after the disconnection. When i am doing with nrf uart app Peripheral is making all flash operations and other processes but if i use the central nrf52832 i am transfering data perfectly after i call &lt;pre class="ui-code" data-mode="c_cpp"&gt; uint8_t err_code = sd_ble_gap_disconnect(m_ble_nus_c.conn_handle,
                        BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then Peripheral does not changing the advertising data and pheripheral&amp;#39;s disconnection reason is 0x3E&amp;nbsp;&lt;strong&gt;BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED&lt;/strong&gt; (in uart app disconnection reason is 0x13 which is &lt;strong&gt;BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On the otherhand if I dont use &lt;strong&gt;sd_ble_gap_disconnect&lt;/strong&gt; and somehow manage to timeout the connection, then pheripheral gets 0x08 &lt;strong&gt;BLE_HCI_CONNECTION_TIMEOUT&amp;nbsp;&lt;/strong&gt;as a disconnect reason and pheripheral doing all flash operations and changing advertising data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central and Peripheral disconnect error!</title><link>https://devzone.nordicsemi.com/thread/277873?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 15:42:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc9cfb06-ce78-41bf-b0af-d7bde073f4b7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]ıt works fluently on the central side. But at the Peripheral side disconnection reason become[/quote]
&lt;p&gt;This is not clear to me. Can you clarify if the nRF acts as a central or peripheral when this error occurs?&lt;/p&gt;
&lt;p&gt;If the nRF acts as a central that connects to a peripheral, then you would typically get this reason if the peripheral ignores the connection request, for instance if it uses a whitelist and the initiator is not in the whitelist.&lt;/p&gt;
&lt;p&gt;There could also be other problems you could see in either role, where no packets are exchanged after the connection request due to some other error (clock drift, interference, etc.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central and Peripheral disconnect error!</title><link>https://devzone.nordicsemi.com/thread/277853?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 14:44:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e652e42-2561-4bf5-9e7d-b8fadc2cbece</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Usually a &amp;quot;beacon&amp;quot; is taken to mean something that just advertises - it does not connect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>