Peripheral UART - BLE packet size and rate

Hi

I have some questions about BLE throughput, using the BLE Peripheral UART example, out of the box, so to speak, for the nRF5340 DK.

Using this application, I can send up top 40 bytes of data in each message.

Without any flow control, it seems I can send a new packet every 25 ms.

I have tried to do two things, with various CONFIG_BT_ settings that I can find out about, but have not yet succeeded.

Task One

Try and increase the amount of data I can send in one call to bt_nus_send() from 40 bytes to, say, 240

The buffer struct is defined as:

#define UART_BUF_SIZE CONFIG_BT_NUS_UART_BUFFER_SIZE
struct uart_data_t {										// Buffer struct used for rx/tx BLE data
	void *fifo_reserved;
	uint8_t data[UART_BUF_SIZE];
	uint16_t len;
};

Task Two

Increase the rate of BLE packet transmissions, so that I can send more packets per second.

 I have read through various forum posts etc., and have lost track of all the different combinations and values I have tried for the following, and others:

CONFIG_BT_L2CAP_TX_BUF_COUNT
CONFIG_BT_L2CAP_TX_MTU
CONFIG_BT_BUF_ACL_TX_SIZE
CONFIG_BT_BUF_ACL_TX_COUNT
CONFIG_BT_PERIPHERAL_PREF_MIN_INT
CONFIG_BT_PERIPHERAL_PREF_MAX_INT
 

Is there a simple step by step way of achieving these two tasks?

Thanks

 

 

 

 

Parents Reply Children
No Data
Related