Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: Tim Legg on May 29, 2010, 10:09:14 PM
-
I am installing Tinycore on some 16 AMD K6 based embedded systems where I work.
I am using a USB barcode scanner that is running in keyboard emulation mode. So that when you scan, it 'types' the decoded text of the barcode into the application with focus.
When running tinycore, I scan and the barcode scanner does its beep to confirm that it read the barcode but never types out it's text. What's worse, I have been running into about 70% chance of crashing the scanner so badly that it has to be hard reset. Usually one or two tries will crash it.
We have been using our scanners on Debian systems and they have been performing just fine. This problem exists only in Tinycore whether I am using the embedded system or my desktop machine. The scanner works perfectly fine at the grub command line, but if I start scanning away as fast as I can during booting, it crashes about one third through the boot process.
* Possible need-to-know information
The embedded system runs from a Compact Flash card that appears as a /dev/hdx type of device, I installed Tinycore on it from the CD image using a 80486 emulation (qemu).
The Compact Flash card is attached to the system with a Syba IDE to CF adapter which I think is a way cool device that deserves greater attention
-
Anything in dmesg about your device?
-
I removed 'quiet' from the boot and observed the point where the scanner stopped working. Apparently, dmesg differs quite a bit from what is really seen when you boot, so I took a picture of the screen, and I will transcribe it here.
This is the most recent text when the scanner stopped working.
Freeing unused kernel memory: 344k freed
usb 1-1: new low speed USB device using ohi_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
I cannot add dmesg output for the world to see for all eternity because of the 20,000 character limit on the forum. I will put it on my website for a couple days.
www.timothylegg.com/dmesg.txt
-
I don't know how to get a more detailed report from the OS about the USB failure. If anybody has any ideas, that would be great. This problem is the last issue left before I can delpoy these systems to their departments.
Also, the problem exists, even with the use of a PCI based USB card (Syba SD-VIA-5U)
-
Load usb-utils.tcz and provide the output of lsusb -vv. Is it by chance a Tenx Technology (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/429044) device?
-
I would suggest contacting the scanner manufacturer.
If it does a proper keyboard emulation, it should "just work".
-
I opened it up, but didn't see any chips badged with Tenx. Although lsusb does say otherwise. My guess is that it is a Tenx chip that got re-badged as a Unitech.
Here is the output from lsusb.
http://www.timothylegg.com/lsusb.txt
Thank you very much
Load usb-utils.tcz and provide the output of lsusb -vv. Is it by chance a Tenx Technology (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/429044) device?
-
Bus 001 Device 012: ID 1130:0001 Tenx Technology, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x1130 Tenx Technology, Inc.
idProduct 0x0001
bcdDevice 1.00
iManufacturer 0
iProduct 2 USB-TMU-V3
You must have the Unitech MS-180 (http://www.mail-archive.com/debian-kernel@lists.debian.org/msg49495.html) barcode scanner. In any case, your only option is to remove it from the blacklist by editing hid-core.c as directed in that link then recompile the kernel. I can give you instructions or compile it myself and make it available to you.
-
The Symbol LS4208 works.
-
You must have the Unitech MS-180 (http://www.mail-archive.com/debian-kernel@lists.debian.org/msg49495.html) barcode scanner. In any case, your only option is to remove it from the blacklist by editing hid-core.c as directed in that link then recompile the kernel. I can give you instructions or compile it myself and make it available to you.
That is exactly the model. Why on earth would they blacklist this family of devices? It must have been a mistake.
I would appreciate a kernel. Although I would find the process of compiling a kernel fun, but I haven't sucessfully compiled a kernel since 2001 and that wasn't Linux. I am interested in trying again. Any references you recommend for the task?
Thanks!
-
The company didn't follow the rules (https://bugs.launchpad.net/linux/+bug/429044/comments/4):
Tenx Technology has chosen to give all their 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.
This device is now removed (http://www.mail-archive.com/debian-kernel@lists.debian.org/msg54001.html) from the blacklist, but that doesn't help you now. I have a script (http://forum.tinycorelinux.net/index.php?topic=677.msg22028#msg22028) that will help guide you in building your own kernel. It may be a bit tricky since you'll have to edit the kernel source and my script doesn't account for that. If you have some skill with shell script, you can manage it though. Send me a PM if you need help using it. I'll also build one myself (tonight perhaps) and send you a link.
The patches to hid-core.c (http://www.linuxhq.com/kernel/v2.6/33.1-rc1/drivers/hid/hid-core.c) and hid-ids.h (http://www.linuxhq.com/kernel/v2.6/33.1-rc1/drivers/hid/hid-ids.h) were part of 2.6.33.1-rc1, so Tiny Core 3.0 should work with your scanner.
-
I decided to compile a kernel. Last time I did this was with a FreeBSD 4.0 kernel about 8 or 9 years ago. Many failed attempts with a linux kernel over the last decade.
I found an intersting page:
http://wiki.tinycorelinux.com/Custom+Kernel
The instructions didn't do much for me, but it was a guide for getting it done. It also referenced an interesting ftp directory:
ftp://ftp.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/src/
I downloaded linux-2.6.29.1-built.tar.bz2 since it said it was built, I figured it was the closest to being ready to compile. I un-tarred the file, found the drivers/hid/hid-core.c and removed the two lines for IBUDDY. I ran make menuconfig and exited, make bzImage and copied the arch/x86/boot/bzImage to /boot/ on my Tiny Core distro.
The issue is resolved! And I compiled my first kernel in so many years.
Thanks to all whom participated in this discourse
Tim Legg
-
I found an intersting page
Yeah, I should have mentioned the wiki. It's your best guide to understanding TC.
The issue is resolved!
Good news. Anyone else who runs into this problem will have a good reference.