<?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>S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2215/s120-multilink-central-app-connects-then-very-quickly-disconnects-reason-ble_hci_conn_failed_to_be_established</link><description>I have taken the S120 app, and am trying to have it connect to an external peripheral (not the provided S120 Multilink Peripheral app) 
 The S120 app successfully discovers the peripheral&amp;#39;s advertising, and proceeds to establish a connection, and perform</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Apr 2014 19:19:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2215/s120-multilink-central-app-connects-then-very-quickly-disconnects-reason-ble_hci_conn_failed_to_be_established" /><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9355?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2014 19:19:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e75fe54f-56cb-4264-b8eb-6e7642d62ea1</guid><dc:creator>mtsunstrum</dc:creator><description>&lt;p&gt;Thanks Carles,&lt;/p&gt;
&lt;p&gt;That worked find, and now my TX address is public, and the Central/Peripheral connect reliably now.&lt;/p&gt;
&lt;p&gt;Thx&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9354?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2014 18:08:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b323c0c-bf78-468c-94ad-3f0dd9bc9779</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;Thanks for posting on your progress.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;After some searching thru the source code, I don&amp;#39;t appear to see a way for the S120 CONNECT_REQ to use a &amp;quot;public&amp;quot; TX address. Is there a way to do that ?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, simply use sd_ble_gap_address_set() with a public address before you call sd_ble_gap_connect().&lt;/p&gt;
&lt;p&gt;The last address set will be the one used for future operations.&lt;/p&gt;
&lt;p&gt;Carles&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9353?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2014 16:22:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd8a3fb2-9b82-459b-8413-af98c4ab8f3f</guid><dc:creator>mtsunstrum</dc:creator><description>&lt;p&gt;After some searching thru the source code, I don&amp;#39;t appear to see a way for the S120 CONNECT_REQ to use a &amp;quot;public&amp;quot; TX address. Is there a way to do that ?&lt;/p&gt;
&lt;p&gt;Thx&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9352?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2014 16:01:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1797a4f-ae1b-4f9c-9663-50eb26d4bf56</guid><dc:creator>mtsunstrum</dc:creator><description>&lt;p&gt;OK, I see what is happening.&lt;/p&gt;
&lt;p&gt;My Peripheral device is &amp;quot;bonding&amp;quot; with only one device. I have to go thru a reset sequence on it to allow it to bond to a different Central.&lt;/p&gt;
&lt;p&gt;So I have done that, and now I can CONNECT to my S120 Central.&lt;/p&gt;
&lt;p&gt;Only remaining issue appears to be the S120 random TX address. Since the Peripheral I am using appears to store the Central&amp;#39;s TX address, I can only connect to it once, because the S120 Central keeps changing its TX address.&lt;/p&gt;
&lt;p&gt;I presume there is something in the API that allows me to have the S120 use non-random TX addresses ?&lt;/p&gt;
&lt;p&gt;Thx&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9351?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2014 06:49:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc613cd6-ca73-4654-8501-67112d0994c5</guid><dc:creator>vich</dc:creator><description>&lt;p&gt;This is not a problem, S120 Central uses a random static address whereas the peripheral is using public address. Hence, the connect_req contains the tx address type as random for the Init Address.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9350?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2014 22:01:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:859cd3e8-fcea-422b-b021-085250216cea</guid><dc:creator>mtsunstrum</dc:creator><description>&lt;p&gt;One think I noticed different in the CONNECT_REQ packets ... See packet header field in Wireshark trace&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;S120 Central:     
    TX address flag = random, RX address flag = public
BLEGUI Central: 
    TX address flag = public, RX address flag = public
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I am not immediately familiar with what difference this may cause. Any thoughts on this being a reason for the Peripheral to not respond ?&lt;/p&gt;
&lt;p&gt;Thx&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9349?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2014 16:17:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b77934e9-797c-4950-af4f-93298e00714a</guid><dc:creator>mtsunstrum</dc:creator><description>&lt;p&gt;Commenting on&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I have taken a look at your trace. On first glance, it appears that the peer did not receive/listen to the CONNECT_REQ (evident from your application log, as the application found the peer second time before disconnection from the first attempt).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On the second time, it found the peer (peripheral) advertising packet, but also, this second attempt failed to establish a connection with same reason code BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9348?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2014 16:15:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb802b8a-a108-4858-b74b-db3f4f3407c1</guid><dc:creator>mtsunstrum</dc:creator><description>&lt;p&gt;Answer to a couple of questions:&lt;/p&gt;
&lt;p&gt;Can you reproduce the issue consistently ? Yes, I can. In 95% of the times, I will receive the BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED termination. There have been two times I have seen in the logs where the connection actually did get established.&lt;/p&gt;
&lt;p&gt;S120 Softdevice Version: 1.0.0-1.alpha&lt;/p&gt;
&lt;p&gt;I am using BLE Sniffer 0.9.6_BETA_812. I ran with -s option, but I do not see any &amp;quot;logs&amp;quot; folder in my Sniffer directory. But the Wireshark capture is the same as the previous capture.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9347?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2014 12:20:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02af89ab-93c2-4be9-8b42-c6dee6cc5b46</guid><dc:creator>vich</dc:creator><description>&lt;p&gt;Hi mtsunstrum,&lt;/p&gt;
&lt;p&gt;I have taken a look at your trace. On first glance, it appears that the peer did not receive/listen to the CONNECT_REQ (evident from your application log, as the application found the peer second time before disconnection from the first attempt).&lt;/p&gt;
&lt;p&gt;In addition to version information of SD, could you please reproduce the issue while capturing a trace with BLE Sniffer release 0.9.6. Use the &amp;#39;s&amp;#39; option and upload all files from the sniffer&amp;#39;s logs folder(capture.pcap, log.txt etc..)&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9346?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2014 10:53:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3869e7fc-ef9a-47a9-8e05-336b8a395923</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;Unfortunately you cannot control the window size or offset at this time.
Regarding the 0x3E failure to connect, I will escalate this internally and see where the issue lies. Thanks for the Wireshark captures, those should be helpful.&lt;/p&gt;
&lt;p&gt;EDIT: A couple of questions:&lt;/p&gt;
&lt;p&gt;What version of the 1.0.0 SD are you using? 1.0.0-1.alpha or 1.0.0-2.alpha?
Can you reproduce the issue consistently, or does it happen randomly?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Carles&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9345?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2014 02:53:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a65d8280-b051-422e-8fed-d4f4148aeecf</guid><dc:creator>mtsunstrum</dc:creator><description>&lt;p&gt;Clarification. My original &lt;strong&gt;Application Log&lt;/strong&gt; was when the Interval had been set to 60ms (S120 demo app default). I had changed it to 75ms to match what the BLEGUI Central was  using.&lt;/p&gt;
&lt;p&gt;But notice that the &lt;strong&gt;Application Log now&lt;/strong&gt; shows the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[APPL]:[0x00] &amp;gt;&amp;gt; DM_EVT_CONNECTION
[APPL]:[BA 49 B1 EB D7 90]: Connection Established
[APPL]:[0x00] &amp;lt;&amp;lt; DM_EVT_CONNECTION

