<?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>Bluetooth fundamental course: Lesson3_Exercise2: data_len_update failed (err -5)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120658/bluetooth-fundamental-course-lesson3_exercise2-data_len_update-failed-err--5</link><description>Hello, 
 I get &amp;quot;data_len_update failed (err -5)&amp;quot; error message in lesson 3 exercise 2 of Bluetooth course. I have posted the output log below. Any idea why this is happening? 
 Thank you, 
 Sam 
 
 *** Booting nRF Connect SDK v2.9.1-60d0d6c8d42d *** </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Apr 2025 17:54:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120658/bluetooth-fundamental-course-lesson3_exercise2-data_len_update-failed-err--5" /><item><title>RE: Bluetooth fundamental course: Lesson3_Exercise2: data_len_update failed (err -5)</title><link>https://devzone.nordicsemi.com/thread/532067?ContentTypeID=1</link><pubDate>Wed, 16 Apr 2025 17:54:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e33d9607-a3d2-46a2-92e0-ef14a8c132c3</guid><dc:creator>Sam123</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Initially, when I had the error I increased the sleep time from 1 second to 2 seconds but it didn&amp;#39;t help and the error happened again.&amp;nbsp; Other than that, there was not difference. Currently, the sleep time is back to 1 second and there is no error.&lt;/p&gt;
&lt;p&gt;Since the error doesn&amp;#39;t happen anymore, lets close this issue. I will follow up if it happens again.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth fundamental course: Lesson3_Exercise2: data_len_update failed (err -5)</title><link>https://devzone.nordicsemi.com/thread/531980?ContentTypeID=1</link><pubDate>Wed, 16 Apr 2025 10:00:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7455b9a-794d-4043-aa69-7486f8a497d0</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Noted, do you want to dig further into why this might be or should we leave it and close the case since it apparently seems to work now.&lt;/p&gt;
&lt;p&gt;Is there any difference in the k_sleep call you did previously and the one implemented now perhaps?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth fundamental course: Lesson3_Exercise2: data_len_update failed (err -5)</title><link>https://devzone.nordicsemi.com/thread/531880?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2025 15:47:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9eb752f3-3703-49cf-b190-5509ac0d86b2</guid><dc:creator>Sam123</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;The only difference was the call to k_sleep. I didn&amp;#39;t do any other change.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth fundamental course: Lesson3_Exercise2: data_len_update failed (err -5)</title><link>https://devzone.nordicsemi.com/thread/531850?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2025 13:07:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0802c549-f6c8-464b-8c1c-aeb4686da5ee</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This sounds very strange indeed, but if you&amp;#39;re now not able to reproduce this it might have been a typo in your initial project resulting in this. Was this indeed the only difference between yours and the solution main.c?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth fundamental course: Lesson3_Exercise2: data_len_update failed (err -5)</title><link>https://devzone.nordicsemi.com/thread/531746?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2025 17:30:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b02e378-4ea0-4959-b447-5e7c45a898a0</guid><dc:creator>Sam123</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;In my case I didn&amp;#39;t pass a number instead of of a struct to bt_conn_le_data_len_update(). I tried the suggested solution to the exercise that I had previously downloaded and the error didn&amp;#39;t happen. Then I compared the solution source code in main.c to my owm main.c. The difference was that in the solution&amp;nbsp;k_sleep(K_MSEC(2000)) was not present. So I tried without&amp;nbsp;&lt;span&gt;k_sleep call and it worked. However, I noticed that the call to&amp;nbsp;k_sleep has been added to the solution 5 days ago, so I tried again my code with the call to&amp;nbsp;k_sleep and this time it worked! Not sure what&amp;#39;s going on.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth fundamental course: Lesson3_Exercise2: data_len_update failed (err -5)</title><link>https://devzone.nordicsemi.com/thread/531671?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2025 10:35:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4a4c006-efe9-40e1-8322-cc021970a4e3</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The same error message(-5 EIO) seems to be reported in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/106632/updating-data-length-on-peripheral-server-side/460519"&gt;this ticket&lt;/a&gt;, where a user was inputting a number instead of a struct to &lt;strong&gt;bt_conn_le_data_len_update&lt;/strong&gt;(). Do you get a build warning about this as well perhaps? You can also check out the suggested solution to the exercise available &lt;a href="https://github.com/NordicDeveloperAcademy/bt-fund/tree/main/v2.9.0-v2.7.0/l3/l3_e2_sol"&gt;here&lt;/a&gt;&amp;nbsp;and see if the data length update is done similarly or not there.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>