<?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>Intermittent problems</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30931/intermittent-problems</link><description>Several different copies of the dev kit, and a couple of different hosts. I often get &amp;quot;Failed to secure connection. Disconnecting.&amp;quot;. I can find where it&amp;#39;s generated in the code, but despite days of tracing back thru the call stack, I can&amp;#39;t figure out</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Mar 2018 09:24:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30931/intermittent-problems" /><item><title>RE: Intermittent problems</title><link>https://devzone.nordicsemi.com/thread/123196?ContentTypeID=1</link><pubDate>Wed, 07 Mar 2018 09:24:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a986011-9035-4d47-a0db-a8c309f9148e</guid><dc:creator>Rune Holmgren</dc:creator><description>[quote user=""] I often get &amp;quot;Failed to secure connection. Disconnecting.&amp;quot;. I can find where it&amp;#39;s generated in the code, but despite days of tracing back thru the call stack, I can&amp;#39;t figure out what actually causes the error.[/quote]
&lt;p&gt;The log message comes when one of the devices in your connection doesn&amp;#39;t respond to a&amp;nbsp;security request. To better understand what caused the issue with your device you will have to run a BLE sniffer when it happens. You may use the &lt;a href="https://www.nordicsemi.com/eng/nordic/Products/nRF-Sniffer/nRF-Sniffer-v2/65225"&gt;nRF&amp;nbsp;Sniffer 2.0 beta&amp;nbsp;&lt;/a&gt;which can run on an nRF5 DK or a separately dedicated sniffer. Feel free to share your sniffer log with me and I will help you figure out why this is happening.&lt;/p&gt;
[quote user=""]I am running the CGMS example app. I have noticed that it no longer does the passkey handshake - never displays a passkey on the UART, nor asks for it on the BLE host.[/quote]
&lt;p&gt;As far as I can tell we&amp;nbsp;have never used passkey handshake in the CGMS example. Have you been running the GLS example earlier? &lt;a href="https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.continuous_glucose_monitoring.xml"&gt;Continous glucose monitoring&amp;nbsp;&lt;/a&gt;is a different BLE service from &lt;a href="https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.glucose.xml"&gt;glucose&lt;/a&gt;, and only the example implementing GLS in the SDK uses passkey.&lt;/p&gt;
[quote user=""]I am also at a loss for the configuration utility that generates a consistent sdk_config.h and/or app_config.h, and how to configure the GATT stack to specify the BLE variables that are presented to the host.[/quote]
&lt;p&gt;Generally GATT configuration is so unique per application that we do not put the configuration of GATT in the config files. The configuration parameters for GATT per service is found in the init function of the service implementation, so if you are looking for CGMS configuration you need to look in components\ble\ble_services\experimental_nrf_ble_cgms\nrf_ble_cgms.c and have a look at the init function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also note that many of the GAP &amp;quot;connection parameters&amp;quot; for the BLE connection, like min/max connection interval, slave latency, supervisor timeout, etc., are configured though sd_ble_gap function calls. In our examples, you find this in the file main.c and this is also where you find the parameters as defines in the top of the file.&lt;/p&gt;
[quote user=""]I have used BLE on other platforms and it wasn&amp;#39;t this hard. I&amp;#39;ve been all over the documentation, but I&amp;#39;m lost in the forest.[/quote]
&lt;p&gt;Thank you for the feedback, it&amp;#39;s valuable to us. It has been forwarded to the SDK team to let them know that they should consider looking into the way configuration options are covered in the documentation.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Rune Holmgren&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>