<?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>Queued message count at start of Connection Interval</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73290/queued-message-count-at-start-of-connection-interval</link><description>If we want to make certain that a particular message goes first on a connection interval. Is there a way to check that there is none already internally queued? 
 
 Is this possible? Pseudo code below 
 
 app_ble_radio_notification_handler (active) 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Apr 2021 09:17:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73290/queued-message-count-at-start-of-connection-interval" /><item><title>RE: Queued message count at start of Connection Interval</title><link>https://devzone.nordicsemi.com/thread/303049?ContentTypeID=1</link><pubDate>Tue, 06 Apr 2021 09:17:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb050b7b-3c46-4d2b-aeb0-6f717c474636</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, the peripheral will have to send a read response, but not neccessarly in the same connection event as the request. Below you can see a picture of a sniffer trace that shows the scenario where a GATT server receives a read request while having a notification packet in the queue.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/1732.Capture.JPG" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Queued message count at start of Connection Interval</title><link>https://devzone.nordicsemi.com/thread/302789?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 15:17:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6e92b81-dc66-41a4-aa4c-43f4f309f893</guid><dc:creator>avaldes</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I agree with most of that. What about a read characteristic from Central, would not that generate a transmission in the Peripheral?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Assume that Application has queued a single notification, and Central happens to also want to read a particular READABLE characteristic from the Peripheral. On the next connection interval,&amp;nbsp;wouldn&amp;#39;t that&amp;nbsp; generate possibly two transmissions?&lt;/p&gt;
&lt;p&gt;#1 for the Notification we have queued&lt;/p&gt;
&lt;p&gt;#2 to read the characteristic that Central was interested in reading&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Queued message count at start of Connection Interval</title><link>https://devzone.nordicsemi.com/thread/302783?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 15:02:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:372cc7b3-dc35-4da9-8279-e54827f1bd30</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is the application expected to send multiple notifications from different handles around the same time as this particular packet? As you may know, the tx complete event is only raised after the Softdevice has successfully transmitted notification packet(s)&amp;nbsp; that have been enqueued by the application through the &lt;span&gt;&lt;a title="sd_ble_gatts_hvx" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html?cp=4_7_3_1_2_4_2_4#ga313fe43c2e93267da668572e885945db"&gt;sd_ble_gatts_hvx&lt;/a&gt;&lt;/span&gt;() call. There isn&amp;#39;t anything else that will trigger this event.&amp;nbsp; &lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Queued message count at start of Connection Interval</title><link>https://devzone.nordicsemi.com/thread/302772?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 13:46:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d033eec-0afb-4402-b024-0b9ff1e362bd</guid><dc:creator>avaldes</dc:creator><description>&lt;p&gt;Hi Vidar&lt;/p&gt;
&lt;p&gt;Yes we have looked into&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/group___b_l_e___g_a_t_t_s___e_n_u_m_e_r_a_t_i_o_n_s.html#ggae537647902af1b05c1e32f12d6b401c7afab96bfa9918017082235f7664919f9d"&gt;BLE_GATTS_EVT_HVN_TX_COMPLETE&lt;/a&gt;&amp;nbsp;but it does not provide much of a context as the only context is &amp;quot;&lt;span&gt;Number of notification transmissions completed&amp;quot; which is not much of a context for what we are looking for which was &amp;quot;what was the handle that was sent&amp;quot; if that was something that was available somehow maybe we can use it not for precise timing but to help have a context while we use the&amp;nbsp;&amp;nbsp;RADIO_STATE_STATE_TxDisable&amp;nbsp;== NRF_RADIO-&amp;gt;STATE as a timing method.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Queued message count at start of Connection Interval</title><link>https://devzone.nordicsemi.com/thread/302715?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 11:47:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be6acbd6-1eff-4d0d-983f-9a380de27e35</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s only the application which fills the notification/write queue.&lt;/p&gt;
[quote user="avaldes"]All we do know is that a given messages has made it all the way out to the air, but we not have any context about which one is the one that made it out (which handle) ... so for us TWO possible solutions (perhaps you have more)[/quote]
&lt;p&gt;Have you considered using the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/group___b_l_e___g_a_t_t_s___e_n_u_m_e_r_a_t_i_o_n_s.html#ggae537647902af1b05c1e32f12d6b401c7afab96bfa9918017082235f7664919f9d"&gt;BLE_GATTS_EVT_HVN_TX_COMPLETE&lt;/a&gt;&lt;span&gt; event to determine when a packet has been successfully sent, or wouldn&amp;#39;t that be accurate enough? Also, have you seen this one: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/wireless-timer-synchronization-among-nrf5-devices"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/wireless-timer-synchronization-among-nrf5-devices&lt;/a&gt; ?&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Queued message count at start of Connection Interval</title><link>https://devzone.nordicsemi.com/thread/302464?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 18:42:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ce9602c-8f38-47a4-960d-40f8526deb36</guid><dc:creator>avaldes</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is a message that on a particular connection intervals we need to be able to guarantee that it will go first, ahead of any other message ... is there any way to queue a message to the HEAD of the FIFO or only way to insert is to the TAIL?&lt;/p&gt;
&lt;p&gt;We have used PPI to get access to the&amp;nbsp;NRF_RADIO-&amp;gt;EVENTS_END and once we get to the&amp;nbsp;RADIO_STATE_STATE_TxDisable&amp;nbsp;== NRF_RADIO-&amp;gt;STATE&lt;/p&gt;
&lt;p&gt;All we do know is that a given messages has made it all the way out to the air, but we not have any context about which one is the one that made it out (which handle) ... so for us TWO possible solutions (perhaps you have more)&lt;/p&gt;
&lt;p&gt;#1 Get context as to what message did go out when we get the&amp;nbsp;&lt;span&gt;RADIO_STATE_STATE_TxDisable&lt;/span&gt;&lt;span&gt;&amp;nbsp;== NRF_RADIO-&amp;gt;STATE state (timing is very very important)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;#2 Be able to guarantee that a particular message gets in front of the transmit queue once the Connectoin interval is about to start.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Queued message count at start of Connection Interval</title><link>https://devzone.nordicsemi.com/thread/302463?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 18:22:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c40b4488-ad44-4255-a177-bec9e5720d24</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m afraid this is not something you can control as a Bluetooth connection events are being started by the GAP Central. The internal Softdevice protocol queue isn&amp;#39;t exposed to the application either.&lt;/p&gt;
&lt;p&gt;I may be able to provide some other suggestions, but I think would need to understand the background for this requirement first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>