<?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>Only two correct bytes when for read and notify as BLE central</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52597/only-two-correct-bytes-when-for-read-and-notify-as-ble-central</link><description>I am trying to read (the report map) and receive notifications (the report) from an HID device as a BLE central. The bonding process has been completedsuccessfully to my knowledge. When using sd_ble_gattc_read(), only the first two bytes of the response</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Oct 2019 15:34:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52597/only-two-correct-bytes-when-for-read-and-notify-as-ble-central" /><item><title>RE: Only two correct bytes when for read and notify as BLE central</title><link>https://devzone.nordicsemi.com/thread/213723?ContentTypeID=1</link><pubDate>Mon, 07 Oct 2019 15:34:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6bf8982-ee0a-460e-b2cc-67b287f99da2</guid><dc:creator>xudongz</dc:creator><description>&lt;p&gt;It turns out that the problem is saving/copying &lt;code&gt;p_ble_evt-&amp;gt;evt.gattc_evt.params.read_rsp&lt;/code&gt; as a variable. The solution was to store a pointer (or just accessing the data directly via &lt;code&gt;p_ble_evt-&amp;gt;evt.gattc_evt.params.read_rsp.data&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ble_gattc_evt_read_rsp_t *resp = &amp;amp;p_ble_evt-&amp;gt;evt.gattc_evt.params.read_rsp;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only two correct bytes when for read and notify as BLE central</title><link>https://devzone.nordicsemi.com/thread/212059?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 12:37:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d65abd1d-b0e2-4708-a8df-d092d36921cd</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am a bit confused from your explanation and your snippets. You say that you want to use notifications, and you refer to the ble_nus_c service (which uses notifications). Notifications is something other than read. Did you test the ble_app_uart and ble_app_uart_c examples together? Does that work? Notifications will trigger an event at the central, which you can use to receive the data, and it is in general a bit easier to work with than the &lt;span&gt;sd_ble_gattc_read().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I also get the impression that you try to use queued write, or long write. Is that correct? And is that intentional?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you need to use write and&amp;nbsp;sd_ble_gattc_read(), is there a reason for this, and how do you write this in your peripheral?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sorry that I don&amp;#39;t have an exact answer, but I need to nest up in a few things first, so that we are on the same page.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>