<?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>ble connection sequence</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85577/ble-connection-sequence</link><description>HI, 
 I am developing an application which requires BLE connection. I am concerned about the energy consumed by the device during the connection. 
 I understand that once the connection is established there will be EXHANGE MTU and Discovery sequence </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Mar 2022 15:45:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85577/ble-connection-sequence" /><item><title>RE: ble connection sequence</title><link>https://devzone.nordicsemi.com/thread/357487?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 15:45:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08b1fa17-09c8-4d6a-95ff-364a0ed10c90</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;When you are running your own applications on both sides of the connection, you might be able to &amp;quot;skip some of the steps&amp;quot; in the connection procedure, since you know beforehand what device you are looking for, if that makes sense. For example if your devices are bonded they can skip the pairing process etc.&lt;/p&gt;
&lt;p&gt;If you want to transfer data without establishing a connection, one way to do this is to set up your peripheral as a beacon, meaning it will only send advertising packets that your central unit can read without going through the connection procedure. This could end up making your peripheral use more power in the long run though, as it will have to send data regularly even if the central isn&amp;#39;t reading it, but it could make your central unit use less power, so depending on where you need to save power this could be a solution. Be aware this setup could also make your transmissions less reliable, depending on how often your beacon advertises.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t want to use BLE, one option is to use the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.1.0%2Fesb_users_guide.html"&gt;proprietary protocol ESB&lt;/a&gt;. You can find example code documentation &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/esb_examples_low_power_ptx_prx.html"&gt;here&lt;/a&gt;. Be aware that setting up ESB in your application will probably be more difficult than using BLE.&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble connection sequence</title><link>https://devzone.nordicsemi.com/thread/357458?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 14:53:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abf08f6d-9aab-44ce-a9c3-9b90a231b9e9</guid><dc:creator>buja</dc:creator><description>[quote userid="111520" url="~/f/nordic-q-a/85577/ble-connection-sequence/357447#357447"]In that case, your DK will only do what the central tells it to, it&amp;#39;s always the central unit that initiates things like GATT database discovery etc, so if you want to test with your own custom application at both ends that might be easier to do with two devkits for example[/quote]
&lt;p&gt;That&amp;#39;s clear, thank you.&lt;/p&gt;
[quote userid="111520" url="~/f/nordic-q-a/85577/ble-connection-sequence/357447#357447"]Also, as I already mentioned, this initial setup communication is not what you should be worried about when it comes to your application&amp;#39;s power consumption.[/quote]
&lt;p&gt;That&amp;#39;s correct, but my system is based on energy harvesting and hence this is very important for me. Also do you think if there is any way to transfer data (2-3 MB) between two devices without a connection ? Because, connection procedure seems to be very power hungry for us.&amp;nbsp; Is there any proprietary protocol available ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble connection sequence</title><link>https://devzone.nordicsemi.com/thread/357447?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 14:38:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64f601b0-fe72-4f35-9bcf-22f5611d3add</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Right, I assumed you were using NCS, but you&amp;#39;re using the nRF5 SDK?&lt;/p&gt;
&lt;p&gt;The ble app template is for an advertising peripheral, so I assume you&amp;#39;re using nRF Connect as your central unit when testing to connect to your devkit?&lt;/p&gt;
&lt;p&gt;In that case, your DK will only do what the central tells it to, it&amp;#39;s always the central unit that initiates things like GATT database discovery etc, so if you want to test with your own custom application at both ends that might be easier to do with two devkits for example.&lt;/p&gt;
&lt;p&gt;Also, as I already mentioned, this initial setup communication is not what you should be worried about when it comes to your application&amp;#39;s power consumption.&lt;/p&gt;
&lt;p&gt;-Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble connection sequence</title><link>https://devzone.nordicsemi.com/thread/357404?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 13:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d3bc745-b94b-44a7-bdc9-0b8f79ffcd9b</guid><dc:creator>buja</dc:creator><description>[quote userid="111520" url="~/f/nordic-q-a/85577/ble-connection-sequence/357388#357388"]&lt;p&gt;What code are you currently running? Have you based your application on a sample?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;\examples\ble_peripheral\ble_app_template - My application is based on ble_app_template.&lt;/p&gt;
&lt;p&gt;I am just analysing the energy consumed during the connection.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble connection sequence</title><link>https://devzone.nordicsemi.com/thread/357388?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 12:34:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec35386d-0023-4063-9a99-5d853500aa99</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There are many options in the Zephyr Bluetooth GATT API, maybe &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/bluetooth/gatt.html#c.bt_gatt_find_by_uuid"&gt;this function&lt;/a&gt; can suit your needs?&lt;/p&gt;
&lt;p&gt;What code are you currently running? Have you based your application on a sample?&lt;/p&gt;
&lt;p&gt;-Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble connection sequence</title><link>https://devzone.nordicsemi.com/thread/357168?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 13:13:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fcf3fd9-cf96-4707-9c24-274d1787ba0c</guid><dc:creator>buja</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="111520" url="~/f/nordic-q-a/85577/ble-connection-sequence/357155#357155"]&lt;p&gt;The &lt;em&gt;discovery sequence&lt;/em&gt; on the other hand is done before establishing a connection, and involves the central unit choosing what advertising peripheral to connect to.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Oh sorry, I meant GATT database discovery which happens after the connection. Is this really needed if the client already knows the UUID of the characteristic being used ? Can client read/write using the UUID without the handle ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble connection sequence</title><link>https://devzone.nordicsemi.com/thread/357155?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 12:45:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3615b419-de88-4654-a094-86ce60ef7a2a</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;When establishing a connection some packets will be sent back and forth between the central and peripheral to configure the connection properly.&lt;/p&gt;
&lt;p&gt;In the simplest case this could be just a &lt;em&gt;connection request&lt;/em&gt; packet from the central to the peripheral, but often more packet exchanges are needed.&lt;/p&gt;
&lt;p&gt;For example an &lt;em&gt;MTU exchange&lt;/em&gt;, which sets the Maximum Transmission Unit, allowing for more data per packet.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;discovery sequence&lt;/em&gt; on the other hand is done before establishing a connection, and involves the central unit choosing what advertising peripheral to connect to.&lt;/p&gt;
&lt;p&gt;All this is mandatory to set up a connection, but shouldn&amp;#39;t be of great concern when it comes to energy consumption, as it only happens once at the beginning of a connection.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then there are all the empty packets you have observed being sent between the central and peripheral.&lt;/p&gt;
&lt;p&gt;These are sent regularly in order to keep the BLE connection alive, at a frequency set by the &lt;em&gt;connection interval&lt;/em&gt;, which is decided by the central in the initial &lt;em&gt;connection request&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The connection interval seems to be set to a low value in your application since these packets are sent pretty frequently. It can be set to as high as a few seconds I believe.&lt;/p&gt;
&lt;p&gt;Setting a higher connection interval will likely make your application consume less power since it&amp;#39;s sending fewer packets, but you might also find your application less responsive if you set it too high.&lt;/p&gt;
&lt;p&gt;Hope this clears up some of your questions.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>