Hi all,

      Around a month ago I bought Epson Perfection 1670 scanner. This is a
very new model of Epson
scanner. It does not conform to the Epson Scanner Language specification so
I have decided to reverse
engineer it.
      My machine is Athlon XP1600+ on ASUS motherboard based on VIA KT400
running Win2k and
Mandrake Linux 9.1 with a stock kernel 2.4.22-pre10 (I do not use Mandrake
kernel).
      I have installed Epson scanner software on this machine, connected
the scanner and everything
works O.K. - I can scan. Now I have to explain that this scanner has a
little multicolor LED on its SCAN button.
When the scanner is ready the LED is steady green. When it is warming up it
is blinking green. When it is
some sort ERROR condition (like the transport mechanism is blocked) the LED
is blinking red. That much
is written in the documentation supplied with it (the size of docs is
laughable - one folded A3 piece of paper).
Now for the purpose of having a look at the USB exchange between Win2K and
the scanner I have
downloaded three different USB snooping programs: SnoopyPro, SniffUSB and
USBSnoop and started
to play with them. After some time I have noticed that the LED went BLUE
and all these snooping programs
started to behave strangely. I checked the Control Panel and the scanner
was listed there as UNAVAILABLE.
I did not know what this was all about. I have decided to delete the
scanner completely from Win2K, and then
reinstall the Epson software. It fixed everything. I suspect that during
the course of playing with all these
snooping software I must have accidentally deleted (or somehow screwed)
Epson drivers for the scanner.
I have checked the documentation - the BLUE LED is not mentioned there at
all.
      Now Linux....
      I have recompiled the kernel with the USB support and with ehci and
uhci drivers as modules. As
soon as I modprobe ehci or uhci the LED goes BLUE. This is the output from
cat /proc/bus/usb/devices :

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.04
S:  Manufacturer=Linux 2.4.22-pre10 ehci_hcd
S:  Product=VIA Technologies, Inc. USB 2.0
S:  SerialNumber=00:10.3
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=04b8 ProdID=011f Rev= 1.07
S:  Manufacturer=EPSON
S:  Product=EPSON Scanner
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=4096ms

As you can see I have only one USB device - and it is recognised properly
and everything looks O.K. at least
to me. Now I tried to send a simple control message to the scanner
GET_DESCRIPTOR using interactive mode
of usb-robot :

[EMAIL PROTECTED] usb-robot-0.2.0]# ./usb-robot-slave product=0x11f vendor=0x4b8
./usb-robot-slave: starting usb-robot version 0.2.0
  (c) 2000, 2001 John Fremlin
  Licensed under the GNU Public License version 2, see file COPYING.
  You didn't pay me for this program. You have no rights.
doing bus scan for:
        idVendor 0x4b8
        idProduct 0x11f
found bus 001
scanning bus 001
device 001 on bus 001 does not match
found device 002 on bus 001 (idVendor 0x4b8 idProduct 0x11f)
opening device 002 on bus 001
OK: id=0
Type help and press return for a list of commands
usb-robot> config 1
OK: id=1
usb-robot> interface 0
OK: id=2
usb-robot> transfer type=control requesttype=0x80 request=0x6 value=1
index=0 size=0x12
.
.
.
doing control message id 3 to device, size 18, timeout 10000 frames,
80:6:1:0
status: problem doing control msg
usb error: No error
ERROR: id=3
usb-robot>

Can you see the status and control messages at the end of the output. The
status message talks about a problem
and the error message says there is no error. What is going on??? I had a
close look at the usb-robot code and
found out that ultimately this messages is sent from libusb routine calling
kernel ioctl() function. The LED stays
BLUE all the time the ehci or uhci drivers are in. When I rmmod them the
diode goes GREEN.
I have also decided to include some other relevant outputs.
This is the output from lspci -vvv:

00:10.0 USB Controller: VIA Technologies, Inc. USB (rev 80) (prog-if 00
[UHCI])
      Subsystem: Asustek Computer, Inc.: Unknown device 808c
      Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr-
Stepping- SERR- FastB2B-
      Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
      Latency: 32, cache line size 08
      Interrupt: pin A routed to IRQ 9
      Region 4: I/O ports at a000 [size=32]
      Capabilities: [80] Power Management version 2
            Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA
PME(D0+,D1+,D2+,D3hot+,D3cold+)
            Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:10.1 USB Controller: VIA Technologies, Inc. USB (rev 80) (prog-if 00
[UHCI])
      Subsystem: Asustek Computer, Inc.: Unknown device 808c
      Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr-
Stepping- SERR- FastB2B-
      Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
      Latency: 32, cache line size 08
      Interrupt: pin B routed to IRQ 9
      Region 4: I/O ports at 9800 [size=32]
      Capabilities: [80] Power Management version 2
            Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA
PME(D0+,D1+,D2+,D3hot+,D3cold+)
            Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:10.2 USB Controller: VIA Technologies, Inc. USB (rev 80) (prog-if 00
[UHCI])
      Subsystem: Asustek Computer, Inc.: Unknown device 808c
      Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr-
