<?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>&amp;lt;error&amp;gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29086/error-ble_gatt-sd_ble_gap_data_length_update-request-on-connection-0x0-returned-unexpected-value-0x13</link><description>Working on migrating my application from sdk 12.2 to sdk 14
except for some flash issues most of it seems to be working as before, except I notice this message in jlink: 
 0&amp;gt; &amp;lt;info&amp;gt; app: Connected
 0&amp;gt; &amp;lt;error&amp;gt; ble_gatt: sd_ble_gap_data_length_update</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Jan 2018 08:17:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29086/error-ble_gatt-sd_ble_gap_data_length_update-request-on-connection-0x0-returned-unexpected-value-0x13" /><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115364?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2018 08:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac7af5af-956b-4502-a17d-339c548de164</guid><dc:creator>JustinLee</dc:creator><description>&lt;p&gt;This issue is related to GAP EVENT LENGTH.
In NUS example in the nRF5 SDK v14, NRF_SDH_BLE_GAP_EVENT_LENGTH is 3 and it&amp;#39;s not proper value.
Please change it from 3 to 5 or 6.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115363?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2018 07:47:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b5b1058-eb2b-4417-ab2d-aa5e32a594b6</guid><dc:creator>ajay</dc:creator><description>&lt;p&gt;It is working for me on nRF5_SDK_14.2.0_17b948a&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115362?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2017 14:31:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71598e95-8b63-47ef-a785-b12ca72c4003</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Most likely because we handle event BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST in both nrf_ble_gatt.c module and in main.c&lt;/p&gt;
&lt;p&gt;In other example we don&amp;#39;t handle BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST event in main.c so they are fine, but not in ble_app_uart where we don&amp;#39;t use peer manager.&lt;/p&gt;
&lt;p&gt;Comment out the handle of BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST  in ble_evt_handler() in main.c should fix the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115361?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2017 07:40:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:315efa7b-341e-4be3-897c-ed89c949bfa7</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;I just ran into this and want to report that the same issue still presents on SDK v14.2.0. I am working on adding mesh to it, but I don&amp;#39;t think that is relevant, as I kept all other BLE functionality the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115355?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2017 14:13:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd3768a3-884d-4845-aa4d-4a24a5204069</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Yes, if that is a modification you want to do to the ble_app_uart example I suggest that you make a separate question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115354?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2017 14:09:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89a08d56-346b-4f16-8f54-c2c9184651a2</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;Is it possible to get rid of the error and to stay on HIGH MTU? If i stay on high mtu and leave the error what would be the downsides?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115359?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2017 13:47:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:288819c7-68f4-4ee5-8472-5ef0842294d4</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Depends on what you mean by high speed. It limits the amount of data in each packet to 20 bytes, so you will have more overhead compared to have a larger MTU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115358?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2017 12:55:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72eb73e6-1818-4120-9d35-ce1c63d3339c</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;If i set &lt;code&gt;NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23&lt;/code&gt; then i don&amp;#39;t have the ability for high speed. Is this true?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115357?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2017 12:52:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c04fdd30-a080-4a76-b8c5-07effa71dac7</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Bad error? What do you mean? Have you seen my answer below? Did you make the modifications?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115356?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2017 12:45:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1329d1b0-05e7-4067-9ddd-0e866450d9b0</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;Is ti a bad error? How can i set my device to have maximum MTU and not to have this error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115349?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2017 07:06:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:425460bb-be7e-4def-83ca-39e9ce9a8942</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Yes. Of course. Sorry.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115347?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2017 15:32:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a40824b-4e46-45bd-8d57-5d5d7a03a214</guid><dc:creator>erltot</dc:creator><description>&lt;p&gt;gatt_init looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/**@brief Function for initializing the GATT library. */
void gatt_init(void)
{
    ret_code_t err_code;

    err_code = nrf_ble_gatt_init(&amp;amp;m_gatt, gatt_evt_handler);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, 64);
    APP_ERROR_CHECK(err_code);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I&amp;#39;m sure you mean to change&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, 64);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, BLE_GATT_ATT_MTU_DEFAULT);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which yields following output in jlink&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; 0&amp;gt; &amp;lt;info&amp;gt; app: Connected
 0&amp;gt; &amp;lt;info&amp;gt; app: Data len is set to 0x14(20)
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115360?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2017 15:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:182decd8-efc2-43c7-b288-fc01debef62f</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry, I overlooked that you were using the unmodified example. This seems like a bug to me.&lt;/p&gt;
&lt;p&gt;Inside gatt_init(), if you change&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, 64);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, BLE_GATT_ATT_MTU_DEFAULT);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and inside sd_config.h, change&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Edit 22.01.2018&lt;/p&gt;
&lt;p&gt;This should be fixed in SDK 15.0.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115350?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2017 12:23:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecfd0106-23d8-4a27-a43c-b7952020faaa</guid><dc:creator>pbn4</dc:creator><description>&lt;p&gt;I think this is the same &lt;a href="https://devzone.nordicsemi.com/question/166756/sending-uart-data-resets-device-sdk-14/"&gt;problem&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115353?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2017 12:11:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c013627-3778-405a-ae6b-0e9a85a5a465</guid><dc:creator>erltot</dc:creator><description>&lt;p&gt;See updated question. -&amp;gt; So NULL is sendt to p_dl_limitation? I dont mean to be ignorant - but I don&amp;#39;t understand why I get this error or how to change ATT MTU or why I get this error, again this shows up just from compiling and running the ble_app_uart peripheral example and connecting with nrf connect on windows or android, or ios.. m_ble_nus_max_data_len is set to BLE_GATT_ATT_MTU_DEFAULT - 3; at the beginning of main.c, which should be 20, not 61 ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115352?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2017 18:05:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea7fe465-f6d3-4c69-a156-75992574cdb2</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;p_dl_limitation is an argument to sd_ble_gap_data_length_update(). It might give a pointer to why you get the error, if the event length is too short, if the max ATT MTU is too small.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115351?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2017 15:40:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2fd85bd-cba2-43c2-b0ed-cee2495aa245</guid><dc:creator>erltot</dc:creator><description>&lt;p&gt;Where do I inspect p_dl_limitation? I&amp;#39;m not sure I understand what you mean.&lt;/p&gt;
&lt;p&gt;I have not changed these settings from the ble nus example, so should be fairly simple to reproduce.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115346?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2017 11:24:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17f27609-5eeb-4c81-9de2-6132e2cb7861</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;0x13 is NRF_ERROR_RESOURCES - The requested parameters can not be accommodated. Inspect p_dl_limitation so see where the limitation is.&lt;/p&gt;
&lt;p&gt;What parameters did you request? What are the values in p_dl_limitation? What is the max ATT MTU you have set? What kind of event length have you set?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115345?ContentTypeID=1</link><pubDate>Mon, 04 Sep 2017 14:21:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97c70eda-6688-491e-9c2c-75da96774b3b</guid><dc:creator>erltot</dc:creator><description>&lt;p&gt;Nothing yet&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: &lt;error&gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.</title><link>https://devzone.nordicsemi.com/thread/115348?ContentTypeID=1</link><pubDate>Mon, 04 Sep 2017 13:53:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a209290d-ba72-4c9c-b194-7fd0d71aab01</guid><dc:creator>pbn4</dc:creator><description>&lt;p&gt;I also met this error, any solutions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>