[sane-devel] HP 4570c - progress report

Daniel Franke franke.daniel at gmail.com
Sat Sep 17 23:27:43 UTC 2005


On Wednesday 14 September 2005 21:41, Bertrik Sikken wrote:

> > On Tue, Sep 13, 2005 at 07:36:19PM +0200, Bertrik Sikken wrote:
> > > The protocol is weird because it seems to implement some kind of
> > > 'USB-over-USB', i.e. the data payload of the USB control packets
> > > looks like another USB control packet. The payload size never
> > > appears to exceed 8 bytes.
>
> [snip]
>
> The more I look at the usbsnoopy log, the more it looks similar
> to the hp5400 backend. This is probably good news because the
> hp5400 accepts a limited set of commands instead of dozens of
> writes to various registers.


Bertrik, Henning,

I managed to reliably pass some bytes between my test program and 
the scanner. 

Already working: 
 * an answer to 0x1200 (version information of HP 5400 -- "SILITEKIElwood")
 * re-read the last command (0xc500, same as HP 5400)

An observation: 
Each command sequence has to be "terminated" by a null-byte, otherwise 
communication gets out of sync. A command sequence looks like ...
  - set up and write a "usb_ctrl_setup"-structure (defined in <usb.h>)
  - read the answer
  - send another '\0' to the device

Does this look familiar? 
Are there any other known HP5400 command bytes I could give a try?


Thanks for your help =)

	Daniel


P.S. some kernel debug output, corresponds to the first x packets 
of the log from snoopypro:

[snip]
usbdev_ioctl: CLAIMINTERFACE
usbdev_ioctl: CONTROL
control read: bRequest=06 bRrequestType=80 wValue=0100 wIndex=0000
control read: data 12 01 00 02 ff ff ff 40 f0 03 05 13 01 03 01 02 00 01
usbdev_ioctl: CONTROL
control read: bRequest=06 bRrequestType=80 wValue=0200 wIndex=0000
control read: data 09 02 27 00 01 01 00 c0 05 09 04 00 00 03 ff ff ff 00 07 05 
81 02 40 00 00 07 05 02 02 40 00 00 07 05 83 03 01 00 08
usbdev_ioctl: SETCONFIGURATION
usbfs: interface 0 claimed while 'hp4570c-version' sets config #1
usbdev_ioctl: CONTROL
control read: bRequest=0c bRrequestType=c0 wValue=008e wIndex=0000
control read: data 0c
usbdev_ioctl: CONTROL
control write: bRequest=04 bRrequestType=40 wValue=008f wIndex=0000
control write: data: c0 04 00 12 00 00 32 00
usbdev_ioctl: CONTROL
control read: bRequest=04 bRrequestType=c0 wValue=0090 wIndex=0000
control read: data 08 53 49 4c 49 54 45 4b
usbdev_ioctl: CONTROL
control read: bRequest=04 bRrequestType=c0 wValue=0090 wIndex=0000
control read: data 49 45 6c 77 6f 6f 64 00
usbdev_ioctl: CONTROL
control read: bRequest=04 bRrequestType=c0 wValue=0090 wIndex=0000
control read: data 00 00 00 00 00 00 00 00
usbdev_ioctl: CONTROL
control read: bRequest=04 bRrequestType=c0 wValue=0090 wIndex=0000
control read: data 00 65 2e 30 32 36 09 60
usbdev_ioctl: CONTROL
control read: bRequest=04 bRrequestType=c0 wValue=0090 wIndex=0000
control read: data 09 60 4f b0 6d e0 00 00
usbdev_ioctl: CONTROL
control read: bRequest=04 bRrequestType=c0 wValue=0090 wIndex=0000
control read: data 00 00 00 00 00 00 00 64
usbdev_ioctl: CONTROL
control read: bRequest=04 bRrequestType=c0 wValue=0090 wIndex=0000
control read: data 03 e8
usbdev_ioctl: CONTROL
control write: bRequest=0c bRrequestType=40 wValue=008f wIndex=0000
control write: data: 00
usbdev_ioctl: CONTROL
control write: bRequest=04 bRrequestType=40 wValue=008f wIndex=0000
control write: data: c0 04 00 c5 00 00 02 00
usbdev_ioctl: CONTROL
control read: bRequest=04 bRrequestType=c0 wValue=0090 wIndex=0000
control read: data 12 00
usbdev_ioctl: CONTROL
control write: bRequest=0c bRrequestType=40 wValue=008f wIndex=0000
control write: data: 00
usbdev_ioctl: RELEASEINTERFACE
[snip]













More information about the sane-devel mailing list