<?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 can I read the payload data sent from service?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19040/how-can-i-read-the-payload-data-sent-from-service</link><description>I am using the nRF52840 Preview DK with BLE 5.0. In the BLE ATT_MTU Throughput Example,I use several api such as sd_ble_gatts_value_get and so on,but i still can not read the correct data. How can I read the payload data correctly with a correct api?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Jan 2017 13:34:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19040/how-can-i-read-the-payload-data-sent-from-service" /><item><title>RE: How can I read the payload data sent from service?</title><link>https://devzone.nordicsemi.com/thread/73608?ContentTypeID=1</link><pubDate>Wed, 18 Jan 2017 13:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f397c088-4c20-4e00-a588-5d8bfb2e4ed8</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi zway,&lt;/p&gt;
&lt;p&gt;Sorry that I didn&amp;#39;t notice we don&amp;#39;t handle the data inside that function (because it&amp;#39;s not needed for the throughput test as data is simply dummy data).&lt;/p&gt;
&lt;p&gt;You can then access the data in the notification event from the softdevice BLE_GATTC_EVT_HVX. In atmc.c it&amp;#39;s handled in on_hvx() and you can access the data in p_ble_evt-&amp;gt;evt.gattc_evt.params.hvx.data.&lt;/p&gt;
&lt;p&gt;The length of the array is in p_ble_evt-&amp;gt;evt.gattc_evt.params.hvx.len&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I read the payload data sent from service?</title><link>https://devzone.nordicsemi.com/thread/73609?ContentTypeID=1</link><pubDate>Wed, 18 Jan 2017 01:10:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d36dcca-d2de-40eb-a28d-53b02465018c</guid><dc:creator>zway</dc:creator><description>&lt;p&gt;I have carefully looked at the example .On the NRF_BLE_AMT_C_EVT_NOTIFICATION branch,it  just counts how many bytes the client have received and give a callback to the service finally. But it didn&amp;#39;t use an api to get the data and store into buffer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I read the payload data sent from service?</title><link>https://devzone.nordicsemi.com/thread/73607?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2017 13:56:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08dd5f3d-73ed-48e4-ae43-28e85f773580</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Zway,&lt;/p&gt;
&lt;p&gt;The way we send data in the example is the one connect to PC will be the peripheral and have a server. The other peer is central and has a client. The peripheral will send data to the central via notification from the server to the client.&lt;/p&gt;
&lt;p&gt;If you have a look at NRF_BLE_AMT_C_EVT_NOTIFICATION in amtc_evt_handler() you can find where the data is arrived and notified to the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>