In multiple central connection, BLE Tx complete or on_sent callback not received for other peripheral devices when one of the peripheral device is out of range or reset.


SDK: nRF Connect SDK v2.6.1
Hardware: nRF52840 (Central Device) and nRF52832 (Peripheral Devices)


Detailed Scenario:
The central device (nRF52840) has 8 peripheral devices connected to it.
Central is sending data to each peripheral device at connection interval of 188ms. The supervision timeout is set to 24 seconds.
When one of the peripheral devices undergoes a power reset, or goes out of range, BLE link breaks.
But central has not receive disconnection event yet. So, central keep sending data to this device using bt_gatt_write_without_response_cb function. During this central fails to get BLE tx complete event or on_sent callback for other 7 peripheral which are connected.

To send data from the central to peripheral devices, I am using the following function:

int bt_nus_client_send(struct bt_nus_client nus_c, const uint8_t data, uint16_t len)
{
	int err;

	if (!nus_c->conn) 
	{
		return -ENOTCONN;
	}

	err = bt_gatt_write_without_response_cb(nus_c->conn, nus_c->handles.rx, data, len, false, on_sent, nus_c);
	if (err) 
	{
		atomic_clear_bit(&nus_c->state, NUS_C_RX_WRITE_PENDING);
	}

	return err;
}

Expected Behavior:

The central device should be able to send Data to the remaining connected peripheral devices during one of the peripheral device is out of range or reset.

Note:

bt_nus_client_send() not return any err code during this Scenario.

I have captured sniffer data and confirmed that other devices are not able to receive data, but they send/receive empty PDUs during this issue.

Thank you for your assistance.
Best regards,
Mehul

Parents Reply Children
No Data
Related