<?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>Zephyr BLE  How a central device acknowledges an indication</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103351/zephyr-ble-how-a-central-device-acknowledges-an-indication</link><description>My peripheral device used the API function bt_gatt_indicate() to send a indication to a central device and I used a callback function for func ( bt_gatt_indicate_func_t ). 
 I confirmed that the central device received the indication and I expected the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Sep 2023 15:42:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103351/zephyr-ble-how-a-central-device-acknowledges-an-indication" /><item><title>RE: Zephyr BLE  How a central device acknowledges an indication</title><link>https://devzone.nordicsemi.com/thread/444768?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2023 15:42:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89f58bc3-58df-4977-a541-01b265ae9349</guid><dc:creator>wliao</dc:creator><description>&lt;p&gt;It works after using the destroy callback instead. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr BLE  How a central device acknowledges an indication</title><link>https://devzone.nordicsemi.com/thread/444628?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2023 07:08:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:616f7bea-eae7-49bc-bdaa-9eb4ee330d8d</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Apologies for the delayed response. I had to double check something. So to clarify the difference in how notifications and indications works w.r.t. acks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;With Notification, you have a callback from the controller when the notification packet is sent to the peer bt_gatt_notify_cb&lt;/li&gt;
&lt;li&gt;With indications, you have the same + another callback that is coming as an ack from the peer. This callback is called destroy (confusing name)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Look into the zephyr\samples\bluetooth\peripheral_ht\src\hts.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ind_params.attr = &amp;amp;hts_svc.attrs[2];

ind_params.func = indicate_cb;

ind_params.destroy = indicate_destroy;

ind_params.data = &amp;amp;htm;

ind_params.len = sizeof(htm);



if (bt_gatt_indicate(NULL, &amp;amp;ind_params) == 0) {

indicating = 1U;

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As you can see, indicate_cb will be call immediate when the radio sent the indication to the peer. and indicate_destroy will be called when the peer acknowledged it&lt;/p&gt;
&lt;p&gt;Let me know if this makes things more clear for you!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr BLE  How a central device acknowledges an indication</title><link>https://devzone.nordicsemi.com/thread/444572?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2023 17:56:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cf3acad-a1da-480a-ba83-a537ab11c304</guid><dc:creator>wliao</dc:creator><description>&lt;p&gt;Is the API function&amp;nbsp;bt_gatt_write_without_response used to send the confirmation of acknowledging the indication? If so, what is the use case of the callback function specified in&amp;nbsp;&lt;span&gt;the&amp;nbsp;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;bt_gatt_indicate_params when the indication is generated? It seems the callback function never being called.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr BLE  How a central device acknowledges an indication</title><link>https://devzone.nordicsemi.com/thread/444124?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 13:25:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:261bea84-8366-450c-a607-075cac51a31b</guid><dc:creator>wliao</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;Our application needs both notification and indication.&lt;/p&gt;
&lt;p&gt;As to handling the acknowledge, which API function should be used?&lt;/p&gt;
&lt;p&gt;And what the callback function&amp;nbsp;&lt;span&gt;func (&lt;/span&gt;&lt;span&gt;bt_gatt_indicate_func_t&lt;/span&gt;&lt;span&gt;) of the&amp;nbsp;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;bt_gatt_indicate_params is used for, i.e. when this callback gets called anyway?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr BLE  How a central device acknowledges an indication</title><link>https://devzone.nordicsemi.com/thread/444088?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 12:08:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c3217fc-ecbe-4b8f-a9b3-428981e7d200</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You are correct, for indications you will need to handle the acknowledge on the application layer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, based on your description, I suspect you might be interested in Notifications instead? Notifications does not require the acknowledge on application layer&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>