USB barcode scanner (emulating keyboard) crashes with current kernel

Bug #429044 reported by Hadmut Danisch
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Medium
linux (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Hi,

I just experienced a problem that seems to be related to the kernel's HID driver.

I have a USB barcode reader that I sometimes use to read the ISBN of books of my library. That barcode reader emulates a keyboard. If you scan a barcode, it just appears as if you had entered the encoded number on a keyboard, so it does not require a special driver.

I used that scanner last spring (not sure whether this was ubuntu 08.04 or 08.10) for the last time, where it worked pretty well. Now I tried to use it again (checked with two ubuntu machines) but it does not work anymore. When plugging in, the LEDs are lit, but the beeper gives an unusual sound. When trying to scan, it scans once, but nothing appears on the console, and then the scanner is dead (until pulling it from USB to cut it from power supply).

The scanner itself is ok, it still works under windows on the same machine, although it requires a reset to factory defaults after having it tried with Linux.

I guess that the current kernel tries to perform some configuration or any other special things with USB keyboards, that is not compatible with the 'keyboard type' USB scanner.

dmesg when plugging it in:

[34828.208582] usb 6-3: new low speed USB device using ohci_hcd and address 7
[34828.374898] usb 6-3: configuration #1 chosen from 1 choice

lsusb:

Bus 006 Device 007: ID 1130:0001 Tenx Technology, Inc.

Probably it is the bug described under
https://lists.linux-foundation.org/pipermail/bugme-new/2009-May/021980.html

regards

affects: ubuntu → linux (Ubuntu)
Hadmut Danisch (hadmut)
description: updated
Revision history for this message
Hadmut Danisch (hadmut) wrote :

With google I found a hint on a mailing list archive that suggests that the scanner's USB id erroneously was put on a HID kernel driver's ignore list, beginning with 2.6.28. Maybe the bug is solved with newer kernels and with 9.10.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in linux:
status: Unknown → Confirmed
Revision history for this message
Bernd Schlapsi (bernd-sch) wrote :

Tried it with Ubuntu 9.10 Karmic Koala Beta and this bug still exists

Revision history for this message
Bernd Schlapsi (bernd-sch) wrote :

This workaround works for me:

After plugging the USB-Barcode Scanner from Tenx Technology, Inc into the PC via USB type:
sudo modprobe usbkbd

Revision history for this message
Jon Kjaersgaard (kjaersgaard) wrote :

@Hadmut Danisch
AFAIK it's not erroneous, the compagny (Tenx Technology) has chosen to give all there products the same ID (that's the idProduct line from the output of lsusb -v) and since usbhid uses idProduct and idVendor to identify devices it has been blacklisted.
I doubt that that will change, and I question whether it can even be called a bug in usbhid. After all the culprit is Tenx, for failing to adhere to a known and documented standard.
I might wish that the blacklisting in usbhid happened in a config file rather than in a .c source file. That way those of us that need such a device could white-list it at will. But I doubt I will get it anytime soon

@Bernd Schlapsi :
Doesn't work for me in Karmic Koala (9.10) seems that the usbkbd module is no longer installed in Karmic as I get:
"FATAL: Module usbkbd not found."

Does any one know of an alternate workaround, preferably how to get usbkbd into karmic without compiling it your self?
I have tried writing my own udev rules, but so far they all hang on the fact that I need the usbkbd module on the system.

-- Jon

Revision history for this message
Bernd Schlapsi (bernd-sch) wrote :

@Jon Kjaersgaard
You are right! This command doesn't work in Karmic Koala (9.10)
I also really need an workaround for this problem?! Any suggestions?

Revision history for this message
janvl (jvl) wrote :

Hello,

I have the same problem. Searched the internet but it seems a
Ubuntu-specific bug. Tried it on Debian Lenny and there the barcodereader is
funtioning normally.

I even contacted Canonical directly and mr Damian Ondore told me to put it here.

I have nothing against a blacklist but if one does support, one wants the ability to unlist
a device that was functioning normal until the upgrade to 9.10.

I ask the developers to please come up with a possibility to easily unlist blacklisted devices.

Kind Regards,
Jan

Revision history for this message
Jon Kjaersgaard (kjaersgaard) wrote :

