<?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>about setting &amp;quot;NRF_SDH_BLE_GAP_DATA_LENGTH&amp;quot; value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93167/about-setting-nrf_sdh_ble_gap_data_length-value</link><description>I&amp;#39;ve set &amp;quot;NRF_SDH_BLE_GAP_DATA_LENGTH&amp;quot; value to 27 on peripheral side, and it&amp;#39;ve changed to 251 after connection. On the central side, the value is fixed as 27. I believe the connection params affect each other, when it changes on peripheral side, the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Oct 2022 00:55:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93167/about-setting-nrf_sdh_ble_gap_data_length-value" /><item><title>RE: about setting "NRF_SDH_BLE_GAP_DATA_LENGTH" value</title><link>https://devzone.nordicsemi.com/thread/392496?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2022 00:55:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa58d996-6c7f-4f36-9d07-a6cf2071e17d</guid><dc:creator>Bi_</dc:creator><description>&lt;pre id="tw-target-text" class="tw-data-text tw-text-large tw-ta" dir="ltr"&gt;&lt;span class="Y2IQFc" lang="en"&gt;I saw a thread about why the NRF_SDH_BLE_GAP_DATA_LENGTH value was small and then increased after the connection, but I must be remembering it wrong.
Thank you so much for your reply. I can understand a little bit better &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f606.svg" title="Laughing"&gt;&amp;#x1f606;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about setting "NRF_SDH_BLE_GAP_DATA_LENGTH" value</title><link>https://devzone.nordicsemi.com/thread/392294?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2022 07:11:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1abb07d-9422-4a93-944d-0dc00e540000</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I think there is a misunderstanding here DLE is not related to advertising at all, just the packet length when in a connection. (You can use longer advertising packets with extended advertising but that is a different and completely unrelated topic, so you can ignore that).&lt;/p&gt;
&lt;p&gt;As you write that you want longer packets in a connection, but not longer advertising packets, set&amp;nbsp;NRF_SDH_BLE_GAP_DATA_LENGTH to 251 in both the central and peripheral. If you refer to the NUS examples (central and peripheral) from a recent SDK, this will give you long packets in a connection out of the box.&lt;/p&gt;
[quote user="Bi_"]But I want to send it in 251 size after connection. If so, is there a need for a routine to change the data length after the connection event even in the case of (2) central?[/quote]
&lt;p&gt;If you use the NUS examples, no, as it is supported and used out of the box. This is becasue the GATT&amp;nbsp;module which is used in those examples will do the data length update procedure for you.&lt;/p&gt;
[quote user="Bi_"]If this value is set to 251, it is understood that if you want to transmit 247 data, you only need to send one chunk.[/quote]
&lt;p&gt;Yes.&lt;/p&gt;
[quote user="Bi_"]If this value is 27, we know that 247 is divided into 27 and sent. right?[/quote]
&lt;p&gt;Correct.&lt;/p&gt;
[quote user="Bi_"]I wonder if it is correct that the higher this value, the faster the speed.[/quote]
&lt;p&gt;Yes, you can say that. Because there is less overhead. For maximum throughput you may also want to increase the event length as mentioned above,&amp;nbsp;by setting&amp;nbsp;NRF_SDH_BLE_GAP_EVENT_LENGTH to be longer in some cases (up to the same length as the connection interval).&amp;nbsp;You also want to set&amp;nbsp;NRF_SDH_BLE_GATT_MAX_MTU_SIZE set to 247, as is already&amp;nbsp;done in the NUS examples.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about setting "NRF_SDH_BLE_GAP_DATA_LENGTH" value</title><link>https://devzone.nordicsemi.com/thread/392260?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2022 00:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f57d3019-9a22-4e75-b93a-c7a5c9ff1f31</guid><dc:creator>Bi_</dc:creator><description>&lt;p&gt;I am using (1) nrf52832 as peripheral and (2) nrf52840 as central&lt;br /&gt;(1) The peripheral defined the initial value of NRF_SDH_BLE_GAP_DATA_LENGTH as 27. This is because they thought that a large value was not necessary for advertising.&lt;br /&gt;However, after connection, a large amount of data must be transmitted through NUS. So, when a connection event occurs, the data length is programmed to change to 251.&lt;/p&gt;
&lt;p&gt;(2) central defined the initial value of NRF_SDH_BLE_GAP_DATA_LENGTH as 27. And the value doesn&amp;#39;t change.&lt;br /&gt;You said that it will be sent on 27 due to safety issues.&lt;br /&gt;But I want to send it in 251 size after connection. If so, is there a need for a routine to change the data length after the connection event even in the case of (2) central?&lt;/p&gt;
&lt;p&gt;As I understand it, I understood that the value of NRF_SDH_BLE_GAP_DATA_LENGTH is about how many pieces of data to send as a whole, right?&lt;br /&gt;If this value is set to 251, it is understood that if you want to transmit 247 data, you only need to send one chunk.&lt;br /&gt;If this value is 27, we know that 247 is divided into 27 and sent. right?&lt;br /&gt;I wonder if it is correct that the higher this value, the faster the speed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The example is often referred to, though &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f44d.svg" title="Thumbsup"&gt;&amp;#x1f44d;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about setting "NRF_SDH_BLE_GAP_DATA_LENGTH" value</title><link>https://devzone.nordicsemi.com/thread/392105?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2022 10:43:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac106e34-3982-44ca-8d1d-2a94751160c9</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="Bi_"]However, the value has been changed after connection complete. &lt;br /&gt;Then, what should I do?[/quote]
&lt;p&gt;I am not sure I understand. Can you elaborate?&lt;/p&gt;
[quote user="Bi_"]the NRF_SDH_BLE_GAP_DATA_LENGTH on central side should be defined as 251?[/quote]
&lt;p&gt;If you want to support packet lenghts up to 251 bytes, then yes.&lt;/p&gt;
[quote user="Bi_"]The routine for changing the value is also placed on the central part?[/quote]
&lt;p&gt;Yes. If you want an example of this, you can refer to the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/ble_sdk_app_nus_c.html"&gt;Nordic UART Service Client&lt;/a&gt;&amp;nbsp;(this is a central example that corresponds to the peripheral example &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/ble_sdk_app_nus_eval.html"&gt;UART/Serial Port Emulation over BLE&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about setting "NRF_SDH_BLE_GAP_DATA_LENGTH" value</title><link>https://devzone.nordicsemi.com/thread/392094?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2022 10:15:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff926751-e646-4a67-89e9-2e2eeae01cb5</guid><dc:creator>Bi_</dc:creator><description>&lt;p&gt;However, the value has been changed after connection complete. &lt;br /&gt;Then, what should I do? the NRF_SDH_BLE_GAP_DATA_LENGTH on central side should be defined as 251? The routine for changing the value is also placed on the central part?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about setting "NRF_SDH_BLE_GAP_DATA_LENGTH" value</title><link>https://devzone.nordicsemi.com/thread/392055?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2022 08:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3572ef93-870b-46af-826e-13a48da7d50e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I believe the connection params affect each other, when it changes on peripheral side, the value also changes on the central side. Is it wrong?[/quote]
&lt;p&gt;All parameters start with &amp;quot;safe&amp;quot; values from Bluetooth 4.0, and any changes are based on a exchange/negotiation. If one of the peers support 251 and the other support 27, 27 will be used. If one support 251, and the other 150 for instance, 150 would be used.&lt;/p&gt;
[quote user=""]Should I change the value on the central side?[/quote]
&lt;p&gt;If you want to use a data length of 251, both the peripheral and central needs to be configured to support and use 251.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>