WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: USB device crashes when used in Tinycore  (Read 3263 times)

Offline Tim Legg

  • Newbie
  • *
  • Posts: 7
    • www.timothylegg.com
USB device crashes when used in Tinycore
« on: May 29, 2010, 07: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
« Last Edit: May 29, 2010, 07:28:36 PM by Tim Legg »
Tinycore : So cool that it is illegal in 14 states.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10963
Re: USB device crashes when used in Tinycore
« Reply #1 on: May 30, 2010, 03:15:05 AM »
Anything in dmesg about your device?
The only barriers that can stop you are the ones you create yourself.

Offline Tim Legg

  • Newbie
  • *
  • Posts: 7
    • www.timothylegg.com
Re: USB device crashes when used in Tinycore
« Reply #2 on: June 01, 2010, 12:02:57 PM »
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
Tinycore : So cool that it is illegal in 14 states.

Offline Tim Legg

  • Newbie
  • *
  • Posts: 7
    • www.timothylegg.com
Re: USB device crashes when used in Tinycore
« Reply #3 on: June 03, 2010, 01:16:57 PM »
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)
Tinycore : So cool that it is illegal in 14 states.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: USB device crashes when used in Tinycore
« Reply #4 on: June 03, 2010, 02:09:43 PM »
Load usb-utils.tcz and provide the output of lsusb -vv. Is it by chance a Tenx Technology device?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: USB device crashes when used in Tinycore
« Reply #5 on: June 03, 2010, 03:58:53 PM »
I would suggest contacting the scanner manufacturer.
If it does a proper keyboard emulation, it should "just work".

Offline Tim Legg

  • Newbie
  • *
  • Posts: 7
    • www.timothylegg.com
Re: USB device crashes when used in Tinycore
« Reply #6 on: June 07, 2010, 11:44:53 AM »
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 device?
Tinycore : So cool that it is illegal in 14 states.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: USB device crashes when used in Tinycore
« Reply #7 on: June 07, 2010, 12:05:15 PM »
Quote
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 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.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: USB device crashes when used in Tinycore
« Reply #8 on: June 07, 2010, 12:53:18 PM »
The Symbol LS4208 works.

Offline Tim Legg

  • Newbie
  • *
  • Posts: 7
    • www.timothylegg.com
Re: USB device crashes when used in Tinycore
« Reply #9 on: June 07, 2010, 01:26:37 PM »
Quote
You must have the Unitech MS-180 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!
Tinycore : So cool that it is illegal in 14 states.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: USB device crashes when used in Tinycore
« Reply #10 on: June 07, 2010, 03:26:57 PM »
The company didn't follow the rules:
Quote
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 from the blacklist, but that doesn't help you now. I have a script 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 and hid-ids.h were part of 2.6.33.1-rc1, so Tiny Core 3.0 should work with your scanner.
« Last Edit: June 07, 2010, 03:38:24 PM by danielibarnes »

Offline Tim Legg

  • Newbie
  • *
  • Posts: 7
    • www.timothylegg.com
Re: USB device crashes when used in Tinycore
« Reply #11 on: June 07, 2010, 10:03:18 PM »
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
Tinycore : So cool that it is illegal in 14 states.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: USB device crashes when used in Tinycore
« Reply #12 on: June 08, 2010, 07:25:50 AM »
Quote
I found an intersting page
Yeah, I should have mentioned the wiki. It's your best guide to understanding TC.

Quote
The issue is resolved!
Good news. Anyone else who runs into this problem will have a good reference.