Chettimada, Vinayak Kariappa
characters are sent very quickly on the order of 500 us for each characterPlease clarify, minimum BLE connection interval is 7.5 ms.
Do you know what is the connection interval used by Window when you see the Window OS crash? you get Blue Screen of Death? Which version of Window OS?
As the TX Buffer implies, it’s the number of packets queued locally until a chance to transmit them to the peer. Your TX Buffer count should be based on the rate of generation of packets per BLE connection interval.
Usually, 7 Tx Buffers for slave role for a connection interval of 7.5ms should suffice. Actually calculation of optimal buffer count should be based on how fast, and how many bytes per packet is generated when Controller is transmitting the previous packet.
From: <firstname.lastname@example.org> on behalf of Carles Cufi <email@example.com>
Date: Friday, 21 September 2018 at 12:58 PM
To: "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "Dunaj, Pawel" <firstname.lastname@example.org>, "Gawor, Kamil" <Kamil.Gawor@nordicsemi.no>, "Piszczek, Kamil" <Kamil.Piszczek@nordicsemi.no>, "Von Dentz, Luiz" <email@example.com>
Subject: Re: [Zephyr-devel] Choosing Tx Buffers in BLE stack
Copying a few people to this thread.
From: firstname.lastname@example.org <email@example.com> on behalf of firstname.lastname@example.org <email@example.com>
Sent: Thursday, September 20, 2018 11:56 AM
Subject: [Zephyr-devel] Choosing Tx Buffers in BLE stack
I am working on a BLE HID keyboard application using zephyr 1.13.
I was playing around with Tx buffers (specifically Maximum number of pending TX buffers, Number of Tx buffers).
With default buffer settings the characters were transmitted very slowly due to small number of buffers. But as soon as
i increased it to 3 pending buffers and 3 Tx buffers i saw significant improvement in the speed of characters transmitted.
My question is how to choose the buffer values for this?.
The reason is currently i face a compatibility problem with my HID application, where it works fine in Linux, Android, iOS devices
with increased number of buffers, but crashes on windows system. When i debugged the HCI log (from
btmon) i saw that with
increased buffers, characters are sent very quickly on the order of 500 us for each character. This causes the data (of 20 characters)
to be transmitted within one or two connection intervals. Maybe this causes some overflow in windows systems. I would like to know
what are the implications of choosing a number of Tx buffers and pending buffers.
It will be helpful if anyone can tell how to choose the number of Tx buffers? or even point to some direction in the BLE specification?
Dhananjay G J