NCS 3.1.0 vble 连接错误,位于 bt_hci_cmd_send_sync()

I am using nrf54l15 with NCS v3.1.0 with the following error when i connect it(i worked in NCS v2.9.1 successfully):

Controller unresponsive, command opcode 0x2035 timeout with err -11 in bt_hci_cmd_send_sync() function;
some error log info:

for matching ncs 3.1.0 I change this code:

bt_hci_cmd_create()  was  deprecated,

So, I modified the functionality implemented with bt_hci_cmd_create to the code shown in the above image. Now it compiles successfully, but when connecting to the device and trying to reset the transmit power, the errors mentioned earlier occur.

In the previous discussion(devzone.nordicsemi.com/.../ncs-3-1-0-vble-connect-error-at-bt_hci_cmd_send_sync), I provided my workaround, but I didn’t identify the root cause of the issue. Now I tried disabling this config(CONFIG_BT_USER_DATA_LEN_UPDATE)and this code of picture, than the connection works normally. Could you tell me why handling it this way resolves the connection  problem?

MY BT configs:

CONFIG_BT=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_LOG_LEVEL_WRN=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_CTLR_SDC_TX_PACKET_COUNT=10
CONFIG_BT_BUF_EVT_RX_COUNT=12
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y

Thank you very much!

Related