Stepping- SERR- FastB2B-
      Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
      Latency: 32, cache line size 08
      Interrupt: pin C routed to IRQ 9
      Region 4: I/O ports at 9400 [size=32]
      Capabilities: [80] Power Management version 2
            Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA
PME(D0+,D1+,D2+,D3hot+,D3cold+)
            Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) (prog-if 20
[EHCI])
      Subsystem: Asustek Computer, Inc.: Unknown device 808c
      Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr-
Stepping- SERR- FastB2B-
      Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
      Latency: 32, cache line size 10
      Interrupt: pin D routed to IRQ 9
      Region 0: Memory at f0000000 (32-bit, non-prefetchable) [size=256]
      Capabilities: [80] Power Management version 2
            Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA
PME(D0+,D1+,D2+,D3hot+,D3cold+)
            Status: D0 PME-Enable- DSel=0 DScale=0 PME-

This is the output from cat /proc/interrupts :

           CPU0
  0:     198384          XT-PIC  timer
  1:       1365          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  9:      19507          XT-PIC  ehci_hcd, eth0, eth1
 11:       3941          XT-PIC  aic7xxx
 14:        214          XT-PIC  ide0
 15:        123          XT-PIC  ide1
NMI:          0
ERR:          0

This is the output from cat  /proc/iomem :

00000000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000cc000-000d1fff : Extension ROM
000d4000-000d47ff : Extension ROM
000f0000-000fffff : System ROM
00100000-3fffbfff : System RAM
  00100000-00319ce1 : Kernel code
  00319ce2-003c2d1f : Kernel data
3fffc000-3fffefff : ACPI Tables
3ffff000-3fffffff : ACPI Non-volatile Storage
f0000000-f00000ff : VIA Technologies, Inc. USB 2.0
  f0000000-f00000ff : ehci_hcd
f0800000-f0803fff : Creative Labs SB Audigy FireWire Port
f1000000-f10007ff : Creative Labs SB Audigy FireWire Port
f1800000-f1800fff : Adaptec AHA-2940U/UW/D / AIC-7881U
  f1800000-f1800fff : aic7xxx
f2000000-f200007f : 3Com Corporation 3c905C-TX/TX-M [Tornado]
f2800000-f280ffff : Broadcom Corporation NetXtreme BCM5702 Gigabit Ethernet
  f2800000-f280ffff : tg3
f3000000-f301ffff : Promise Technology, Inc. PDC20376
f3800000-f3800fff : Promise Technology, Inc. PDC20376
f4000000-f40007ff : VIA Technologies, Inc. IEEE 1394 Host Controller
f4800000-f5dfffff : PCI Bus #01
  f4800000-f4ffffff : Matrox Graphics, Inc. MGA G550 AGP
  f5000000-f5003fff : Matrox Graphics, Inc. MGA G550 AGP
    f5000000-f5003fff : matroxfb MMIO
f5f00000-f7ffffff : PCI Bus #01
  f6000000-f7ffffff : Matrox Graphics, Inc. MGA G550 AGP
    f6000000-f7ffffff : matroxfb FB
f8000000-fbffffff : VIA Technologies, Inc. VT8377 [KT400 AGP] Host Bridge
fec00000-fec00fff : reserved
fee00000-fee00fff : reserved
ffff0000-ffffffff : reserved

And these are two relevant snippets from dmesg:

