[sane-devel] Adding S1300i support
Ben Challenor
ben at challenor.org
Sat Jun 8 20:32:16 UTC 2013
Hi
I'm trying to add support for the S1300i to the epjitsu backend.
I've written a pcap analyzer in Scala
(https://github.com/bchallenor/epjitsu-analyzer) which dumps the
commands to a log file. It then pulls out the magic data and writes a
C header file. You can see all the logs/header files at
https://github.com/bchallenor/epjitsu-analyzer-logs.
I've run into a few issues so far:
1) There are quite a few commands used by the S1300i Windows driver
which aren't mentioned in epjitsu.c. All the unknown command sequences
I've seen are collected together in unknown-commands.log:
- b0/b2/b3/b4: these seem to set a byte (b0/b2 could be a boolean)
- b5/b6: these seem to get a u16 (b5 always gives 0x19, 0x00 and b6
always gives 0x10, 0x1e)
- d8: probably sets a boolean (I've seen both 0 and 1)
- e1: another byte/boolean
- 24: receives 256 (!) bytes (no idea what for, but it only appears in
init.log, not any of the scan logs)
Have you come across any of these before? If not, is there any Fujitsu
documentation? Or has the whole driver been reverse engineered?
2) As assumed in epjitsu-cmd.h, most of the magic data I've extracted
is the same for a given resolution. However it seems that the c3/c4
cal headers are different for every combination of settings I've tried
(compare e.g. 300 at color-300-simplex-stop.pcap.h with
300 at gray-300-simplex-stop.pcap.h). Could this actually be the case
with the S300 too? There are commented-out values for these for the
S300 so possibly there was some confusion as to their correct values.
3) Do you have any tips for deducing the integer values in model_res?
Do you just work backwards from what the Windows driver transferred?
For example, I've got the scanner as far as the first c6 coarse cal
but it's under reading at the moment. The Windows driver reads 48584
bytes at 300dpi but epjitsu only attempts 24576 (line_stride 24576,
height 1) if I copy the S300 settings.
Thanks
Ben
More information about the sane-devel
mailing list