<?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>Unable to write to peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7539/unable-to-write-to-peripheral</link><description>Hi, 
 I use sd_ble_gattc_write function to write to my peripheral with my central device. I&amp;#39;m sure the settings should be right but i still can&amp;#39;t see any change on peripheral. If i connect with my mobile app i can write normally. 
 Peripheral is write</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Jun 2015 12:08:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7539/unable-to-write-to-peripheral" /><item><title>RE: Unable to write to peripheral</title><link>https://devzone.nordicsemi.com/thread/26863?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2015 12:08:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20db1df6-fc55-431a-878d-9ab723ef620c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@nejcokle: please create separate cases for different questions. Your question on just work pairing is not quite related to the original question.&lt;/p&gt;
&lt;p&gt;If you have fixed the issue, please accept the answer from Carles or create your own answer that explain how you solved it.&lt;/p&gt;
&lt;p&gt;This would help other member if they face the same issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to write to peripheral</title><link>https://devzone.nordicsemi.com/thread/26862?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2015 10:22:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0de59c20-31a7-4004-a971-34165301ed0c</guid><dc:creator>nejcokle</dc:creator><description>&lt;p&gt;I figured out what&amp;#39;s probably the problem.How can i set up just works pair method?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to write to peripheral</title><link>https://devzone.nordicsemi.com/thread/26861?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2015 10:09:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0af3d1cc-ac67-496d-9740-ed9c99c33e68</guid><dc:creator>nejcokle</dc:creator><description>&lt;p&gt;I modefied my peripheral to be write and not write with no response. I use WRITE_REQ but i get handle 0x39 (BLE_GATTC_EVT_TIMEOUT). if i use gatt status in this response i get 0x0001 (BLE_GATT_STATUS_UNKNOWN )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to write to peripheral</title><link>https://devzone.nordicsemi.com/thread/26860?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2015 08:47:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:405a2290-ab8f-48fe-9b8f-65b487a1b426</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;If you write with a WRITE_REQ from the nRF51, what do you get as an error code in the response? see my previous comment, you should check gatt_status in the response event&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to write to peripheral</title><link>https://devzone.nordicsemi.com/thread/26859?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2015 07:25:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ef29d9c-e331-48c8-98fe-c2c9922f7a45</guid><dc:creator>nejcokle</dc:creator><description>&lt;p&gt;Is there a way to check if handle value is correct? It should be, but since i tried everything (even checking the peripheral) i&amp;#39;m not so sure anymore...&lt;/p&gt;
&lt;p&gt;EDIT:
I am 100% sure handle is right, i used dongle to check. I still can&amp;#39;t write with my central module, but can write with my smartphone as central just fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to write to peripheral</title><link>https://devzone.nordicsemi.com/thread/26858?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2015 13:41:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f2fdf78-0a62-4994-a7fe-fa2b22c018fb</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;If you are sure the handle is correct and the call to sd_ble_gattc_write() returns NRF_SUCCESS then the only item remaining to analyze is your peripheral. Have you tried using BLE_GATT_OP_WRITE_REQ and then waiting for a BLE_GATTC_EVT_WRITE_RSP event? inside that event the gatt_status should tell you if the write was performed correctly or not. Maybe you need to bond first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to write to peripheral</title><link>https://devzone.nordicsemi.com/thread/26857?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2015 13:36:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50935bf8-a0e1-4ed7-a0da-80b493dc8569</guid><dc:creator>nejcokle</dc:creator><description>&lt;p&gt;I tried with BLE_GATT_OP_WRITE_CMD too, but i still can&amp;#39;t write to my peripheral.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to write to peripheral</title><link>https://devzone.nordicsemi.com/thread/26856?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2015 12:02:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:712cba06-5b30-41f5-9142-977748fb4983</guid><dc:creator>Carles</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;Peripheral is write with no response only.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In that case you should be using:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BLE_GATT_OP_WRITE_CMD
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;instead of:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BLE_GATT_OP_WRITE_REQ
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Carles&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>