<?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 could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11473/how-could-nordic-received-large-byte-from-phone</link><description>Hi there, 
 How could I receive a large data from phone, example 120 bytes from a characteristic. So far I was able to receive 20 bytes. 
 From the working code of 20 bytes, I modified it so that it would receive a maximum data of sizeof(uint8_t) and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Feb 2016 08:51:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11473/how-could-nordic-received-large-byte-from-phone" /><item><title>RE: How could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/thread/43311?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2016 08:51:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02a1d069-6d5a-498b-be42-d648ab397adf</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Great! Happy to help :) I would appreciate if you could mark the answer as correct by clicking the check-mark in a small circle to the left of the answer.
-Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/thread/43312?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2016 08:31:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cb6d3c2-b91d-4866-a2bb-29ead0bc4f67</guid><dc:creator>mc</dc:creator><description>&lt;p&gt;Hi Bjørn,&lt;/p&gt;
&lt;p&gt;I was able to integrate the code you gave to my own project and it works. Thank you very much.&lt;/p&gt;
&lt;p&gt;-Mc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/thread/43310?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2016 13:57:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b2e28f8-e9a5-4e2c-925e-5b74bbdae164</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi MC, I apologize for my late reply. I have added a zipped version of SDK v9.0 to the answer, where I have modified the ble_app_hrm example to support long writes. In the example the long characteristic is 40 bytes, but you can modify it to be 120 bytes, just make sure that the &lt;code&gt;QUEUED_WRITE_BUFFER_SIZE&lt;/code&gt; is larger than the characteristic by about 30 bytes( due to overhead ). You know where to find me if you have any questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/thread/43309?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2016 13:55:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e653f7f-a790-4266-89f1-f5dce27e9899</guid><dc:creator>mc</dc:creator><description>&lt;p&gt;Hi Bjørn,&lt;/p&gt;
&lt;p&gt;Still I can find any data when executing the sd_ble_gatts_value_get() in the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST{EXEC_WRITE_NOW}.&lt;/p&gt;
&lt;p&gt;I found some code in long write &lt;a href="https://github.com/NordicSemiconductor/ble_app_hrs---LongWrite"&gt;github.com/.../ble_app_hrs---LongWrite&lt;/a&gt;. This does not follow the MSG sequence but I can get the data in BLE_GATTS_EVT_WRITE.&lt;/p&gt;
&lt;p&gt;When trying to update the example HRM code of S310 from the long write examplem, this will follow the MSG but I can&amp;#39;t get the data.&lt;/p&gt;
&lt;p&gt;Is there anything I miss to configure to get the the data written to nordic chip.&lt;/p&gt;
&lt;p&gt;Thanks,
mc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/thread/43308?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2016 13:27:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17f719af-2eac-4679-b6df-b5ca469d7e91</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Oh, I am sorry, I thought that you wanted the peripheral to either read/write to a characteristic not the other way around. Disregard what I have been writting about sd_ble_gattc_write and sd_ble_gattc_read. It is pretty much as shown in the MSC: When the phone or MCP performs a long write to the characteristic where you want to store the data, you will get the &lt;code&gt;BLE_EVT_USER_MEM_REQUEST&lt;/code&gt; event from the SD, to which you reply &lt;code&gt;sd_ble_user_mem_reply()&lt;/code&gt;. After replying you will get the &lt;code&gt;BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST{PREP_WRITE_REQ}&lt;/code&gt; event, to which you reply using &lt;code&gt;sd_ble_gatts_rw_authorize_reply()&lt;/code&gt; . Then you will get the &lt;code&gt;BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST{EXEC_WRITE_NOW}&lt;/code&gt; to which you reply &lt;code&gt;sd_ble_gatts_value_set()&lt;/code&gt;. The value is now in your Attribute table and can be retrieved using &lt;code&gt;sd_ble_gatts_value_get()&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/thread/43307?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2016 09:57:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9e3c504-d308-4e1d-ad04-795867f2b2d1</guid><dc:creator>mc</dc:creator><description>&lt;p&gt;Hi Bjorn,&lt;/p&gt;
&lt;p&gt;Thank you for following me.&lt;/p&gt;
&lt;p&gt;In this stage, I want to read the 120 bytes that the phone or the MCP for windows writes to the Nordic chip.    After I press the Write long from MCP I receive the BLE_EVT_USER_MEM_REQUEST and the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST. Till then, I don&amp;#39;t know where to place the sd_ble_gattc_read().&lt;/p&gt;
&lt;p&gt;I tried to place it on the BLE_GATTS_OP_PREP_WRITE_REQ and/or the BLE_GATTS_OP_EXEC_WRITE_REQ_NOW under the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST and MCP will terminate because of  BTLE_CONNECTION_TIMEOUT.&lt;/p&gt;
&lt;p&gt;Will you please elaborate further on of how I get the data using as what you suggested.&lt;/p&gt;
&lt;p&gt;Thanks,
-mc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/thread/43306?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2016 13:28:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5928a018-8bc7-44ee-8473-2a8a92c2ec12</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;The handle, offset and value passed to &lt;code&gt;sd_ble_gatts_value_set()&lt;/code&gt; are identical to those passed during the &lt;code&gt;ATT Prepare Write Request&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;However, I think I may have referred you to the wrong function if you want to read the characteristic data from a phone using a nordic chip, you should use &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.0/group___b_l_e___g_a_t_t_c___f_u_n_c_t_i_o_n_s.html?cp=2_7_2_1_0_2_2_4_7#ga813daa5810a1d2ed31d2d6fe49d3ef11"&gt;sd_ble_gattc_read()&lt;/a&gt; instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/thread/43305?ContentTypeID=1</link><pubDate>Sat, 23 Jan 2016 09:37:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:176aa6b4-9f8f-4a59-ba4b-78cc04c6658c</guid><dc:creator>mc</dc:creator><description>&lt;p&gt;Hi Bjorn,&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;My problem now is on how to get the data from phone to nordic app. I am bit confused on the the message sequence chart.&lt;/p&gt;
&lt;p&gt;If I choose the BLE_GATTS_VLOC_USER, I can see any data on attr_char_value.p_value (I guest it would be there?), and if I choose the BLE_GATTS_VLOC_STACK where could I find the handle, offset and peer values.
&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s130.api.v1.0.0%2Fgroup___b_l_e___g_a_t_t_s___q_u_e_u_e_d___w_r_i_t_e___n_o_b_u_f___n_o_a_u_t_h___m_s_c.html&amp;amp;cp=2_7_2_1_1_2_3_0_8"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I also tried to set the NULL and user memory block of sd_ble_user_mem_reply but still I am empty handed.&lt;/p&gt;
&lt;p&gt;Sorry for the confusion, I am still new on BLE development.&lt;/p&gt;
&lt;p&gt;Regards,
-mc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/thread/43304?ContentTypeID=1</link><pubDate>Fri, 22 Jan 2016 14:50:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6c4748e-1a1f-47ab-9ba5-88df498f0a92</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You can use long writes to write to characteristics that are larger than 20 bytes, please see
&lt;a href="https://devzone.nordicsemi.com/question/155/writing-more-than-20-bytes-at-a-time-to-a-characteristic/?answer=158#post-id-158"&gt;this&lt;/a&gt; post and the documentation of &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.0/group___b_l_e___g_a_t_t_c___f_u_n_c_t_i_o_n_s.html#ga90298b8dcd8bbe7bbe69d362d1133378"&gt;sd_ble_gattc_write&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/155/writing-more-than-20-bytes-at-a-time-to-a-characteristic/?answer=158#post-id-158"&gt;This&lt;/a&gt; Message Sequence Chart(MSG) may also be helpful.&lt;/p&gt;
&lt;p&gt;-Bjørn&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Modified version of SDK v9.0 where the ble_app_hrs example has been modified to support  long writes to the heart rate measurement characteristic.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nRF51_5F00_SDK_5F00_v9_5F00_0.zip"&gt;nRF51_SDK_v9_0.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could Nordic received large byte from phone</title><link>https://devzone.nordicsemi.com/thread/43303?ContentTypeID=1</link><pubDate>Fri, 22 Jan 2016 11:40:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:925b71cb-fa18-4edb-8c79-13abf3cc5ba1</guid><dc:creator>mc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I would like to have a follow-up my problem. I was able to configure my code to response to BLE_EVT_USER_MEM_REQUEST and BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST, but still I am not able to get BLE GATT WRITE EVENT.&lt;/p&gt;
&lt;p&gt;Will someone give me some idea why.&lt;/p&gt;
&lt;p&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;-mc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>