[sane-devel] mustek_usb2 SQ113 Tevion MD 90070
Albert ARIBAUD
albert.aribaud at free.fr
Sun Jun 24 10:21:19 UTC 2012
Le 23/06/2012 16:04, Jan Hauffa a écrit :
> Hi Albert,
Hi Jan,
> Am 22.06.12 23:55, schrieb Albert ARIBAUD:
>> I'd also like to get this running, as I own a HP ScanJet 4460 which
>> sane-find-scanner tells me has a SQ113 as well.
Oops. Typo here, I meant to type 4600, not 4460. Your answer fits only
better. :)
> The first step is to identify the firmware of your scanner. In 2008,
> Triften Chmil did some research on the HP 4600 [1], which also contains
> a SQ113. While the low level protocol was the same as the one supported
> by the mustek_usb2 backend, the high level commands were different, so
> he wasn't able to reuse much of the mustek_usb2 code. As I've written in
> my previous mail, I suppose these commands are not hardwired in the
> SQ113, but implemented in firmware.
Ok, so identifying the firmware is probably somewhat moot now, as I have
the same model as Chmil already identified, but I went ahead anyway, as
it was a good simple test to see if my libusb devel was correctly
installed. :)
> I've attached a small C program that will dump the status registers of
> the SQ113. The last 4-8 bytes usually contain some kind of firmware ID.
> For the Mustek BearPaw 2448TA Pro this is "ESCAN01", for the Medion
> MD90093 it is "ES03". This corresponds to the name "EasyScan", which is
> mentioned several times in the mustek_usb2 source.
I had to modify the build line mentioned at the top of the file, as on
my Ubuntu 64-bit Precise option '-lusb-1.0' would work only if put after
the source file name, not before. I also made a crude "display also as
ascii if printable, otherwise as a dot" addition because I like to
overwork so I can be lazy afterward. :)
The result is:
0x51 Q 0x27 ' 0x27 ' 0x71 q 0xFE . 0xFF . 0x92 . 0x00 . 0x00 . 0xA9 .
0xFD . 0x0F . 0x32 2 0x37 7 0x00 . 0x96 .
0x10 . 0x00 . 0x00 . 0x00 . 0x71 q 0x00 . 0x00 . 0x00 . 0x00 . 0x00 .
0x00 . 0x71 q 0x53 S 0x31 1 0x32 2 0x30 0
Seems like the firmware identification is 'S120'. A perfunctory google
search for S120 in conjunction with any of HP 4600 or SQ113 did not show
any useable result.
> The next step is to obtain some dumps of the USB traffic [2] on Windows.
> Connecting and disconnecting the scanner (and maybe doing a preview
> scan) should be sufficient in the beginning. The USBDumpAnalyzer script
> [3] will help you interpret the data. If your scanner uses a variant of
> the EasyScan firmware, you'll probably be able to adapt the modified
> mustek_usb2 backend I've posted on github [4]. Otherwise, I recommend
> you find out how big the differences to the "EasyScan protocol" actually
> are - you might be able to work with the mustek_usb2 backend anyway. If
> the protocol is too different, your best bet is to create a new backend,
> possibly using Triften's hp4600 code [5] as a reference. You should be
> able to reuse the low-level functions in mustek_usb2_asic.c and the
> boilerplate code in mustek_usb2.c at least.
Trften's code seems to have been generated from USBSnoop traces anyway,
so I guess the first thing is I'll compare his code to your mustek_usb2
backend (I could compare it to the original backend but I assume the one
most likely to get into stable sane is yours).
> Best regards,
> Jan
>
> [1]
> http://lists.alioth.debian.org/pipermail/sane-devel/2008-December/023274.html
> [2] http://www.pcausa.com/Utilities/UsbSnoop/
> [3] https://github.com/jhauffa/USBDumpAnalyzer
> [4] https://github.com/jhauffa/sane-sq113
> [5] http://www.chmil.org/hp4600linux/
Thanks a lot for your help and references!
Amicalement,
--
Albert.
More information about the sane-devel
mailing list