<?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>pc-ble-driver: sd_ble_gattc_read() why length is (ATT-1) instead (ATT-3) ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49501/pc-ble-driver-sd_ble_gattc_read-why-length-is-att-1-instead-att-3</link><description>Hi I use nrf-ble-driver ver.4.1.1 with PCA10031 dongle (nRF51844 chip on board) and &amp;quot;connectivity_4.1.1_1m_with_s130_2.0.1.hex&amp;quot; firmware for that dongle. in this case ATT_MTU = 23. In description of function sd_ble_gattc_read() says: &amp;quot;If the Characteristic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Jul 2019 21:33:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49501/pc-ble-driver-sd_ble_gattc_read-why-length-is-att-1-instead-att-3" /><item><title>RE: pc-ble-driver: sd_ble_gattc_read() why length is (ATT-1) instead (ATT-3) ?</title><link>https://devzone.nordicsemi.com/thread/197233?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 21:33:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00bc1f45-c52b-4e3d-acb4-4f8fafb4fe3d</guid><dc:creator>Vyacheslav Lebets</dc:creator><description>&lt;p&gt;Excellent and every useful!&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver: sd_ble_gattc_read() why length is (ATT-1) instead (ATT-3) ?</title><link>https://devzone.nordicsemi.com/thread/197232?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 21:22:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0607b30f-cd9d-408d-b073-950799a993a9</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;I added these comments to my code to illustrate, might be useful:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// |&amp;lt;-------------------------------------------- Slave -&amp;gt; Master Data Packet --------------------------------------&amp;gt;|
// |                                                                                                                 |
// +-----------------------------------------------------------------------------------------------------------------+
// |                                            BLE Data Packet Min/Max/eg(186)                                      |
// +-----------------------------------------------------------------------------------------------------------------+
// |                                     1MHz: 10/265/217 octets, 2MHz: 11/266/218 octets                            |
// +----------+--------+--------------------------------------------------------------------------------------+------+
// |          | Access |                                                                                      |      |
// | Preamble | Address|         Protocol Data Unit PDU                                                       | CRCC |
// +----------+--------+--------------------------------------------------------------------------------------+------+
// |   1 (2)  |    4   |                                                   2-257                              |  3   |
// |          |        +-----------+------------------------------------------------------------------+-------+      |
// |          |        | LL Header |  Payload                                                         |  MIC  |      |
// |          |        +-----------+------------------------------------------------------------------+ (opt) |      |
// |          |        |   2       |                                       0-251                      |   4   |      |
// |          |        |           +--------+---------------------------------------------------------+       |      |
// |          |        |           | L2CAP  |                                                         |       |      |
// |          |        |           | Header |  ATT Data                                               |       |      |
// |          |        |           +--------+---------------------------------------------------------+       |      |
// |          |        |           |   4    |                              0-247                      |       |      |
// |          |        |           |        +-----+-------+-------------------------------------------+       |      |
// |          |        |           |        | ATT | ATT   |                                           |       |      |
// |          |        |           |        | Op  | Attrib|  ATT Payload                              |       |      |
// |          |        |           |        +-----+-------+-------------------------------------------+       |      |
// |  1 (2)   |   4    |  2        |   4    |  1  |  2    |                0-244                      |  (4)  |  3   |
// +----------+--------+-----------+--------+-----+-------+-------------------------------------------+-------+------+
//                                                        /                                           \
//                                                      /                                               \
//                                                    /                                                   \
//                                                  /                                                       \
//                                                /                                                           \
//                                              /                                                               \
//                                            |&amp;lt;---------------------- eg Payload 186 bytes ---------------------&amp;gt;|
//
//
// Preamble is 1 byte for LE 1MHz (BLE 4.2) and 2 bytes for 2MHz (BLE 5.0). If the first bit of the ADDRESS is 0 the preamble
// will be 0xAA otherwise 0x55.
// The MIC field is optional used when we are using an encrypted connection&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver: sd_ble_gattc_read() why length is (ATT-1) instead (ATT-3) ?</title><link>https://devzone.nordicsemi.com/thread/197228?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 19:53:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24f906d8-6101-4d8c-9ae0-1bca223d38de</guid><dc:creator>Vyacheslav Lebets</dc:creator><description>&lt;p&gt;I will answer myself, maybe someone will help:&lt;/p&gt;
&lt;p&gt;In core spec. Vol.3 Part F, 3.4.4.6 &amp;quot;Read BLob Responce&amp;quot; in Table 3.2 we see format of response packet and really attribute value = att_mtu-1 because service data (opcode) have len = 1.&lt;br /&gt;&lt;br /&gt;And about notification: &lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;In core spec. Vol.3 Part F, 3.4.7.1 &amp;quot;Handle Value Notification&amp;quot;&lt;/span&gt; in Table 3.34 we see that service data have 3 bytes len &lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;(opcode - 1byte&amp;nbsp; and handle - 2 bytes)&lt;/span&gt;. And&amp;nbsp;If the attribute value is longer than (ATT_MTU-3) octets, then only the first (ATT_MTU-3) octets of this attributes value can be sent in a notification.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>