Skip to content

Commit 8161430

Browse files
joerchancfriedt
authored andcommitted
Bluetooth: Add workaround for no command buffer available
Add workaround for no command buffer available when the host is transmitting Host Number of Completed Packet Commands. This command does not follow normal flow control of HCI commands and the controller side HCI drivers that allocates HCI command buffers with K_NO_WAIT can end up running out of command buffers. Increase the command buffer count from 2 to 10 for the affected drivers until the issue has a proper fix. Signed-off-by: Joakim Andersson <[email protected]>
1 parent d6da733 commit 8161430

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

samples/bluetooth/hci_rpmsg/prj.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ CONFIG_BT_MAX_CONN=16
1111
CONFIG_BT_CTLR_ASSERT_HANDLER=y
1212
CONFIG_BT_HCI_RAW_RESERVE=1
1313
CONFIG_BT_BUF_CMD_TX_COUNT=4
14+
15+
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
16+
# Host number of completed commands does not follow normal flow control.
17+
CONFIG_BT_BUF_CMD_TX_COUNT=10

samples/bluetooth/hci_spi/prj.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ CONFIG_BT_TINYCRYPT_ECC=n
99
CONFIG_BT_BUF_ACL_RX_COUNT=10
1010
CONFIG_BT_BUF_ACL_RX_SIZE=251
1111
CONFIG_BT_HCI_RAW_RESERVE=1
12+
13+
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
14+
# Host number of completed commands does not follow normal flow control.
15+
CONFIG_BT_BUF_CMD_TX_COUNT=10

samples/bluetooth/hci_usb/prj.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ CONFIG_BT_HCI_RAW=y
99
CONFIG_USB_DEVICE_STACK=y
1010
CONFIG_USB_DEVICE_BLUETOOTH=y
1111
CONFIG_USB_DEVICE_BLUETOOTH_VS_H4=n
12+
13+
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
14+
# Host number of completed commands does not follow normal flow control.
15+
CONFIG_BT_BUF_CMD_TX_COUNT=10

samples/bluetooth/hci_usb_h4/prj.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ CONFIG_UART_INTERRUPT_DRIVEN=y
55

66
CONFIG_USB_DEVICE_STACK=y
77
CONFIG_USB_DEVICE_BT_H4=y
8+
9+
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
10+
# Host number of completed commands does not follow normal flow control.
11+
CONFIG_BT_BUF_CMD_TX_COUNT=10

0 commit comments

Comments
 (0)