Re: HP Scanjet 3300 [also Re: HP 3400 scanner information]

From: Jay Higley (higleyj@xontech.com)
Date: Thu Jan 04 2001 - 05:43:21 PST

  • Next message: mh: "SANE + i18n (?)"

    The extra traffic in the control URB's may be due to the process which
    watches for button presses. When I was capturing the log file for the
    3300 I noticed that the log had data being collected even when the scan
    application was inactive, and traced it down to some settings under the
    "scanner" icon in the control panel. In there you specify which
    applications are tied to which button on the scanner. I can't remember if
    I had disabled the polling for button presses before I took the log file
    that I sent for the 3300, but I could send you a log file with just the
    button press polls if you would like.

    -Jay Higley

    On Tue, 2 Jan 2001, Adrian Perez Jorge wrote:

    >
    > Hi Scott, Jay and all...
    >

    [SNIP]...

    > Firstly, I must say I have no idea about the values that the Index
    > field gets during the scanning process. That's a mistery for me at
    > the moment, until somebody give to me a second log file. Then I'll
    > check if the field will get the same values.
    >
    > But Value and Buffer contents seems to have some special patters.
    >
    > When the computer wants to start talking to the scanner, it uses a
    > special sequence. I have also found the piece of assembler code that
    > generates that sequence, wich is:
    >
    > Value Data
    > ===============
    > 0088 a0
    > 0088 a8
    > 0088 50
    > 0088 58
    > 0088 90
    > 0088 98
    > 0088 c0
    > 0088 c8
    > 0088 90
    > 0088 98
    > 0088 e0
    > 0088 e8
    >
    > You can check those values in all log files, and you will see
    > that (maybe) this sequence is repeated more than once during the log.
    > The Value field 0x0088 is used only in the ``startup sequence''.
    >
    > Here is the assembler code:
    >
    > :067F4940 83EC08 sub esp, 00000008
    > :067F4943 A130158006 mov eax, dword ptr [06801530]
    > :067F4948 C744240000000000 mov [esp], 00000000
    > :067F4950 83F801 cmp eax, 00000001
    > :067F4953 C744240400000000 mov [esp+04], 00000000
    > :067F495B 7579 jne 067F49D6
    > :067F495D 68A0000000 push 000000A0
    > :067F4962 E8394D0000 call 067F96A0
    > :067F4967 68A8000000 push 000000A8
    > :067F496C E82F4D0000 call 067F96A0
    > :067F4971 6A50 push 00000050
    > :067F4973 E8284D0000 call 067F96A0
    > :067F4978 6A58 push 00000058
    > :067F497A E8214D0000 call 067F96A0
    > :067F497F 6890000000 push 00000090
    > :067F4984 E8174D0000 call 067F96A0
    > :067F4989 6898000000 push 00000098
    > :067F498E E80D4D0000 call 067F96A0
    > :067F4993 68C0000000 push 000000C0
    > :067F4998 E8034D0000 call 067F96A0
    > :067F499D 68C8000000 push 000000C8
    > :067F49A2 E8F94C0000 call 067F96A0
    > :067F49A7 6890000000 push 00000090
    > :067F49AC E8EF4C0000 call 067F96A0
    > :067F49B1 6898000000 push 00000098
    > :067F49B6 E8E54C0000 call 067F96A0
    > :067F49BB 68E0000000 push 000000E0
    > :067F49C0 E8DB4C0000 call 067F96A0
    > :067F49C5 68E8000000 push 000000E8
    > :067F49CA E8D14C0000 call 067F96A0
    > :067F49CF 83C430 add esp, 00000030
    > :067F49D2 83C408 add esp, 00000008
    > :067F49D5 C3 ret
    >
    > [snip]
    >
    > :067F96A0 8A442404 mov al, byte ptr [esp+04]
    > :067F96A4 8D4C2404 lea ecx, dword ptr [esp+04]
    > :067F96A8 51 push ecx
    > :067F96A9 6A01 push 00000001 # buffer length
    > :067F96AB 6888000000 push 00000088 # Value field
    > :067F96B0 88442410 mov byte ptr [esp+10], al
    > :067F96B4 E807000000 call 067F96C0
    > :067F96B9 83C40C add esp, 0000000C
    > :067F96BC C3 ret
    >
    > q.e.d.
    >
    > What other values the `Value' field can get? Inspecting the assembler
    > code I could say... those:
    >
    > Value length of the buffer direction
    > ===============================================
    > 0083 1 OUT (write)
    > 0084 1 IN (read)
    > 0085 1 OUT
    > 0087 1 OUT
    > 0088 1 OUT
    > 0082 8 OUT
    >
    > What is the exact meaning of these command values? No idea yet, but
    > we can try understand them by the way they are used.
    >
    > There are some patterns that you will find frequently in the log
    > file. Those are:
    >
    > Type I
    >
    > Value buffer contents
    > ===========================
    > 0087 14
    > 0083 (any byte)
    >
    > Type II
    >
    > Value buffer contents
    > ===========================
    > 0087 14
    > 0085 (any byte)
    >
    > Type III
    >
    > Value buffer contents
    > ===========================
    > 0087 14
    > 0087 34
    > 0084 (reads one byte)
    > 0087 14
    >
    >
    > Type II sequences are used to appear after Type I sequences.
    >
    > The behaviour of Type III sequences is to read a (status) byte from
    > the scanner/USB interface.
    >
    > The byte values at Type I and II sequences are still an enigma.
    >
    >
    > The last one is the Type IV `sequence'. That's the more interesting.
    >
    > Type IV
    >
    > Value buffer contents
    > ===========================
    > 0082 (an 8-byte vector
    > with a bulk tranfer
    > length coded)
    > [bulk transfer of data]
    >
    >
    > The 8-byte vectors I have found in the hp4300 log file are:
    >
    > 01 01 00 00 60 00 00 00
    > ^ ^
    > | +--- hi-byte (length)
    > +------ lo-byte (length)
    >
    > 00 00 00 00 2a 5d 00 00
    >
    >
    > This one is from the hp3300 log file:
    >
    > 01 00 00 00 38 dc 00 00a
    >
    > The length of the following bulk transfer is coded always in the same
    > byte positions.
    >
    > Some bulk transfers of Type IV sequences are sent _to_ the scanner
    > (write) and others the data comes is sent _from_ the scanner (read).
    > I could find the data that the computer sends to the scanner in the
    > data segment of the dll, but the meaning of the data is also an
    > enigma. I thought about gamma or calibration table values, but
    > it doesn't seem to be the case.
    >
    > III.- So... what now?
    > ---------------------
    >
    > It will be nice to:
    >
    >
    > *) generate more log files, using the same scanning parameters and
    > different ones to see what has changed and what not,
    >
    > *) to know if there is a background program running that is checking
    > the scanner/button status and produces interferences in the log file,
    >
    > *) know if somebody (developers of SCSI, USB or pport SANE backends)
    > can recognize the protocol,
    >
    > *) find somebody who can use a windoze debugger and owns a hp4300,
    > hp3400 or hp3300 scanner, to know when external events (scanner head
    > moves, lamp on/off, etc) happens in what part of the log file, and
    > maybe much more information,
    >
    > *) excuse me for my english, copyright notices and publishing this in
    > the SANE mailing list ;)
    >
    > Cheers,
    >
    >
    >
    > Adrian Perez Jorge
    > <adrianpj@easynews.com>
    >
    > ------------------------------------------------------------
    > Free Web space and web based email @EASYNEWS.COM
    >

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Thu Jan 04 2001 - 05:24:34 PST