Re: Choosing Tx Buffers in BLE stack
toggle quoted messageShow quoted text
Thank you very much for the reply.
Yes i used the zephyr sample as reference(HoG mouse device) but modified for keyboard. The report map i use is directly from Nordic SDK HID keyboard sample.
I am also sending standard USB HID report for every character (u8_t modifier, u8_t media, u8_t keys => totally 8 bytes). I think every BLE packet sends one character
since I did not change the MTU size (~20 bytes for application)
This report map and report along with BLE Tx buffer changes works fine in Android and iOS device without any problems. Even in Windows if i use the default buffer
settings where 1 character is sent every connection interval, things works fine. Only when there are more packets sent continuously without a delay windows HID driver
crashes in the middle. I also tried to enable some low level logs in zephyr BLE for debugging but apparently logging adds some delay which hides the problem from appearing.
Also your comment is true
"Zephyr will block when there is no buffer available to add the notification data too"
Zephyr did block the notify API when the windows driver crashed and could not receive further characters.
I checked the behavior of other existing HID barcode scanner devices where i see that there is at least a delay (almost connection interval time) every 9-10 characters sent.
I was just curious if we can config this as setting in Zephyr. These commercial devices also send the data to windows with similar timing per packet (~ 600 microsec)
as my Zephyr based device . The only difference is the delay of connection interval for every ~10 packets.
Is there something i can further do from zephyr configs?
Dhananjay G J
On Mon, Oct 1, 2018 at 3:37 PM <pawel.dunaj@...> wrote: