This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NRF Connect SDK 1.8.0 for nRF5340 Using Visual Studio Code

I have a working build for the nRF5340 DK that implements a custom service and communicates over BLE. As I add features, the binary for the Application Core changes; the binary for the Network Core remains the same. I have increased the MTU size to 185 to increase BLE throughput. That is also working. However, I am having issues with certain added configuration parameters within prj.conf, specifically CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y and CONFIG_BT_CTLR_DATA_LENGTH_MAX=251. Apparently, I am missing dependencies for these to become active. I believe there are configuration changes required within the Remote Core build (hci_rpmsg) in order for the configurations with prj.conf to work. There is discussion about a "child_image" folder that might address this, but it is very unclear to me how to add a child_image folder into the project.

My CMakeLists.txt has the following entries:

# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(veris_chemo_port)

target_sources(app PRIVATE src/main.c)

# Custom files and folders

target_sources(app PRIVATE
src/bluetooth/ble_interface.c
src/bluetooth/vcp_service.c
)

zephyr_library_include_directories(src/bluetooth)
zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth)

My prj.conf has the following entries:

# Enable DK LED and Buttons library
CONFIG_GPIO=y
CONFIG_DK_LIBRARY=y

# Configure logger
#CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=n
#CONFIG_LOG_BACKEND_RTT=n
#CONFIG_LOG_BACKEND_UART=y
#CONFIG_LOG_DEFAULT_LEVEL=3

# Configure Bluetooth
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME="Veris Chemo Port"
CONFIG_BT_DEVICE_APPEARANCE=1362
CONFIG_BT_MAX_CONN=1

# Config Display Information Service
CONFIG_BT_DIS=y
CONFIG_BT_DIS_PNP=n
CONFIG_BT_DIS_SERIAL_NUMBER=y
CONFIG_BT_DIS_SERIAL_NUMBER_STR="VCP_xxxxxxxxxxxx"
CONFIG_BT_DIS_FW_REV=y
CONFIG_BT_DIS_FW_REV_STR="00.01.01"
CONFIG_BT_DIS_HW_REV=y
CONFIG_BT_DIS_HW_REV_STR="00.00.00"
CONFIG_BT_DIS_MODEL="VCP MODEL X"
CONFIG_BT_DIS_MANUF="Veris Health"
CONFIG_BT_DIS_SETTINGS=y

#CONFIG_BT_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
CONFIG_SETTINGS=y
#CONFIG_SETTINGS_NONE=y

# Config Battery Service
CONFIG_BT_BAS=y

# Config Data Transfer for larger packet size
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=185
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251

CONFIG_ASSERT=y
  • Hi, 

    Please use the edit tool to insert the code (Insert -> Code). 

    However, I am having issues with certain added configuration parameters within prj.conf, specifically CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y and CONFIG_BT_CTLR_DATA_LENGTH_MAX=251.

    What is the issue? Please elaborate in more detail or the log. 

    There is discussion about a "child_image" folder that might address this, but it is very unclear to me how to add a child_image folder into the project.

    Created a "child_image" directory with a hci_rpmsg.conf file in it. See https://github.com/nrfconnect/sdk-nrf/tree/main/samples/bluetooth/throughput/child_image 

    Regards,
    Amanda

  • I don't know what you mean by "use the edit tool". What code should be inserted? For CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 I get the following message

    For I get the following message

    I'm not sure where to enable these dependencies. If I add them to proj.conf, I get build errors.

    error: BT_CTLR_DATA_LEN_UPDATE_SUPPORT (defined at c:\Users\bcook\Software_Projects\VHI\breadboard\veris_chemo_port_breadboard\build_1\subsys\bluetooth\controller\Kconfig:23) is
    assigned in a configuration file, but is not directly user-configurable (has no prompt). It gets its
    value indirectly from other symbols. See
    docs.zephyrproject.org/.../CONFIG_BT_CTLR_DATA_LEN_UPDATE_SUPPORT.html
    and/or look up BT_CTLR_DATA_LEN_UPDATE_SUPPORT in the menuconfig/guiconfig interface. The
    Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices
    sections of the manual might be helpful too.

    CMake Error at C:\Users\bcook\Software_Projects\VHI\v1.8.0\zephyr\cmake\kconfig.cmake:270 (message):
    command failed with return code: 1
    Call Stack (most recent call first):
    C:\Users\bcook\Software_Projects\VHI\v1.8.0\zephyr\cmake\app\boilerplate.cmake:546 (include)
    C:\Users\bcook\Software_Projects\VHI\v1.8.0\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:24 (include)
    C:\Users\bcook\Software_Projects\VHI\v1.8.0\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:40 (include_boilerplate)
    c:\Users\bcook\Software_Projects\VHI\breadboard\veris_chemo_port_breadboard\build_1\CMakeLists.txt:5 (find_package)

    I have been editing prj.conf directly.

  • Hi, 

    Add the following to the prj.conf, and let me know it can fix the issue or not. Thanks. 

    CONFIG_BT_USER_DATA_LEN_UPDATE=y
    CONFIG_BT_DATA_LEN_UPDATE=y

    -Amanda

  • Hi Amanda,

     

    This addition did not fix the issue. I added your lines to prj.conf:

     

    # Config Data Transfer for larger packet size

    CONFIG_BT_USER_DATA_LEN_UPDATE=y

    CONFIG_BT_DATA_LEN_UPDATE=y

     

    CONFIG_BT_BUF_ACL_RX_SIZE=251

    CONFIG_BT_CONN_TX_MAX=10

    CONFIG_BT_L2CAP_TX_BUF_COUNT=10

    CONFIG_BT_L2CAP_TX_MTU=185

    CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y

    CONFIG_BT_BUF_ACL_TX_COUNT=10

    CONFIG_BT_BUF_ACL_TX_SIZE=251

    CONFIG_BT_CTLR_DATA_LENGTH_MAX=251

     

    The information in the build output is as follows:

     

    c:\Users\bcook\Software_Projects\VHI\breadboard\veris_chemo_port_breadboard\build_1\subsys\bluetooth\host\Kconfig.l2cap:40) was assigned the value 'y' but got the value 'n'. Check

    these unsatisfied dependencies: ((BT_SMP && BT_CONN && BT_HCI_HOST && BT_RPC_STACK) || (BT_SMP &&

    BT_CONN && BT_HCI_HOST && BT_HCI && BT)) (=n). See

    docs.zephyrproject.org/.../CONFIG_BT_L2CAP_DYNAMIC_CHANNEL.html and/or

    look up BT_L2CAP_DYNAMIC_CHANNEL in the menuconfig/guiconfig interface. The Application Development

    Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual

    might be helpful too.

     

     

    warning: BT_CTLR_DATA_LENGTH_MAX (defined at c:\Users\bcook\Software_Projects\VHI\breadboard\veris_chemo_port_breadboard\build_1\subsys\bluetooth\controller\Kconfig:333) was assigned

    the value '251' but got the value ''. Check these unsatisfied dependencies: BT_CTLR_DATA_LENGTH

    (=n), BT_CTLR (=n). See

    docs.zephyrproject.org/.../CONFIG_BT_CTLR_DATA_LENGTH_MAX.html and/or

    look up BT_CTLR_DATA_LENGTH_MAX in the menuconfig/guiconfig interface. The Application Development

    Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual

    might be helpful too.

     

    I am using Visual Studio Code, not Segger Embedded Studio.

     

    Brian

Related