<?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>Inconsistent behavior when connecting from Custom BLE device to nrf52dk running different SDKs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38499/inconsistent-behavior-when-connecting-from-custom-ble-device-to-nrf52dk-running-different-sdks</link><description>We have a Сustom BLE device and observe inconsistent behavior when connecting from this device to to nrf52dk running different SDK versions. - Custom Device connects OK with DK running SDK 13.1 / Soft Device ver: s132_nrf52_4.0.2_softdevice.hex - Custom</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Sep 2018 12:40:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38499/inconsistent-behavior-when-connecting-from-custom-ble-device-to-nrf52dk-running-different-sdks" /><item><title>RE: Inconsistent behavior when connecting from Custom BLE device to nrf52dk running different SDKs</title><link>https://devzone.nordicsemi.com/thread/149446?ContentTypeID=1</link><pubDate>Wed, 19 Sep 2018 12:40:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc028694-cfbe-478c-ad7d-6705edd62bd9</guid><dc:creator>Sigurd</dc:creator><description>[quote user="Alexandr Kolodinsky"]Is there a way to explicitly control ChSel #1 / #2 in Nordic SDK? [/quote]
&lt;p&gt;No, that is not possible. The SoftDevice is following the BLE spec, so I would recommend reporting this issue to the Bluez developers. (I see that Bluez version 5.50 is released, so it might be a chance that it’s fixed in that version.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inconsistent behavior when connecting from Custom BLE device to nrf52dk running different SDKs</title><link>https://devzone.nordicsemi.com/thread/149382?ContentTypeID=1</link><pubDate>Wed, 19 Sep 2018 09:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a972a3bf-a1be-41f0-80a4-33c0a2ebbcef</guid><dc:creator>Alexandr Kolodinsky</dc:creator><description>&lt;p&gt;Yes, the issue is the same with SDK 15.2. I can&amp;#39;t yet post the sniffer log for security reasons, but you last answer lead to a different DevZone &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27479/chsel-algorithm" rel="noopener noreferrer" target="_blank"&gt;issue&lt;/a&gt;&amp;nbsp;where ChSel #1 / #2 is discussed.&lt;/p&gt;
&lt;p&gt;Sniffer logs analysis has shown that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Our custom BLE Central device always offers ChSel #2&lt;/li&gt;
&lt;li&gt;DK running SDK 13 as Peripheral offers ChSel #1&lt;/li&gt;
&lt;li&gt;DK running SDK 14+ as Peripheral offers ChSel #2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Apparently when both devices offer #2 - they use it and this isn&amp;#39;t handled correctly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there a way to explicitly control ChSel #1 / #2 in Nordic SDK? At least for debugging purposes we&amp;#39;d like to try SDK 14+ with ChSel #1 offer. Is it possible?&lt;/p&gt;
&lt;p&gt;Thank you for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inconsistent behavior when connecting from Custom BLE device to nrf52dk running different SDKs</title><link>https://devzone.nordicsemi.com/thread/149100?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 16:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:032ee775-b2d0-4684-af59-0624be9ee1f6</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="73930" url="~/f/nordic-q-a/38499/inconsistent-behavior-when-connecting-from-custom-ble-device-to-nrf52dk-running-different-sdks/149091"]What is so significantly different between these?[/quote]
&lt;p&gt;One&amp;nbsp;significant difference is that&amp;nbsp;s132_nrf52_5.0.0_softdevice is&amp;nbsp;a Bluetooth 5 qualified SoftDevice and uses&amp;nbsp;Channel Selection algorithm #2. It could be that&amp;nbsp;&lt;span&gt;Bluez&amp;nbsp;somwhow does not handle this correctly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you see the same issue with &lt;a href="https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/"&gt;SDK 15.2&lt;/a&gt; ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A &lt;a href="https://www.nordicsemi.com/eng/nordic/Products/nRF-Sniffer/nRF-Sniffer-v2/65225"&gt;sniffer trace&lt;/a&gt; could be helpful(see &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/sniffer/sniffer_intro.html?cp=5_4"&gt;this page&lt;/a&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inconsistent behavior when connecting from Custom BLE device to nrf52dk running different SDKs</title><link>https://devzone.nordicsemi.com/thread/149091?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 15:31:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c531096-8a0e-4cbc-8011-02a6a84b329f</guid><dc:creator>Alexandr Kolodinsky</dc:creator><description>&lt;p&gt;Results are 100% consistent:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;connectivity &lt;strong&gt;never&lt;/strong&gt; fails when connecting to DK running SDK 13.1&lt;/li&gt;
&lt;li&gt;connectivity &lt;strong&gt;always&lt;/strong&gt; fails when connecting to DK running SDK 14+&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As per above, RC clock source was also validated, just with a different setting:&lt;/p&gt;
&lt;p&gt;NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 4 (not 2 as you propose, unlikely this is significant).&lt;/p&gt;
&lt;p&gt;If it was soldering or RF problem - why would it then work OK with SDK 13.1? What is so significantly different between these?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inconsistent behavior when connecting from Custom BLE device to nrf52dk running different SDKs</title><link>https://devzone.nordicsemi.com/thread/149054?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 13:16:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97dc5d36-46f1-465c-835a-dc38182bf15e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;62(&lt;span&gt;0x3E&amp;nbsp;&lt;/span&gt;)&amp;nbsp;&lt;span&gt;is BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED. This is&amp;nbsp;normally a sign that one of the peers have lost packets during the initial &amp;quot;CONNECT_REQ&amp;quot; process.&amp;nbsp;You can get into a scenario where you receive the request, but the central does not get the ACK from the peripheral. This can happen if the RF link quality is bad (ie: connecting at a long range), or when there is an issue with the RF layout (soldering is bad or similar).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How often do you see this issue? Are you able to&amp;nbsp;reliable recreate it?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To rule out any problems with the LF crystal, you could try to use the RC oscillator:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Try these values in sdk_config.h&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;h&amp;gt; Clock - SoftDevice clock configuration

//==========================================================
// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH 

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 16
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// &amp;lt;i&amp;gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &amp;lt;i&amp;gt;  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_XTAL_ACCURACY  - External crystal clock accuracy used in the LL to compute timing windows.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_150_PPM 
// &amp;lt;3=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_100_PPM 
// &amp;lt;4=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_75_PPM 
// &amp;lt;5=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_50_PPM 
// &amp;lt;6=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_30_PPM 
// &amp;lt;7=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM 

#ifndef NRF_SDH_CLOCK_LF_XTAL_ACCURACY
#define NRF_SDH_CLOCK_LF_XTAL_ACCURACY 1
#endif&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inconsistent behavior when connecting from Custom BLE device to nrf52dk running different SDKs</title><link>https://devzone.nordicsemi.com/thread/149033?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 12:32:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:930a62a6-3e7f-47b5-aa78-efa5b76a8f93</guid><dc:creator>Alexandr Kolodinsky</dc:creator><description>&lt;p&gt;&amp;lt;info&amp;gt; app: Disconnected reason: 62.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inconsistent behavior when connecting from Custom BLE device to nrf52dk running different SDKs</title><link>https://devzone.nordicsemi.com/thread/149003?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 11:10:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51a25133-e78e-4aa8-8d9e-1e3de4f6d99a</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Could you print the disconnect reason?&lt;/p&gt;
&lt;p&gt;In ble_evt_handler, you could do something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        case BLE_GAP_EVT_DISCONNECTED:
        
            NRF_LOG_INFO(&amp;quot;Disconnected reason: %d.&amp;quot;,p_ble_evt-&amp;gt;evt.gap_evt.params.disconnected.reason);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inconsistent behavior when connecting from Custom BLE device to nrf52dk running different SDKs</title><link>https://devzone.nordicsemi.com/thread/148961?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 08:58:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:402b5df1-2d44-4f66-83c3-892bfddee664</guid><dc:creator>Alexandr Kolodinsky</dc:creator><description>&lt;p&gt;We use XTAL for the posted results, tried different&amp;nbsp;NRF_SDH_CLOCK_LF_XTAL_ACCURACY values.&lt;/p&gt;
&lt;p&gt;In other attempts we also used RC as a clock source with different NRF_SDH_CLOCK_LF_RC_CTIV values - no luck either.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s our current sdk_config.h configuration:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//==========================================================
// &amp;lt;h&amp;gt; Clock - SoftDevice clock configuration
//==========================================================
// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH 

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 1
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// &amp;lt;i&amp;gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &amp;lt;i&amp;gt;  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_XTAL_ACCURACY  - External crystal clock accuracy used in the LL to compute timing windows.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_150_PPM 
// &amp;lt;3=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_100_PPM 
// &amp;lt;4=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_75_PPM 
// &amp;lt;5=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_50_PPM 
// &amp;lt;6=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_30_PPM 
// &amp;lt;7=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM 

#ifndef NRF_SDH_CLOCK_LF_XTAL_ACCURACY
#define NRF_SDH_CLOCK_LF_XTAL_ACCURACY 7
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the reply!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inconsistent behavior when connecting from Custom BLE device to nrf52dk running different SDKs</title><link>https://devzone.nordicsemi.com/thread/148812?ContentTypeID=1</link><pubDate>Fri, 14 Sep 2018 12:08:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f70f3e96-ea9f-4bc3-8fd5-92a94f1bbb69</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you using the LF RC&amp;nbsp;oscillator ?&lt;/p&gt;
&lt;p&gt;What is the value of&amp;nbsp;NRF_SDH_CLOCK_LF_SRC and NRF_SDH_CLOCK_LF_XTAL_ACCURACY in sdk_config.h?&lt;/p&gt;
&lt;p&gt;Note that starting from&amp;nbsp;s132_nrf52_5.0.0-2.alpha, the application need to set the&amp;nbsp;accuracy/ppm of the&amp;nbsp;RC oscillator itself. From the&amp;nbsp;s132_nrf52_5.0.0-2.alpha release notes:&lt;/p&gt;
&lt;blockquote style="background-color:#f2f2f2;border:1px solid #666;padding:5px;"&gt;The RC oscillator accuracy can now be set to any of the defined NRF_CLOCK_LF_ACCURACY values, and there is no default anymore. In other words, the nrf_clock_lf_cfg_t::accuracy parameter now has the same functionality when used with the RCOSC clock source as with the XTAL clock source&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>