This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NCS v.1.6.1 migration issue with CONFIG_BT_CTLR_DATA_LENGTH_MAX

Dear Nordic, 

We use CONFIG_BT_CTLR_DATA_LENGTH_MAX definition set to 251 in our project to be able to send large data packets. Still, when migrating to nCS 1.6.1, we've received the warning / error message that this parameter must be in [27; 69] range. It was OK on previious versions of nCS. What's going wrong here?

#
# Bluetooth settings
#
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="VND"
CONFIG_BT_SMP=y
CONFIG_BT_SMP_APP_PAIRING_ACCEPT=y
# CONFIG_BT_SIGNING is not set
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_BT_PRIVACY=y
CONFIG_BT_PHY_UPDATE=y
CONFIG_BT_DATA_LEN_UPDATE=y
CONFIG_BT_CTLR_DATA_LENGTH_MAX=69
CONFIG_BT_L2CAP_TX_MTU=247
# it's necessary to use fixed passkey with WIN10 (or have a path to send random passkey to user)
CONFIG_BT_FIXED_PASSKEY=y

Parents
  • Hi Dmitry, 
    Could you try to test with the \nrf\samples\bluetooth\throughput example, it works fine for me even though BT_CTLR_DATA_LENGTH_MAX  = 251. 

    Also please look for BT_CTLR_DATA_LENGTH_MAX inside kconfig in \zephyr\subsys\bluetooth\controller in my case it is: 

    config BT_CTLR_DATA_LENGTH_MAX
    	int "Maximum data length supported"
    	depends on BT_CTLR_DATA_LENGTH
    	default 27
    	range 27 BT_BUF_ACL_RX_SIZE if BT_BUF_ACL_RX_SIZE < 251
    	range 27 251
    	help
    	  Set the maximum data length of PDU supported in the Controller.

Reply
  • Hi Dmitry, 
    Could you try to test with the \nrf\samples\bluetooth\throughput example, it works fine for me even though BT_CTLR_DATA_LENGTH_MAX  = 251. 

    Also please look for BT_CTLR_DATA_LENGTH_MAX inside kconfig in \zephyr\subsys\bluetooth\controller in my case it is: 

    config BT_CTLR_DATA_LENGTH_MAX
    	int "Maximum data length supported"
    	depends on BT_CTLR_DATA_LENGTH
    	default 27
    	range 27 BT_BUF_ACL_RX_SIZE if BT_BUF_ACL_RX_SIZE < 251
    	range 27 251
    	help
    	  Set the maximum data length of PDU supported in the Controller.

Children
  • Dear Hung, 

    1. If I change the value manually in /zephyr/misc/generated/configs.c, it works.

    GEN_ABSOLUTE_SYM_KCONFIG(CONFIG_BT_CTLR_DATA_LENGTH_MAX, 251);

    2. If I change the value in prj.conf file, it doesn't work (CMake returns error described above) and config.c line get the following value:

    GEN_ABSOLUTE_SYM_KCONFIG(CONFIG_BT_CTLR_DATA_LENGTH_MAX, 69not);

    3. The vital difference is "CONFIG_BT_BUF_ACL_RX_SIZE=251" setting in prj.conf for Throughput example. If it added to config the CMake, it works. 

    Could you please check is it right behavior for CMake? 

  • Hi Dmitry, 
    Yes I think it's right. 
    If you have a look at the Kconfig file that I quoted above, you can find this: 

    range 27 BT_BUF_ACL_RX_SIZE if BT_BUF_ACL_RX_SIZE < 251

    This is something new from NCS v1.6.

    So I think config the CONFIG_BT_BUF_ACL_RX_SIZE is mandatory in addition to CONFIG_BT_CTLR_DATA_LENGTH_MAX.

Related