ble connection stuck

Hi, I've experienced an error in which a peripheral connects but can not send any data. I have these logs:
[1672131059] <err> bt_ctlr_hci: Tx Buffer Overflow
[1672131059] <wrn> bt_hci_core: Data buffer overflow (link type 0x01)
[1672131059] <err> bt_conn: Unable to send to driver (err -105)

How can I detect these error in my app?
bt_gatt_notify(...) returns with no error code

Parents
  • Can you please give me a bit more info on the context of this error?

    What was the state of the application before this error happened? Which SDK version?
    Can you show the call stack frame? Do you suspect any stack overflows?

  • some more details:
    - using zephyr, ncs 1.9.2
    - device is nrf52840
    - the error occurs after the peripheral has connected and tries to send a packet.
    - the application is not stuck

    - ble connection interval is 7.5[msec], connection latency is 0, and timeout is 4[sec]

    regarding stack size - how can I check if I am closed to limitations?

    I don't have access to the call stack frame because this bug happens very rarely and randomly, but it is a fatal bug which practically causes bricking of the device because it loses its ability to communicate. 

    - some configs that might be relevant

    CONFIG_BT_HCI_TX_STACK_SIZE=640
    CONFIG_BT_RX_STACK_SIZE=2200
    CONFIG_BT_BUF_ACL_TX_SIZE=251
    CONFIG_BT_BUF_ACL_TX_COUNT=3
    CONFIG_BT_BUF_CMD_TX_SIZE=65
    CONFIG_BT_BUF_CMD_TX_COUNT=2
    CONFIG_BT_HCI_TX_PRIO=7
    CONFIG_BT_CONN_TX_MAX=3
    CONFIG_BT_L2CAP_TX_BUF_COUNT=3
    CONFIG_BT_L2CAP_TX_FRAG_COUNT=2
    CONFIG_BT_L2CAP_TX_MTU=252
    CONFIG_RTT_TX_RETRY_CNT=2
    CONFIG_RTT_TX_RETRY_DELAY_MS=2



Reply
  • some more details:
    - using zephyr, ncs 1.9.2
    - device is nrf52840
    - the error occurs after the peripheral has connected and tries to send a packet.
    - the application is not stuck

    - ble connection interval is 7.5[msec], connection latency is 0, and timeout is 4[sec]

    regarding stack size - how can I check if I am closed to limitations?

    I don't have access to the call stack frame because this bug happens very rarely and randomly, but it is a fatal bug which practically causes bricking of the device because it loses its ability to communicate. 

    - some configs that might be relevant

    CONFIG_BT_HCI_TX_STACK_SIZE=640
    CONFIG_BT_RX_STACK_SIZE=2200
    CONFIG_BT_BUF_ACL_TX_SIZE=251
    CONFIG_BT_BUF_ACL_TX_COUNT=3
    CONFIG_BT_BUF_CMD_TX_SIZE=65
    CONFIG_BT_BUF_CMD_TX_COUNT=2
    CONFIG_BT_HCI_TX_PRIO=7
    CONFIG_BT_CONN_TX_MAX=3
    CONFIG_BT_L2CAP_TX_BUF_COUNT=3
    CONFIG_BT_L2CAP_TX_FRAG_COUNT=2
    CONFIG_BT_L2CAP_TX_MTU=252
    CONFIG_RTT_TX_RETRY_CNT=2
    CONFIG_RTT_TX_RETRY_DELAY_MS=2



Children
Related