@janvl
No this is not a ubuntu specific bug, it stems from the upstream kernel. Somewhere at the top of this page there is a link to the relevant kernel bug ( http://bugzilla.kernel.org/show_bug.cgi?id=13411 ).
If I read that bug thread correctly someone is working on making that blacklisting optional.
In the meantime my own solution is to compile my own kernel with modified source, something which fortunately is quite easy in ubuntu.

-- Jon

Revision history for this message
Bernd Schlapsi (bernd-sch) wrote :

Tried it with Ubuntu 10.04 Alpha 2 and this bug still exists

ubuntu@ubuntu:~$ uname -a
Linux ubuntu 2.6.32-11-generic #15-Ubuntu SMP Tue Jan 19 18:16:27 UTC 2010 i686 GNU/Linux

Revision history for this message
snearch (snearch) wrote :

Tried today with Lucid Beta 1: bug still exists
Seems to me, as if there is no progress with this bug.
What's missing?

uname -a:
Linux lucid-beta1 2.6.32-16-generic #25-Ubuntu SMP Tue Mar 9 16:33:52 UTC 2010 i686 GNU/Linux

Revision history for this message
snearch (snearch) wrote :

After having updated Ubuntu 10.04 Beta1 (Lucid) with the
update-manager (490 Packages or so), now a
Fametech CCD-800-USB-M Barcode Reader (Tysso.com)
works as expected.
Thanks.

Revision history for this message
Ruben Chamadoira (rubengnu) wrote :

I solved the problem as follows:
I edited

 /etc/modprobe.d/backlist.conf

and comment line:

# blacklist usbkbd

Revision history for this message
Eric van der Vlist (vdv) wrote :

This seems to be a generic issue and people complain over the web that barcode readers no longer work with Ubuntu now that usbkbd has been deprecated (see for instance http://ubuntuforums.org/showthread.php?t=1641450).

It's also my case (in Ubuntu 10.10) and when I plug a Datalogic barcode reader, I get kernel errors:

Dec 19 22:41:46 studio kernel: [391213.984386] generic-usb 0003:05F9:2204.0001: input,hidraw0: USB HID v1.10 Keyboard [Datalogic Scanning, Inc. Datalogic Scanner ] on usb-0000:00:1d.0-2/input0
Dec 19 22:41:50 studio kernel: [391218.250082] usb 6-2: reset full speed USB device using uhci_hcd and address 4
Dec 19 22:41:50 studio kernel: [391218.390141] usb 6-2: device descriptor read/64, error -71
Dec 19 22:41:50 studio kernel: [391218.620084] usb 6-2: device descriptor read/64, error -71
Dec 19 22:41:51 studio kernel: [391218.850071] usb 6-2: reset full speed USB device using uhci_hcd and address 4

and of course, usbkbd is no longer here as a workaround.

Thanks,

Eric

Changed in linux:
status: Confirmed → Fix Released
Changed in linux:
importance: Unknown → Medium
Revision history for this message
John Bester (john-bester) wrote :

According to comment on 2011-01-24 the bug fix was released. I am currently running and Linux 2.6.32-33 (Ubuntu 10.04) and the bug still seems to be present. I have tried 2 different Zebex scanners and some digits are consistently dropped. For instance a barcode "14010" yields "140". I have commented out the line "blacklist usbkbd" as mentioned earlier, but I still get "FATAL: Module usbkbd not found". Seemingly the best description of the problem, I found here: http://web.archiveorange.com/archive/v/LLXmLhi1jH9FherdyRBK - according to this page, the author recognized that all key events were present, but because of the sequence (or maybe speed) some of the events are not translated into characters.

Revision history for this message
John Bester (john-bester) wrote :

I did another test on Ubuntu 11.04 (which I booted from an Ubuntu installation CD). I loaded the usbkbd module, unplugged the scanner and plugged it in again. No change whatsoever - still got "140" in stead of "14014". The exact same scanner works in a Windows XP POS system, but on 3 different computers with Linux installations it consistently misses characters.

Revision history for this message
penalvch (penalvch) wrote :

Hadmut Danisch, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

Also, could you please test the latest upstream kernel available following https://wiki.ubuntu.com/KernelMainlineBuilds ? It will allow additional upstream developers to examine the issue. Please do not test the daily folder, but the one all the way at the bottom. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this bug is fixed in the mainline kernel, please add the following tags:
kernel-fixed-upstream
kernel-fixed-upstream-VERSION-NUMBER

where VERSION-NUMBER is the version number of the kernel you tested. For example:
kernel-fixed-upstream-v3.11

This can be done by clicking on the yellow circle with a black pencil icon next to the word Tags located at the bottom of the bug description. As well, please remove the tag:
needs-upstream-testing

If the mainline kernel does not fix this bug, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-VERSION-NUMBER

As well, please remove the tag:
needs-upstream-testing

Once testing of the upstream kernel is complete, please mark this bug's Status as Confirmed. Please let us know your results. Thank you for your understanding.

Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Hadmut Danisch (hadmut) wrote :

I apologize, but I currently have no ubuntu later than 12.04 LTS for several reasons. However, as far as I used the device, it seems to work well current 12.04 LTS.

regards

Revision history for this message
penalvch (penalvch) wrote :

Hadmut Danisch, this bug report is being closed due to your last comment regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in linux (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.