<?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>Which event should be triggered by a &amp;quot;write&amp;quot; operation?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14073/which-event-should-be-triggered-by-a-write-operation</link><description>Hi all! I have an application where i perform a &amp;quot;write command&amp;quot; with a device on the characteristic value of another device (client). I want on the client that when it receives an array of values by the write operation, to make something else, like sending</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 May 2016 12:17:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14073/which-event-should-be-triggered-by-a-write-operation" /><item><title>RE: Which event should be triggered by a "write" operation?</title><link>https://devzone.nordicsemi.com/thread/53815?ContentTypeID=1</link><pubDate>Thu, 26 May 2016 12:17:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6837982-a994-4bce-b59e-57adca21deb8</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;The server has the data, the client accesses this data. The client can write data to the server, or read data from the server.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which event should be triggered by a "write" operation?</title><link>https://devzone.nordicsemi.com/thread/53814?ContentTypeID=1</link><pubDate>Thu, 26 May 2016 08:29:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93b684cf-a73d-4b03-a92d-6df15e9ec9a8</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;It seems to work fine, thanks! But i would like to have a clarification, the sever should be the one sending data and the client the one receiving data, correct? So why is the server in this case the one who performs the write, since it is SENDING some data, and the other device is receiving it? Aren&amp;#39;t the role swapped?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which event should be triggered by a "write" operation?</title><link>https://devzone.nordicsemi.com/thread/53812?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 14:33:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e7fedd7-0f83-46a9-973b-9643e0766065</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;thanks, i will try tomorrow and report back!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which event should be triggered by a "write" operation?</title><link>https://devzone.nordicsemi.com/thread/53811?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 13:58:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e341f172-eb23-4943-9f8c-face49fb0aad</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;It should be something like p_ble_evt-&amp;gt;evt.gatts_evt.params.write.data[x]&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which event should be triggered by a "write" operation?</title><link>https://devzone.nordicsemi.com/thread/53813?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 13:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce8a9bed-cbf2-4564-936f-3f7ff5f76d47</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;Ok sorry, i wrongly called the server client. I think the problem is the values that i am passing to the case BLE_GATTS_EVT_WRITE, because now i managed to make it enter there when the other device performs a write, but it doesn&amp;#39;t do what i want! I posted the code of my service; as you can see, in ble_our_service_on_ble_evt i put the case BLE_GATTS_EVT_WRITE, stating that if a particular byte of the considered characteristic value is not zero, it should toggle a led (of course this doesn&amp;#39;t happen). The problem is that, in my opinion, i don&amp;#39;t pass the value correctly to the if statement. Can you suggest me ho, syntactically speaking, i refer to the characteristic value in that case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which event should be triggered by a "write" operation?</title><link>https://devzone.nordicsemi.com/thread/53810?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 12:31:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a17a762-661b-47b2-a08e-52b4616ba510</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;A client doesn&amp;#39;t receive write commands, it sends them. A server receives write commands.&lt;/p&gt;
&lt;p&gt;If a client sends a write command to a server you will receive the BLE_GATTS_EVT_WRITE event. Receiving this shouldn&amp;#39;t cause a disconnection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>