.
.
.
ehci_hcd 00:10.3: capability 0001 at 68
ehci_hcd 00:10.3: reset command 080002 (park)=0 ithresh=8 period=1024 Reset
HALT
PCI: 00:10.3 PCI cache line size set incorrectly (32 bytes) by BIOS/FW.
PCI: 00:10.3 PCI cache line size corrected to 64.
ehci_hcd 00:10.3: init command 010009 (park)=0 ithresh=1 period=256 RUN
ehci_hcd 00:10.3: USB 2.0 enabled, EHCI 1.00, driver 2003-Jun-19/2.4
hcd.c: 00:10.3 root hub device address 1
usb.c: kmalloc IF f7c53e80, numif 1
usb.c: new device strings: Mfr=3, Product=2, SerialNumber=1
usb.c: USB device number 1 default language ID 0x0
Manufacturer: Linux 2.4.22-pre10 ehci_hcd
Product: VIA Technologies, Inc. USB 2.0
SerialNumber: 00:10.3
hub.c: USB hub found
hub.c: 6 ports detected
hub.c: standalone hub
hub.c: ganged power switching
hub.c: individual port over-current protection
hub.c: Single TT
hub.c: TT requires at most 8 FS bit times
hub.c: Port indicators are not supported
hub.c: power on to power good time: 0ms
hub.c: hub controller current requirement: 0mA
hub.c: port removable status: RRRRRR
hub.c: local power source is good
hub.c: no over-current condition exists
hub.c: enabling power on all ports
usb.c: hub driver claimed interface f7c53e80
usb.c: kusbd: /sbin/hotplug add 1
usb.c: kusbd policy returned 0xfffffffe
mice: PS/2 mouse device common for all mice
.
.
.
md: raid0 personality registered as nr 2
Freeing unused kernel memory: 120k freed
hub.c: port 1, portstatus 501, change 0, 480 Mb/s
hub.c: port 1, portstatus 501, change 0, 480 Mb/s
hub.c: port 1, portstatus 511, change 0, 480 Mb/s
hub.c: port 1 of hub 1 not reset yet, waiting 10ms
hub.c: port 1, portstatus 511, change 0, 480 Mb/s
hub.c: port 1 of hub 1 not reset yet, waiting 10ms
ehci_hcd 00:10.3: port 1 high speed
ehci_hcd 00:10.3: GetStatus port 1 status 001005 POWER sig=se0  PE CONNECT
hub.c: port 1, portstatus 503, change 10, 480 Mb/s
hub.c: new USB device 00:10.3-1, assigned address 2
usb.c: kmalloc IF f7b7cdc0, numif 1
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
usb.c: USB device number 2 default language ID 0x409
Manufacturer: EPSON
Product: EPSON Scanner
usb.c: unhandled interfaces on device
usb.c: USB device 2 (vend/prod 0x4b8/0x11f) is not claimed by any active
driver.
  Length              = 18
  DescriptorType      = 01
  USB version         = 2.00
  Vendor:Product      = 04b8:011f
  MaxPacketSize0      = 64
  NumConfigurations   = 1
  Device version      = 1.07
  Device Class:SubClass:Protocol = ff:ff:ff
    Vendor class
Configuration:
  bLength             =    9
  bDescriptorType     =   02
  wTotalLength        = 0027
  bNumInterfaces      =   01
  bConfigurationValue =   01
  iConfiguration      =   00
  bmAttributes        =   c0
  MaxPower            =  100mA

  Interface: 0
  Alternate Setting:  0
    bLength             =    9
    bDescriptorType     =   04
    bInterfaceNumber    =   00
    bAlternateSetting   =   00
    bNumEndpoints       =   03
    bInterface Class:SubClass:Protocol =   ff:ff:ff
    iInterface          =   00
    Endpoint:
      bLength             =    7
      bDescriptorType     =   05
      bEndpointAddress    =   81 (in)
      bmAttributes        =   02 (Bulk)
      wMaxPacketSize      = 0200
      bInterval           =   00
    Endpoint:
      bLength             =    7
      bDescriptorType     =   05
      bEndpointAddress    =   02 (out)
      bmAttributes        =   02 (Bulk)
      wMaxPacketSize      = 0200
      bInterval           =   00
    Endpoint:
      bLength             =    7
      bDescriptorType     =   05
      bEndpointAddress    =   83 (in)
      bmAttributes        =   03 (Interrupt)
      wMaxPacketSize      = 0008
      bInterval           =   10
usb.c: kusbd: /sbin/hotplug add 2
hub.c: port 2, portstatus 100, change 0, 12 Mb/s
hub.c: port 3, portstatus 100, change 0, 12 Mb/s
hub.c: port 4, portstatus 100, change 0, 12 Mb/s
hub.c: port 5, portstatus 100, change 0, 12 Mb/s
hub.c: port 6, portstatus 100, change 0, 12 Mb/s
EXT3 FS 2.4-0.9.19, 19 August 2002 on md(9,0), internal journal
.
.
.


Now I have recently read a posting on usb-users or usb-devel list from
someone saying that
Via KT400 chipsets have some known problem and in the result try to
allocate all the devices
to single interrupt, which then gets crowded. The cat /proc/interrupts
output shows that I have
got three devices hanging on INT9. But I do not think this is the problem
because I have tried
this whole thing on my second computer  - and old Pentium 200MMX with Intel
TX chipset
(anyone remembers these???). This thing runs exactly the same setup as my
Athlon machine
with the exception that I use Win98SE on Windows side (works perfectly with
the scanner) and
I use uhci driver on Linux side, because it is USB 1.0 only. With this one
is the same - as long
as I have uhci module in the LED stays BLUE. The cat /proc/interrupts from
this one reveals
that uhci is on a separate interrupt - i.e. not sharing it with anything
else.

      What else can I do??? The BLUE light signifies some sort of broken
condition in USB,
but what? The EPSON support to this problem is 100% predictable: "Please
reintall your
Windows software".

      Any hints will be appreciated.


Regards


Tad Prus-Wisniowski




****************************************************************
NOTICE - This message is intended only for the use of the 
addressee named above and may contain privileged and 
confidential information.  If you are not the intended recipient
of this message you are hereby notified that you must not 
disseminate, copy or take any action based upon it.  If you 
received this message in error please notify HIC immediately.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of HIC.
****************************************************************



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to