Softdevice Controller does not send HCI event "LE Data Length Change"

I've built a firmware based on the hci_uart sample with the softdevice controller. The board is custom made and has a nrf52840 on it. Over USB-CDC HCI commands are sent to the device.

Most things seem to work fine, but I've found out, that the softdevice controller does not send the "LE Data Length Change" event. 

Test-Case:
- Send HCI commands to initialize the contoller
- Scan for devices
- Connect a device
- Initiate a data length update

Expected:
- The controller should send a data length changed event over HCI.

Actual:
- No event is generated

I've recorded the HCI communication for verification. In wireshark I see that no data length changed is generated. The HCI log is attached.capture.zip

I've checked, that the event mask is configured correctly. Also has the remote device support for data length extension. The same test with a PTS dongle works as expected. What can be wrong here?

Environment:
- nRF Connect SDK/Toolchain 2.9.0

  • Hi Hung

    I've created a sample to reproduce the issue. It is basically the hci_lpuart example with configuration for the softdevice controller. The project is attached with built files for a nrf52840DK. There are two builds included. One build without ISO features and one with the ISO features. The HCI is configured to the VCOM of the nRF52840DK and uses 115200Baud.

    hci_lpuart.zip

    To build the example the following command lines have been used with NCS 2.9.0:

    DLE WORKS (without ISO support)
    west build -b nrf52840dk/nrf52840 --pristine --build-dir "build_nrf52840dk_dle-works_cli" -- -DCONF_FILE=prj.conf -DEXTRA_CONF_FILE="dle-works.conf" -DCMAKE_BUILD_TYPE=Release -DBOARD_ROOT="."

    DLE DOESN'T WORK (with ISO support)
    west build -b nrf52840dk/nrf52840 --pristine --build-dir "build_nrf52840dk_dle-not-working_cli" -- -DCONF_FILE=prj.conf -DEXTRA_CONF_FILE="dle-not-working.conf" -DCMAKE_BUILD_TYPE=Release -DBOARD_ROOT="."

    Hope that helps to reproduce the issue.

    Regards Adrian

  • Hi Adrian, 
    I did a quick test here and got a result that when I enable ISO related configuration, the maximum data length is set to 27. 

    I still can request the data length request and can see that with the sniffer but it's limited to 27 bytes. This could be the reason you don't see that in your test because the length is already 27 (?).

    When i enabled the following configuration: 

    CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT_OVERRIDE=y
    CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=5000
    I was able to request the data length as I want: 


    You can see some dependency here between BT_ISO and event length (which affect data length) 
    https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/bluetooth/controller/Kconfig#L156C8-L156C46

    I will check with the team internally to see why BT_ISO would cause that effect. I believe it must be something in the spec mandate this. 

    I attached here the code I tested (I used hci_uart instead of hci_lpuart but that shouldn't change the behavior). 
    The host is peripheral_uart . 
  • Hi Hung
    I can reproduce your findings. If I add the configuration you mention it works as expected. Anyhow it would be great to know why the limitation was set in first place to know if the override has some downsides. Looking forward to hear the input from your team.
    Regards Adrian

  • Hi Adrian, 
    The info I got from the team is that when BT_ISO is enabled we automatically assume that ACL (normal BLE communication) shouldn't have the highest priority hence we give it the minimum event time to give more air time for BT_ISO. 
    If you want to have longer data length with ACL, the configurations I showed should be used. 

  • Hi Hung

    Thanks for the feedback. With that info I think I can set the best configuration for my project.
    Issue can be closed here.

    Regards Adrian

Related