<?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>How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8758/how-do-i-do-sample-data-write-from-central-to-peripheral-device-via-write_req</link><description>Hi, 
 I&amp;#39;m using Central multilink peripheral example to get connected with Our Custom Peripheral App (iOS). I&amp;#39;m able to receive the data from Peripheral device, Now i need to SEND the data to peripheral App. 
 Can someone suggest me an example from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Apr 2016 12:58:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8758/how-do-i-do-sample-data-write-from-central-to-peripheral-device-via-write_req" /><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32104?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2016 12:58:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f2f5fa8-4c9f-4a37-ac0e-ceec85004cc1</guid><dc:creator>Ankit</dc:creator><description>&lt;p&gt;Hi Brajesh, to send the data to iOS peripheral, do not use cccd_handle. Use handle_value.&lt;/p&gt;
&lt;p&gt;e.g. write_params.handle   = gp_client-&amp;gt;srv_db.services[0].charateristics[index].characteristic.handle_value;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32119?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2015 15:55:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffa3c7b1-9fa8-4dec-bd6e-a0f9968cfd04</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;I see a problem here.&lt;/p&gt;
&lt;p&gt;I need to do 34 writes continuously back to back to iPhone. but there is huge delay in writing.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m storing 34 packets received from Peripheral and then later i am sending it to another iPhone Peripheral. I&amp;#39;m calling write_string API 34 times but each time it takes time to get the write_rsp.&lt;/p&gt;
&lt;p&gt;Do i have to any other way to do these many packet transfers ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32120?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2015 15:47:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82d0803a-27e9-47f4-b0f1-c2b320b68f81</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;Thanks Petter, it worked after changing the handle, I was using CCCD_Handle&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32118?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 19:58:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9d83077-2866-4aa6-ba55-33a706b3b32c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Where did I suggest that? I suggested to examine ble_uart_c_write_string(). It uses p_ble_uart_c-&amp;gt;TX_handle; as handle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32117?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 17:58:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3686999-92b4-4719-9e61-5019e4a46b39</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;Petter , I&amp;#39;m using variable called cccd_handle which is extracted in db_discovery_evt_handle.
Also the API you suggested use cccd_handle not attribute_handle as parameter.&lt;/p&gt;
&lt;p&gt;Am I missing something in here? ?&lt;/p&gt;
&lt;p&gt;And iOS peripheral device is tested with another same iOS App acting as Central and write was working fine with that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32116?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 13:58:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf283bd1-d407-4d4e-bf82-514aaf36ed92</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;It means &amp;quot;The attribute handle given was not valid on this server.&amp;quot; It could be that you are trying to write to the CCCD, which doesn&amp;#39;t exist if you remove the notify type.  Are you sure you are using attribute handle of the characterisitic value? Not the attribute handle of the CCCD? Have you tested your iOS peripheral with another central application? For example Master Control Panel for PC, or nRF Master Control Panel for Android?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32115?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 12:40:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea291d5e-be1f-46f3-9c71-f5d7daf8f9c1</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;The characteristic I&amp;#39;m writing is having type &amp;quot;notify and write&amp;quot; both in peripheral, when we removed this &amp;quot;notify&amp;quot; type and then tried writing GATT_STATUS is 0x101 which is &amp;quot;Invalid Attribute Handle&amp;quot;.&lt;/p&gt;
&lt;p&gt;Does this ring any alarm for you ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32114?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 12:29:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b2d794e-8900-4fb3-b09f-810370aa2dbc</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;The error responses are listed in Vol. 3, Part F, Section 3.4.1.1 in the Bluetooth Core. F5 is used by Common Profile and Service Error Codes. In the referred CSS it is listed as &amp;quot;Reserved for Future Use&amp;quot;. So I don&amp;#39;t know when/why iOS gives this error response. I couldn&amp;#39;t find any documentation. I need to look into this further, please let me know if you have any updates.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32113?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 12:07:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5468c075-829f-4327-a142-11b533e24542</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;Also Petter i have checked  p_ble_evt-&amp;gt;evt.gattc_evt.gatt_status  in EVT_WRITE_RSP and it shows 0x01F5 which is not listed. Do you have any idea about it ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32112?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 11:55:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fdf6d8d-a00f-47cb-84d4-2d8e64c7ebf0</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;the return code of sd_ble_gattc_write() API is NRF_SUCCESS. Are you looking for something else ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32111?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 11:51:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0071f71-6306-4782-923a-46f1a41333a6</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What is the GATT status of the event? BLE_GATT_STATUS_SUCCESS (0x0000)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32110?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 11:41:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bb4d25d-d41f-463a-b571-8d62c4be1b44</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;Yes Petter I do get evt_write_rsp after writing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32109?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 10:55:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2ff337b-9b18-4961-a1ae-9bd5af77dbbe</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If iOS for some reason doesn&amp;#39;t accept the write request I would expect it to at least return an error. Could you examine the BLE_GATTC_EVT_WRITE_RSP event after you write? Please see this &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v1.0.0/group___b_l_e___g_a_t_t_c___v_a_l_u_e___w_r_i_t_e___m_s_c.html?cp=2_7_2_1_0_2_2_0_7"&gt;MSC&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32108?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 10:45:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf970933-2864-4c79-9cb2-de42a949cd7e</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;Thanks Petter,&lt;/p&gt;
&lt;p&gt;I see a problem here. I&amp;#39;m trying to use the same API to write data to Peripheral. For that i needed, cccd_handle and connection handle that i extracted after connecting with iPhone peripheral.&lt;/p&gt;
&lt;p&gt;Initially i was getting error no 17(BUSY) , but now i get &amp;quot;READ/WRITE API Returns Success log&amp;quot; though the iOS App doesn&amp;#39;t get anything at all.&lt;/p&gt;
&lt;p&gt;To validate the API, i tried to write on nRF Peripheral device instead of iPhone App. There i get EVT_WRITE twice (Once for notif_enable from Central and second for sample data write from Central) and i am able to read it on nRF peripheral device.&lt;/p&gt;
&lt;p&gt;But iPhone App doesn&amp;#39;t get any data.&lt;/p&gt;
&lt;p&gt;Is there any different configuration to do the transfer with iPhone Peripheral device ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32107?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2015 15:21:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2510e86a-7b36-41f6-978d-e0decd6321e9</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;There is a project file there. ble_app_uart_c/pca10028/s120/arm5_no_packs/ble_app_uart_c_s120_pca10028.uvoptx. I recommend downloading the SDK 8.0.0 zip, and try it out. If you get into trouble, please edit/update your question with more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32106?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2015 13:54:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22067c2f-78fe-4aef-8494-adba253018a2</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;Thanks Petter for the update and I&amp;#39;m sure this would help. But this example is using S120, I guess this is not gonna make any difference.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t see any project file in that git.. hard to checkout API&amp;#39;s.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32105?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2015 12:50:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26d03de9-4c21-4752-bb77-e96abf65f104</guid><dc:creator>Brajesh</dc:creator><description>&lt;p&gt;Thanks Petter, I think you got it reverse, iOS is acting as Peripheral and Nordic device would be Central. while in nRF UART app Nordic device is peripheral and App is Central.
So i need to look at how do i write data to Peripheral iOS. Any suggestions for Central example which could write  ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I do Sample Data write from Central to Peripheral device via WRITE_REQ</title><link>https://devzone.nordicsemi.com/thread/32103?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2015 12:38:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b3cb6e4-a7a8-4235-a1a0-c76ae4ae40fa</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You should have a look at nRF UART for iOS, source code available &lt;a href="https://www.nordicsemi.com/eng/Products/nRFready-Demo-Apps/nRF-UART-App2#Downloads"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the peripheral part you should have a a look at tx_char_add() in ble_app_uart.&lt;/p&gt;
&lt;p&gt;You should set&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;char_md.char_props.write         = 1;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;attr_md.write_perm);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Edit 17.08.2015: Sorry, I was a bit quick on the trigger there.&lt;/p&gt;
&lt;p&gt;I recommend having a look at ble_app_uart_c. Available on Github &lt;a href="https://github.com/NordicSemiconductor/ble_app_uart_c_S120"&gt;here&lt;/a&gt;. More specifically ble_uart_c_write_string()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>