Bluetooth fundamental course: Lesson3_Exercise2: data_len_update failed (err -5)

Hello,

I get  "data_len_update failed (err -5)" 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 ***
*** Using Zephyr OS v3.7.99-ca954a6216c9 ***
[00:00:00.401,092] <inf> Lesson3_Exercise2: Starting Lesson 3 - Exercise 2

[00:00:00.425,598] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.425,659] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
[00:00:00.425,659] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 121.4259 Build 3078678206
[00:00:00.427,917] <inf> bt_hci_core: Identity: F3:A1:CC:E6:A6:0A (random)
[00:00:00.427,947] <inf> bt_hci_core: HCI: version 6.0 (0x0e) revision 0x209a, manufacturer 0x0059
[00:00:00.427,978] <inf> bt_hci_core: LMP: version 6.0 (0x0e) subver 0x209a
[00:00:00.427,978] <inf> Lesson3_Exercise2: Bluetooth initialized
[00:00:00.430,328] <inf> Lesson3_Exercise2: Advertising successfully started
[00:00:12.744,873] <inf> Lesson3_Exercise2: Connected
[00:00:12.744,903] <inf> Lesson3_Exercise2: Connection parameters: interval 45.00 ms, latency 0 intervals, timeout 5000 ms
[00:00:14.746,002] <wrn> bt_hci_core: opcode 0x2022 status 0x01
[00:00:14.746,032] <err> Lesson3_Exercise2: data_len_update failed (err -5)
[00:00:14.746,124] <inf> Lesson3_Exercise2: PHY updated. New PHY: 2M
[00:00:14.746,429] <inf> Lesson3_Exercise2: Connection parameters updated: interval 7.50 ms, latency 0 intervals, timeout 5000 ms
[00:00:14.758,666] <inf> Lesson3_Exercise2: MTU exchange successful
[00:00:14.758,666] <inf> Lesson3_Exercise2: New MTU: 244 bytes
[00:00:15.013,183] <inf> Lesson3_Exercise2: Connection parameters updated: interval 45.00 ms, latency 0 intervals, timeout 5000 ms
[00:00:18.335,693] <inf> Lesson3_Exercise2: Connection parameters updated: interval 1000.00 ms, latency 0 intervals, timeout 4000 ms

Parents
  • Hi

    The same error message(-5 EIO) seems to be reported in this ticket, where a user was inputting a number instead of a struct to bt_conn_le_data_len_update(). Do you get a build warning about this as well perhaps? You can also check out the suggested solution to the exercise available here and see if the data length update is done similarly or not there.

    Best regards,

    Simon

  • Hi Simon,

    In my case I didn'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't happen. Then I compared the solution source code in main.c to my owm main.c. The difference was that in the solution k_sleep(K_MSEC(2000)) was not present. So I tried without k_sleep call and it worked. However, I noticed that the call to k_sleep has been added to the solution 5 days ago, so I tried again my code with the call to k_sleep and this time it worked! Not sure what's going on.

  • Hi

    This sounds very strange indeed, but if you'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? 

    Best regards,

    Simon

Reply Children
Related