<?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>GATT prepare/execute write with NCS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116281/gatt-prepare-execute-write-with-ncs</link><description>Hi 
 I&amp;#39;m using the nRF Connect SDK v2.7.0 in central/client role to write data into a characteristic on a peer device. 
 I&amp;#39;ve seen that the function bt_gatt_write() automatically uses the prepare-/execute-write-requests when an offset is used or the data</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Nov 2024 14:58:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116281/gatt-prepare-execute-write-with-ncs" /><item><title>RE: GATT prepare/execute write with NCS</title><link>https://devzone.nordicsemi.com/thread/510150?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 14:58:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fe6220e-d5e2-4daa-b494-a32eb11f7bb6</guid><dc:creator>Remo</dc:creator><description>&lt;p&gt;No problem. Thanks for your answer and the workaround.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GATT prepare/execute write with NCS</title><link>https://devzone.nordicsemi.com/thread/510103?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 12:41:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:222463f4-633c-4b67-868f-a57cfece3ca8</guid><dc:creator>Emil Lenngren</dc:creator><description>&lt;p&gt;Even though it would be possible with a multi-handle prepare/execute write using the ATT protocol, there is no such defined method in the GATT standard using normal writes, as a client. This is only possible with so called &amp;quot;Reliable Writes&amp;quot; but in order to use these the characteristics must have the &amp;quot;Reliable Write&amp;quot; property enabled in their declaration. Zephyr doesn&amp;#39;t support this feature as a client as far as I can see. In any case, it is a relatively inefficient method to transfer data using prepare/execute writes because all data is echoed back before committing. I would suggest to simply use a longer MTU instead which is nowadays supported on all popular platforms.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GATT prepare/execute write with NCS</title><link>https://devzone.nordicsemi.com/thread/510099?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 12:23:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d2f13ae-baa3-43ac-bba2-4472bb1ea0e3</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I am sorry, I had to delete my previous reply and sorry for making your comment hang in there. I was wrong as the functions I mentioned were not publicly available to the application in the newer version of the sdk.&amp;nbsp;the functions I mentioned aren’t available in the newer SDK version for direct use in applications. &lt;code&gt;bt_gatt_write()&lt;/code&gt; does indeed handle cases where the data size exceeds the MTU by leveraging prepare and execute requests, but it doesn’t allow grouping multiple writes across different handles in a single transaction.&lt;/p&gt;
&lt;p&gt;If you need to work with multiple handles like this, One option is to set up your application to handle each &lt;code&gt;bt_gatt_write()&lt;/code&gt; call in sequence—one per handle—and then wait for each write&amp;#39;s callback to confirm completion before moving to the next. This would give you a managed sequence of writes, even though they’re individual transactions. This sounds like a compromise but an option nevertheless.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GATT prepare/execute write with NCS</title><link>https://devzone.nordicsemi.com/thread/510063?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 10:17:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dd218c4-79cd-496c-94f3-f49309cd4113</guid><dc:creator>Remo</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Thank you for your fast answer.&lt;/p&gt;
&lt;p&gt;In which source/header file can I find the functions&amp;nbsp;&lt;code&gt;bt_gatt_write_prepare()&lt;/code&gt; and&amp;nbsp;&lt;code&gt;bt_gatt_execute_write()&lt;/code&gt;? I didn&amp;#39;t find them in gatt.c/h.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GATT prepare/execute write with NCS</title><link>https://devzone.nordicsemi.com/thread/510045?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 08:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:474adc40-a0ee-4836-9a15-23aae6373eb6</guid><dc:creator>Susheel Nuguru</dc:creator><description>[deleted]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>