<?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>High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29907/high-ble-activity-for-15-seconds-after-connection</link><description>I am developing a BLE peripheral application on nRF52832 and SDK 14.3. 
 I have been power profiling my application and quite happy with the results, except for when the peripheral first connects. Power usage goes crazy for about 15 seconds before calming</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Feb 2018 13:36:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29907/high-ble-activity-for-15-seconds-after-connection" /><item><title>RE: High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/thread/119384?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2018 13:36:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec705731-2877-48a6-a6ff-7a719cd4900d</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;&amp;gt;e&lt;span&gt;ven when paired/bondedto the peripheral the app is required to discover services, characteristics and set CCCD values each time a&amp;nbsp;connection is established.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;That would be incorrect. If the link is encrypted using keys shared during bonding ,the iOS should not re-discover the Services. You can try to get a sniffer trace and update your question so you can be certain. Only a ServiceChanged Indication should trigger re-discovery and re-subscribing to CCCD, when the link is encrypted with key shared during bonding.&lt;/p&gt;
&lt;p&gt;Can you specify which example you are using in SDK 14.2 (I assume you are using SDK 14.2)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/thread/119379?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2018 12:50:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98342f4a-d076-4067-b6bf-4a39a0710db6</guid><dc:creator>jumpingfool</dc:creator><description>&lt;p&gt;Hi - I have now uncovered what is behind this. My central&amp;nbsp;is an iOS app and it appears that even when paired/bondedto the peripheral the app is required to discover services, characteristics and set CCCD values each time a&amp;nbsp;connection is established. This seems to be&amp;nbsp;the case even when re-establishing&amp;nbsp;an existing connection through the background&amp;nbsp;execution modes using retrievePeripherals(withIdentifiers: ) - the retrieved peripheral object does not contain the service details (the services object&amp;nbsp;is NULL).&lt;/p&gt;
&lt;p&gt;Is that expected behaviour from the core bluetooth iOS framework or could it point to some configuration issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/thread/118936?ContentTypeID=1</link><pubDate>Sun, 28 Jan 2018 15:06:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77f5264a-566e-463c-b1ce-467773d4ad24</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Does the bluetooth 5.0 spec say anything about the message flow (i.e. any message sequence charts) for the reconnection of previously bonded device to the GAP central?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/thread/118941?ContentTypeID=1</link><pubDate>Sun, 28 Jan 2018 04:22:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2e60561-334c-4486-9d62-a2df90378bd6</guid><dc:creator>jumpingfool</dc:creator><description>&lt;p&gt;Thanks for your help!&lt;/p&gt;
&lt;p&gt;I am already using both the connection parameters negotiation library and the peer manager in my application. I have managed to get some more information on the data that is being exchanged while investigating another issue with the peer manager - see &lt;a href="https://devzone.nordicsemi.com/question/189935/bug-in-peer-manager-in-sdk-142/."&gt;devzone.nordicsemi.com/.../.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can you comment on whether the event flow at the bottom of this question is usual when connecting to a previously bonded device? It sure does seem like a lot of data to be exchanging each time a connection is established!&lt;/p&gt;
&lt;p&gt;That said, my suspicion is that the majority of the power usage we see here is in the peer data being written to flash, not usage of the BLE radio.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/thread/118939?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 12:49:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddd1bed8-0fd5-4810-b96d-34c312a6c39b</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;You can look into the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/lib_ble_conn_params.html?cp=4_0_0_3_2_3"&gt;Connection Parameter Negotiation&lt;/a&gt; library. That will help you do the initial connection procedures as fast as possible and then you can throttle down the parameters to save power.&lt;/p&gt;
&lt;p&gt;Then you could look into the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/lib_peer_manager.html?cp=4_0_0_3_2_6"&gt;Peer Manager&lt;/a&gt; library. With that you can bond your devices to avoid the service discovery on every connection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/thread/118940?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 12:37:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a70a42-3978-4e6e-901b-cd0ff0edfb59</guid><dc:creator>jumpingfool</dc:creator><description>&lt;p&gt;I think you may be on the right track there - here are my connection parameters:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define MIN_CONN_INTERVAL (SECOND_1_25_MS_UNITS / 100) * 30 /*300ms*/
#define MAX_CONN_INTERVAL (SECOND_1_25_MS_UNITS / 100) * 39 /*390ms*/
#define SLAVE_LATENCY 4
#define CONN_SUP_TIMEOUT (6 * SECOND_10_MS_UNITS) /*6s*/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These connection intervals are set to be the maximum allowable for iOS - our application is not time sensitive but is range sensitive, so we have upped the connection interval and added the PA to our design to try to maximise the range while keeping a handle on power consumption.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m away from the lab at the moment so can&amp;#39;t check but my guess is the spikes will line up with the connection interval.&lt;/p&gt;
&lt;p&gt;Given the services and characteristics in our application never change is there some way I can instruct the central not to re-scan every time it connects?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/thread/118938?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 11:24:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65ae488c-edc2-446e-aec9-2fdb3b4b7d4e</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Could it be that the devices are doing service discoveries, but using an unfortunate bandwidth configuration? What are the period between the spikes in the crazy period? What are the connection parameters in your application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/thread/118937?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 04:31:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84a4cbf5-4930-4f32-9192-72d6ccbbc27c</guid><dc:creator>jumpingfool</dc:creator><description>&lt;p&gt;I am profiling a custom design with on-board Power Amplifier, so the 60mA peaks during radio activity are not a concern. The graph makes it look worse than it is - even during the &amp;quot;crazy&amp;quot; period the average current over the 15 sec is only around 500uA so not catastrophic. I&amp;#39;m still keen to know if it&amp;#39;s necessary though as my application will require relatively frequent connect/disconnect cycles.&lt;/p&gt;
&lt;p&gt;The screenshots above are showing a connection from nRF Connect on iOS - I did try to run nRF Connect on the desktop to see if it changed anything but wasn&amp;#39;t able to get it to run at the same time as the power profiler.&lt;/p&gt;
&lt;p&gt;I also spun up a sniffer today to see if that gave any clues - I can see a few scan/responses going back and forth while this activity is happening but I wouldn&amp;#39;t have thought that service discovery would have taken
this long to complete?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/thread/118935?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2018 14:32:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5665dc64-d79f-42b8-87b9-5dcf3615579b</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Is it possible to try connecting using the master control panel on the pc side i.e. just connect, bond, discover service and see if you get the same 60mA current drain on your end.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High BLE activity for 15 seconds after connection</title><link>https://devzone.nordicsemi.com/thread/118934?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2018 14:05:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:663dffdf-e582-4b9e-b3de-0e51df36fb45</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Those currents seem pretty crazy indeed. 60mA is &lt;em&gt;a lot&lt;/em&gt; and probably wrong or caused by something else than the nRF52 alone? What are you measuring on? A development kit or do you have a custom board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>