linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Losing events from USB barcode reader
@ 2011-05-23 19:02 Thomas Petazzoni
  2011-05-24  9:55 ` Henrik Rydberg
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2011-05-23 19:02 UTC (permalink / raw)
  To: linux-input

Hello,

I have a Qt-based application which reads events from a Linux input
device through /dev/input/eventX. The device I have is an USB barcode
scanner, which works just like a keyboard.

Unfortunately, I sometimes lose events coming from this USB barcode
scanner, and I'm worried about the size of the in-kernel buffer for
events. The USB barcode scanner acts like a keyboard, but sends events
much, much faster. For example, when it scans a barcode such as
"AZERTYUIOP1234", it generates the Shift press, key press, key release,
Shift release for every character, generating at least 56 events in a
row, very quickly (and the kernel only buffers 64 events if I'm
correct).

There are even worse cases: I have an USB barcode reader which is
connected by Bluetooth with the barcode reader itself. When the barcode
reader is far away from the base station, it just buffers the scanned
barcodes, and when the barcode reader is again within the Bluetooth
range from the base station, it sends all the buffered scanned barcode
in a row. Potentially hundreds and hundreds of Linux input events
coming in.

Shouldn't the in-kernel buffer be larger for such devices, in order to
leave more time for the applications to come and fetch the events ?

As far as I could see, it doesn't seem to be possible to adjust the
size of the in-kernel buffer from userspace (through some ioctl() call,
for example). Did I miss something ?

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-03 13:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-23 19:02 Losing events from USB barcode reader Thomas Petazzoni
2011-05-24  9:55 ` Henrik Rydberg
2011-05-25 15:38   ` Thomas Petazzoni
2011-06-03  8:15     ` Thomas Petazzoni
2011-06-03 13:54       ` Thadeu Lima de Souza Cascardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).