nRF5340 BLE Transmission Stack Buffer Overflow

Hi,

We are developing a mesh network. Our requirement is the one device can connect to three other devices. Using one connection as a peripheral and up to two connections as a central for mesh connections.

We are using nRF5340 DK and the nRF Connect SDK Version 2.6.1.

I am using the function bt_gatt_write_without_response_cb(). The stack buffer size is set with CONFIG_BT_BUF_ACL_TX_COUNT=30.

The CONFIG_BT_BUF_ACL_TX_COUNT is set to 30, allowing 10 buffers for each connection. I'm using a write complete callback to monitor buffer usage. If the buffer usage for any connection exceeds 10 due to transmission issues, I stop writing to that connection until it is cleared.

If one device connects to two other devices, with one being very close and the other being far away and out of range, the stack buffer becomes full for both connections, even for the nearby device. Why does this issue occur, causing difficulty in sending packets to the nearby device when the other device goes out of range?

Related