<?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>Cannot write to more than one characteristic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75687/cannot-write-to-more-than-one-characteristic</link><description>Greetings, 
 
 I have two nRF52840&amp;#39;s where one is modeled as a peripheral and the other as a central. I have created a custom service and characteristics on the peripheral and can connect and read and write. However, I can perform one write and not more</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Jun 2021 20:33:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75687/cannot-write-to-more-than-one-characteristic" /><item><title>RE: Cannot write to more than one characteristic</title><link>https://devzone.nordicsemi.com/thread/312977?ContentTypeID=1</link><pubDate>Tue, 01 Jun 2021 20:33:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bdf10d4-d13b-4c45-b54b-656283b990d8</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Work queue should work, but you can also check out&amp;nbsp;handling of&amp;nbsp;&lt;span&gt;bt_gatt_write() here:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/software/posts/building-a-ble-application-on-ncs-sdk---contrasting-to-softdevice-based-ble-applications---part-2-central-role"&gt;https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/software/posts/building-a-ble-application-on-ncs-sdk---contrasting-to-softdevice-based-ble-applications---part-2-central-role&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(Edit: Fixed the link)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot write to more than one characteristic</title><link>https://devzone.nordicsemi.com/thread/312549?ContentTypeID=1</link><pubDate>Mon, 31 May 2021 07:44:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a563762-8ae0-4592-9d77-6513b86ef90b</guid><dc:creator>Jonas Lien</dc:creator><description>&lt;p&gt;Alright, so I didn&amp;#39;t get any further trying to sequentially use bt_gatt_write, but it worked once I wrapped it into a work item and placed it on a work queue. Is this the preferred way to do it, or do you have other best practices for writing to multiple characteristics / multiple times to the same one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot write to more than one characteristic</title><link>https://devzone.nordicsemi.com/thread/312215?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 20:09:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9917ce7-281c-4262-add7-dc8b54bbb014</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Both write request and write commands are acknowledged and retransmissted on the link layer, the only difference is really that&amp;nbsp;write request also require an acknowledgement from the application on the peer. I have not see any lost packets from either really.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It should be possible to write to a different characteristic while waiting yes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot write to more than one characteristic</title><link>https://devzone.nordicsemi.com/thread/312178?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 15:21:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b20eeb3e-8cb0-4c47-bd76-b294a5ecf73b</guid><dc:creator>Jonas Lien</dc:creator><description>&lt;p&gt;To add onto previous statement: if bt_gatt_write_without_response() is the option for a command, then that is sadly not feasible for our application. However, it should be possible to write to more than only one characteristic once per connection while still getting write acknowledgements from bt_gatt_write, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot write to more than one characteristic</title><link>https://devzone.nordicsemi.com/thread/312112?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 13:08:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edd84aae-d9df-4301-aaff-d70cdb6e3532</guid><dc:creator>Jonas Lien</dc:creator><description>&lt;p&gt;Thanks for your quick reply, Kenneth.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you mean that zephyrs bt_gatt_write is a write request and another function is a write command? Or have I misunderstood you?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Jonas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot write to more than one characteristic</title><link>https://devzone.nordicsemi.com/thread/312086?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 12:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:864709c5-1d46-49da-ad1b-f90bfd2bbb27</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You can try to use nRF Connect for Desktop as peer device (e.g. central here) while debugging. I suspect in this case that you are doing an write request, this needs to be handled in the peer before next write request can be executed. If you use write command instead then you avoid this.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>