[sane-devel] Re: HP 4570c - progress report

Bertrik Sikken bertrik at zonnet.nl
Mon Sep 19 20:03:34 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Franke wrote:
> Looking further: this null-byte seems to be some kind of ACK. If the
> HOST reads from DEVICE, the HOST has to ACK that it got the data (send
> a null-byte). OTOH, if the HOST sets a register (e.g. on/off status),
> the DEVICE has to ACk that it got the value and that it was ok (?), so
> the DEVICE sends the ACK, the HOST has to read it.
> 
> Seems to be part of the USB-over-USB protocol?!

Yes, could be.
I think you are currently the person who knows most about this
scanner protocol :)

>>>Are there any other known HP5400 command bytes I could give a try?
>>
>>Have a look at the #defines in backend/hp5400_internal.h from the
>>sane-backends package.
> 
> 
> Yes, I could identify some more shared commands, some of them marked
> with "???" in hp5400_internals.h -- btw, if I get an idea what some of
> these commands are meant to do, whom to tell? Who is the (official)
> maintainer of the 5400-backend?
> 
> As an example, hp5400_internal.h:82: 
> #define CMD_UNKNOWN3     0xC000        /* ??? Set to 02 03 03 3C */
> 
> If sending this command (with different bytes), the scanner is turned
> on if it was off before. The lamp is switched on and it seems to
> calibrate itself (the carriage is moving to some extend)?!
> 
> 
> 
>>A very cool thing to start with, is to try to switch the scanner
>>lamp on or off. As far as I can tell from the hp5400 backend, this
>>can be done with command 0x1BXX.
> 
> 
> I'll give them a try ... IIRC, I've observed that at some point in the
> logs 0x1b01 was sent to the device, but 0x1b00 was read when the
> previous command was read back. I'll have to double check this.

I have seen this in the hp5400 logs too.
When I looked at them, the lower byte of the command was a bit
unclear, seems like some sort of parameter for the command
specified in the upper byte.
At some point, when the bulk transfers (that contain the actual
scan data) start, commands like 0x0082, 0x0083 and 0x0087 are
sent. These are used in many other type of USB scanners and are
meant to talk to some USB-to-parallel port converter chip.

>>By the way: some scanners are not protected from moving the carriage
>>beyond their physical limits. 
> 
> 
> Jep, the HP4570c isn't ... boldly trying to mimic a preview scan
> resulted in a carriage racing all the way from one end to the other
> within two seconds. There was an awful sound, but it is still working
> =)
> 
> 
> One more question: I used a windows installation and snoopypro to get
> a log of a preview scan - I'm missing the actual data?! Does snoopypro
> not log the actual (image)data transfer?

I don't know.
There are many versions of the usb sniffer log tools.
The one that Allan recommends is indeed a good one.

Regards,
Bertrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDLxmWETD6mlrWxPURAglwAJwMPxUfzW7gm0z1oVQPtuqvViUBYgCghnl6
Kojb6/KYT9LLOIuIKzO0Fqk=
=0Bei
-----END PGP SIGNATURE-----



More information about the sane-devel mailing list