<?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>Is this a bug in the nrf_ble_gatt in SDK 16 ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61046/is-this-a-bug-in-the-nrf_ble_gatt-in-sdk-16</link><description>Hi, 
 I found some thing not seems to be right in SDK 16. I wonder if this is intentional or a bug. Bluetooth 5 max MTU can be up to 512 bytes. I found the definitions in the structures bellow that MTU size is uint16_t but data length is uint8_t. This</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 May 2020 14:27:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61046/is-this-a-bug-in-the-nrf_ble_gatt-in-sdk-16" /><item><title>RE: Is this a bug in the nrf_ble_gatt in SDK 16 ?</title><link>https://devzone.nordicsemi.com/thread/248514?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 14:27:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84f838bd-6425-45c7-a941-9524314369d3</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Got ya! thanks. &amp;nbsp;I was confused about the fact that the data length was hardcoded&amp;nbsp;at 251. Now I know where that comes from. &amp;nbsp;I would make the define in the .h so the firmware can validate forehand instead of let the SDK causing an assert. and with a comment as the reason why.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this a bug in the nrf_ble_gatt in SDK 16 ?</title><link>https://devzone.nordicsemi.com/thread/248513?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 14:21:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f97a82a0-7915-4503-9828-59033841a268</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I haven&amp;#39;t noticed that the SD API used uin16_t. Maybe it would have made more sense to keep the same data type in the GATT module as well. I guess it was done to make it more clear what the actual range is. Anyway, the Softdevice will return an error if you try to enable it with data lenght support above 251.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this a bug in the nrf_ble_gatt in SDK 16 ?</title><link>https://devzone.nordicsemi.com/thread/248463?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 12:57:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5b70fbb-bb9d-420e-9ea3-f9d02fe09d39</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;oh, thanks for the explanation. &amp;nbsp;That&amp;#39;s weird&amp;nbsp;sd_ble_gap_data_length_update takes data length parameter as uint16_t.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this a bug in the nrf_ble_gatt in SDK 16 ?</title><link>https://devzone.nordicsemi.com/thread/248457?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 12:36:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f76300ce-77cc-4b3c-a455-8792c8b0ac50</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The length value will not overflow with the current implementation because neither the RADIO or Softdevice support data lengths above 251. Also, the max. length is 251 bytes according to the table in core spec 5, vol 6, part b, section 4.5.10&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this a bug in the nrf_ble_gatt in SDK 16 ?</title><link>https://devzone.nordicsemi.com/thread/248444?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 12:10:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5571cc9d-97ef-44b1-9703-472fb07ef837</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;I understand that the data length can be smaller than MTU. &amp;nbsp;The question is that this is supposed to be Bluetooth 5 compatible therefore the length could be up to 512 bytes. &amp;nbsp;The nrf_ble_gatt hardcoded a limit of 251 of Bluetooth 4.2, so an uint8_t is sufficient but 512 will not and cause length corruption. &amp;nbsp;Is this a bug and should be changed to uint16_t instead ? &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this a bug in the nrf_ble_gatt in SDK 16 ?</title><link>https://devzone.nordicsemi.com/thread/248431?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 11:44:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff2dfb56-e0a9-489b-878a-06aaf08e0189</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The data length is referring to the LL packet length sent on air which actually can be smaller than the size of the MTU. An ATT packet will be split into multiple radio packets in that case. This is explained a bit more in the SDK documentation here: &lt;span&gt;&lt;a title="Experimental: GATT Module" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_ble_gatt.html?cp=7_1_3_2_13"&gt;GATT Module. &lt;/a&gt;The &amp;quot;&lt;a title="Bluetooth Low Energy data throughput" href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/ble_data_throughput/ble_data_throughput.html?cp=4_6_3_0_16"&gt;Bluetooth Low Energy data throughput&amp;quot; &lt;/a&gt;&lt;/span&gt;&lt;span&gt;chapter of the SDS may also be interesting to read if you are looking to increase the transfer speed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>