[APPL]:[0x01] &amp;gt;&amp;gt; DM_EVT_CONNECTION
[APPL]:[BA 49 B1 EB D7 90]: Connection Established
[APPL]:[0x01] &amp;lt;&amp;lt; DM_EVT_CONNECTION

[APPL]:[0x00] &amp;gt;&amp;gt; DM_EVT_DISCONNECTION Reason:[0x3E]
[APPL]:[0x00] &amp;lt;&amp;lt; DM_EVT_DISCONNECTION (Peers connected: 1)

[APPL]:[0x01] &amp;gt;&amp;gt; DM_EVT_DISCONNECTION Reason:[0x3E]
[APPL]:[0x01] &amp;lt;&amp;lt; DM_EVT_DISCONNECTION (Peers connected: 0)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This points to some sort of timing issue between Central Peripheral.&lt;/p&gt;
&lt;p&gt;The S120 Central picks up on another Peripheral advertisement, and tries to negotiate a 2nd connection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9344?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2014 02:38:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64598d4d-a807-4322-80f7-6b4f5fb8338d</guid><dc:creator>mtsunstrum</dc:creator><description>&lt;p&gt;I am using the S120 Softdevice 1.0 and SDK 5.2 on PCA10001 hardware.&lt;/p&gt;
&lt;p&gt;My observations on the attached Wireshark files:&lt;/p&gt;
&lt;p&gt;See CONNECT_REQ message from Central device
S120 Central     (  Interval = 75ms Window Size = 6.25 ms, Window Offset = 0 ms )
BLEGUI Central (  Interval = 75ms Window Size = 2.5 ms,  Window Offset = 2.5 ms )&lt;/p&gt;
&lt;p&gt;Where the connection fails follows the CONNECT_REQ message from Central device.
The &amp;quot;master&amp;quot; (Central device) sends an &amp;quot;Empty Data PDU&amp;quot; link establishment packet to the peripheral.&lt;/p&gt;
&lt;p&gt;With the BLEGUI Central, the &amp;quot;slave&amp;quot; (Peripheral device) proceeds to successfully establish a connection.&lt;/p&gt;
&lt;p&gt;But with the S120 Central, the &amp;quot;slave&amp;quot; (Peripheral device) decides to not respond at all. That is the core reason for the BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED reason code.&lt;/p&gt;
&lt;p&gt;But I don&amp;#39;t understand what the peripheral doesn&amp;#39;t like in the S120&amp;#39;s Central CONNECT_REQ message ... such that the peripheral does not respond.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see anywhere in the S120 code where we can control the value of Window Size/Offset ... to see if that may be a reason for the unsuccessful connect negotiation.&lt;/p&gt;
&lt;p&gt;But from what I understand, and in looking at the Wireshark traces, I don&amp;#39;t believe Window Size/Offset is the cause of the issue. Likely under control of the SoftDevice. I noticed on packet 13 that the S120 changed the Window Offset to 17.5ms.&lt;/p&gt;
&lt;p&gt;Any experts on low level BLE CONNECT_REQ and link level negotiations ? :)&lt;/p&gt;
&lt;p&gt;Thx&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9343?ContentTypeID=1</link><pubDate>Sun, 13 Apr 2014 06:10:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77e60f51-e5b1-4a24-8d7c-07b6452b790f</guid><dc:creator>mtsunstrum</dc:creator><description>&lt;p&gt;Trying to add attachments again ... looks like files have to be either .txt files or .zip files.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S120 Multilink Central app connects, then very quickly disconnects (Reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED)</title><link>https://devzone.nordicsemi.com/thread/9342?ContentTypeID=1</link><pubDate>Sun, 13 Apr 2014 06:06:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11504013-52b7-4383-afa1-f3b5468bf78a</guid><dc:creator>mtsunstrum</dc:creator><description>&lt;p&gt;I used the nRF51 packet sniffer to capture the CONNECT_REQ differences between using the MultiLink Central, and the BlueGiga Central.&lt;/p&gt;
&lt;p&gt;Please see attached Wireshark files.&lt;/p&gt;
&lt;p&gt;Any thoughts would be appreciated.&lt;/p&gt;
&lt;p&gt;Thx&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Wireshark-captures.zip"&gt;Wireshark captures.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>