<?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>How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23586/how-can-i-measure-the-advertising-intervals-of-a-peripheral</link><description>I would like to know how frequently my peripheral is sending advertising and data packets. I&amp;#39;ve tried using ble-sniffer-osx but it doesn&amp;#39;t actually reveal any device names for some reason, so it&amp;#39;s not trivial to use. Is it possible to do this using Xcode</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Jul 2017 23:40:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23586/how-can-i-measure-the-advertising-intervals-of-a-peripheral" /><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92663?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 23:40:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:312282c4-28cd-486e-a649-7dfcd311aeb5</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;If you are pro and your company has spare $4k-$15k then having one of these sniffers solves most of your question. Otherwise with little bit of learning and patience nRF51 DK board with Nordic Sniffer SW will do such simple job as well (until you stay with BT4.0-4.2).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92662?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 23:35:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:965cbe02-3fee-4df9-b2f2-b0be8925461f</guid><dc:creator>ChipChipperson</dc:creator><description>&lt;p&gt;Clearly I&amp;#39;m not asking a question that cannot be answered concisely, nor obviously am I interested in edge cases, right? Generally, I&amp;#39;m just inquiring after the possibility of measuring the frequency of data packets sent from a peripheral to a central, in any given scenario (device/chipset, etc). For maximum groking, procurement of either an Frontline or Ellisys is in order :) Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92655?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 20:59:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c898ca27-da75-4678-8c25-599be24f0d50</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;...(3/3) permit to save power on slave (GAP Peripheral) side of the link and in case that there are no higher layers active one or more connection intervals can be &amp;quot;missed&amp;quot; meaning that device will sleep and neither Tx nor Rx activity happens.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;And to continue with complexity higher standards then BT4.0 introduced features such as PDU length extension, ATT_MTU length extension (just higher layer;) and recently also different on-air speeds (2Mbps) and PHY codings (500/125kbps).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So this is basic overview. I hope it&amp;#39;s more clear why it is hard for us to answer your &amp;quot;simple&amp;quot; questions, they simply doesn&amp;#39;t make much sense in BLE context;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92666?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 20:53:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9176d9be-b1cf-48b5-a740-373f6671eef7</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;...(2/x) complicated in terms of packet size, numbers, data rate etc. and e) with new BT SIG mesh broadcasting can offer even more complex situations then this.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In connection based link it becomes again complex because there are suddenly much more layers involved.&lt;/li&gt;
&lt;li&gt;In general there is some basic period called &amp;quot;connection interval&amp;quot; where both sides of (asymmetric) link exchange typically one packet. This happens even if there are no effective data, simply they exchange empty PDUs containing only Link Layer and PHY headers. Do you count this into your analysis?&lt;/li&gt;
&lt;li&gt;To make it worse if there are higher layers active they can (if both sides of the link support it) exchange suddenly more PDU pairs within one interval (it&amp;#39;s not uncommon that good BLE stacks support 6 o even more packets per interval when needed).&lt;/li&gt;
&lt;li&gt;To make it total mess for you there are link parameters which may ...&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92664?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 20:46:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:798c4f77-e8be-4231-86ac-aad9cc8019a0</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;I&amp;#39;m afraid you won&amp;#39;t be happy with my answer: it&amp;#39;s more complex then this;) Briefly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In Broadcasting/Scanning phase (Advertising) should advertiser periodically send either one or 3 packets (if one then it should rotate all 3 adv. channels, if 3 then it should send one per channel in short sequence and then wait another advertising interval).&lt;/li&gt;
&lt;li&gt;This is normally valid but note that a) broadcaster can decide to avoid some adv. channels (for whatever reasons but typically to reduce power consumption), b) if it is scannable advertisement then it can after any ADV_xxx packet receive active SCAN_REQ which means that it will send out another Tx packet with up to 31B of payload, c) broadcasting shouldn&amp;#39;t be really taken as clear data transport because it&amp;#39;s unreliable and by default there is no way to find out if data reached the listener or not, d) in BT 5.0 it becomes more... (1/x)&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92667?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 18:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17a9352c-a591-44fb-8d7b-8b1d22ecf3ee</guid><dc:creator>ChipChipperson</dc:creator><description>&lt;p&gt;Thank you both for your responsiveness and information/guidance, very much appreciated. I am only about a few weeks into groking BLE and it is certainly not a trivial protocol, so all the help is great, thanks again.&lt;/p&gt;
&lt;p&gt;To your point @endnode yes, I may have been mixing two different aspects of the connection protocol into one, I think. What I wanted to be asking was two-fold: how do I measure the frequency of advertising packets ? &lt;em&gt;AND&lt;/em&gt; How do I measure the frequency of data packets (with data form a sensor) being sent from the peripheral to central? Just to be clear, I&amp;#39;m assuming that by &amp;quot;connection interval&amp;quot; that is referring to the frequency of data packets being sent, yes?&lt;/p&gt;
&lt;p&gt;Yes, APP_ADV_INTERVAL is what I was looking for, thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92668?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 08:02:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0281402a-62ff-4b3a-ba4a-fe06532eeda6</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;@ChipChipperson It is still unclear to me if you are talking about advertising interval or connection interval. If you want to measure any of them you should use a sniffer.&lt;/p&gt;
&lt;p&gt;If you want to configure (and then know) the advertising interval you can modify what is typically defined as APP_ADV_INTERVAL or similar in our SDK examples.&lt;/p&gt;
&lt;p&gt;In regards to connection interval, you would typically view it using a debugger or by printing it.&lt;/p&gt;
&lt;p&gt;P.S. The connection interval doesn&amp;#39;t necessary tell you how often you are sending data to the peer, it tell you how often you can send data to the peer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92661?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 20:58:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04afb59c-7eb7-42ac-9d6f-d4a930c1464c</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Oh and if you really wants to know PPCP (aka Preferred Peripheral Connection Parameters) as you indicate above that should be visible after connecting to GATT Server right under GATT Primary Service.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92659?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 20:54:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7771b6d-08f3-4125-9092-7b3942861429</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;To connection parameters (which is quite different story so it looks like you are mixing several things into one question):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can read it precisely from RF packet sniffer because it&amp;#39;s in CONNECT_REQ packet and then it can be changed later but always explicitly by Master (GAP Central device) by LL command so you can again see the value in the log.&lt;/li&gt;
&lt;li&gt;You can also observe it on upper layers if LL/GAP API allows it. I&amp;#39;m afraid that&amp;#39;s not the case on Android or iOS (but I suggest to verify in API documentation) but you can again measure it indirectly if devices exchange one packer each interval you can measure time in the app, it should be pretty close to reality.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92660?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 20:52:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2a1f482-4c0a-48e2-aa5c-cf8c6791249f</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;I&amp;#39;ve updated my answer. As Petter mentioned this indication is only measured and displayed by Android app. There is no way to find out Adv. Interval, app is just measuring deltas between received events from lower Android BT stack (through API) and it displays it. As explained if you want exact value you either need to know it from app developer or you need to run some larger statistics (dozens of packets) and precise time measurement with some more professional 2.4 GHz (BLE PHY enabled) analyzer (&amp;quot;sniffer&amp;quot; if you want) and take average value (assuming interval is not changing over time and that you don&amp;#39;t miss any packet).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92665?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 18:14:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:019021a2-9698-4751-8845-050275918e47</guid><dc:creator>ChipChipperson</dc:creator><description>&lt;p&gt;Hi Petter, thank you for the response and info. I am basically just trying to find out how frequently my peripheral is sending out data (from a sensor). Regarding &lt;a href="https://devzone.nordicsemi.com/question/56471/check-ble-connection-interval/"&gt;the link here&lt;/a&gt;, I&amp;#39;m not clear on where I would be viewing evt.gap_evt.params.connected.conn_params.max_conn_interval, etc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92671?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 08:26:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a50a9ca-ddc4-4fa3-b5d3-a8a243bb2790</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Yes, pretty much any BLE Peripheral examples do it, e.g. there is &lt;code&gt;examples\ble_peripheral\ble_app_beacon&lt;/code&gt; (but runs only on PCA10040 aka nRF52 DK, otherwise you need to do small modifications)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92657?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 06:49:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbc35046-6617-4ec0-b959-a61ee23bcff0</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;nRF Connect for Android shows this in the scan window, next to the RSSI. I don&amp;#39;t think the iOS app shows it. Could you explain exactly what you want to achieve? You can configure the advertising interval, so you can select how often you want advertising packets to be sent out. Data packets is a bit more complex, but finding the connection interval isn&amp;#39;t hard. See &lt;a href="https://devzone.nordicsemi.com/question/56471/check-ble-connection-interval/"&gt;this&lt;/a&gt;. If you want to see what is actually happening on air you need to use a Sniffer. The best would be a commercial one, from for example Frontline or Ellisys. Or you can use our &lt;a href="http://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer/(language)/eng-GB"&gt;nRF Sniffer&lt;/a&gt; (it has some issues, but it is free)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92670?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 00:00:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:927f02a1-a7bb-4f53-971b-3ce80ed25072</guid><dc:creator>ChipChipperson</dc:creator><description>&lt;p&gt;Thanks for the response. Do you happen to know of any examples in the NRF52 SDK that show an example of very frequent advertising or data packets being sent as a peripheral?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92658?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 23:18:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af8a975c-724c-4907-ac20-c3a96578262b</guid><dc:creator>ChipChipperson</dc:creator><description>&lt;p&gt;Where though? I see the RSSI reading (usually some fluctuating number like -86 or something), but where do you see the actual advertising interval frequency? Is that the X axis at the top of the RSSI graph (maybe in seconds) ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92656?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 21:11:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69d014d4-8b58-4f52-9f5c-e05b28f7ef08</guid><dc:creator>Daniel Wang</dc:creator><description>&lt;p&gt;You don&amp;#39;t need a sniffer to check this. A very easy way to check the advertising interval is to use the nRF Connect app on your smartphone. when scanning for devices, the adverising interval will be listed together with the name of the device and RSSI.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I measure the advertising intervals of a peripheral?</title><link>https://devzone.nordicsemi.com/thread/92669?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 08:34:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:345867c7-f85b-4fab-ab6e-191b59d7b57e</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;BLE devices are normally identified by 6-byte Adv. Address (MAC). By using good sniffer you can easily follow advertisers and deltas between packets they send (note that BLE broadcasting has some mandatory jitter from specification so you will wither &amp;quot;tip&amp;quot; the actual adv. interval or you will need some larger statistics to be &amp;quot;almost sure&amp;quot;). If you have problems to identify MAC address of your target (e.g. because it changes it to be pseudo-anonymous or because you have too many devices in the field) then moving to quieter place and using RSSI indication to see which is the closest device or at least which is moving when you move with your target should solve it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Some screenshots from nRF Connect mobile app (note that this applies only to Android version, iOS seems lacking this indication according to Petter). As you see beside graph view it computes delta between ADV events in list view for each advertiser (152ms in this case, I would guess real value is 150ms exactly):&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nRF_2D00_Connect_2D00_Scanner_2D00_Graph_5F00_20170719.jpg" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nRF_2D00_Connect_2D00_Scanner_2D00_List_5F00_20170719.jpg" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>