1Made by Kyushu Matsushita Electric, a.k.a. Panasonic
2http://www.kme.panasonic.co.jp/
3http://panasonic.com/
4
5The same twain driver handle these scanners:
6Same family as  KV-SS25, KV-SS50, KV-SS55, KV-SS50EX, KV-SS55EX, KV-SS850, KV-SS855.
7
8Another driver handle the KV-S2055L, KV-S2055W.
9
10However all these scanner show similarities.
11
12/*--------------------------------------------------------------------------*/
13
14SCSI commands supported by the KV-SS25:
15
16TEST UNIT READY:
1700 00 00 00 00 00
18
19REQUEST SENSE:
2003 00 00 00 0E 00
21  a return after a short read is:
22      f0 00 60 00 00 00 02 0a 00 00 00 00 00 00 00 00
23  a return after a jam (sure?)
24      f0 00 03 00 00 00 00 0a 00 00 00 00 80 01 00 00
25  no paper
26      f0 00 03 00 00 00 00 0a 00 00 00 00 3a 00 00 00
27  jam door open:
28	  f0 00 02 00 00 00 00 0a 00 00 00 00 04 81 00 00
29  paper jam
30	  f0 00 03 00 00 00 00 0a 00 00 00 00 80 04 00 00
31  after a power cycle
32      f0 00 06 00 00 00 00 0a 00 00 00 00 29 00 00 00
33  after ????
34      f0 00 05 00 00 00 00 0a 00 00 00 00 2c 02 00 00
35  out of memory (scan data too big for scanner)
36      f0 00 05 00 00 00 00 0a 00 00 00 00 2c 80 00 00
37
38INQUIRY:
3912 00 00 00 60 00
40  result:
41    06 00 02 02 5B 00 00 10 4B 2E 4D 2E 45 2E 20 20
42    4B 56 2D 53 53 32 35 41 20 20 20 20 20 20 20 20
43    31 2E 30 35 00 00 00 00 00 00 00 00 00 00 00 00
44    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
45    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
46    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
47
48SET WINDOWS:
4924 00 00 00 00 00 00 00 00 00
50   reset (?)
5124 00 00 00 00 00 00 00 48 00
52   72 bytes.
53   6-7 = 0x40 = window descriptor length
54
55   Window Descriptor Block:
56   0 = page side
57	 0x00 = front
58	 0x80 = back
59   2-3 = X resolution
60   4-5 = Y Resolution
61   14-17 = width  (size in inches * 1200)
62   18-21 = length (size in inches * 1200)
63   22 = 255 - brightness
64   23 = same as 22
65   24 = contrast
66   25 = image composition
67        0x00 = black&white (1 bit)
68		0x01 = black&white with halftone pattern
69		0x02 = grayscale
70   26 = bits/pixel
71        0x01, if image comp == 0
72        0x04, if image comp == (0x01 || 0x02) -> grayscale 4 bits
73		0x08, if image comp == 0x02 -> grayscale 8 bits
74   28 = haltone pattern
75      0x00 = Bayer 64
76      0x01 = Bayer 16
77	  0x02 = Dot 32
78	  0x03 = Dot 64
79	  0x04 = Error diffusion
80	  0x80 = User downloaded pattern
81   29 = reverse image
82      0x00 = no reverse
83      0x80 = reverse
84   43 = image emphasis
85	  0x80 smooth
86	  0x00 none
87	  0x01 low
88	  0x30 medium (twain default)
89	  0x50 high
90   44 = gamma (Gray 4/8 only)
91      0x00 normal
92	  0x01 from CRT
93	  0x80 gamma table 0 (previously downloaded)
94	  0x81 gamma table 1 (previously downloaded)
95	  0x82 gamma table 2 (previously downloaded)
96	  0x83 gamma table 3 (previously downloaded)
97   47 = ? (only used by the ISIS driver)
98      bit 7 = ? set by the ISIS driver
99      bit 6 = length control
100      bit 2 = ? set by the ISIS driver
101      bit 1 = ? set by the ISIS driver
102   48-51 = width (again?, maybe paper size)
103   52-55 = length (again?, maybe paper size)
104   57 = feeder mode
105      0x00 = one page
106	  other = number of pages to read (TWAIN driver defaults to 0xff)
107   58 = auto threshold
108      0x00 = none (twain default)
109	  0x80 = mode 1
110	  0x81 = mode 2
111	  0x82 = mode 3
112   59 = automatic separation
113	  0x00 = no (twain default)
114	  0x80 = yes
115   60 = white level
116      0x00 = from white stick (twain default)
117	  0x80 = from paper
118	  0x81 = automatic
119   61 = noise reduction
120      0x00 = none (twain default)
121	  0x01 = 1x1
122	  0x02 = 2x2
123	  0x03 = 3x3
124	  0x04 = 4x4
125	  0x05 = 5x5
126
127READ:
12828 00 80 00 00 00 00 00 10 00
12928 00 00 00 00 00 00 80 00 00
130   2 = data type code
131	  0x00 image data
132	    The TWAIN driver always reads 0x8000 bytes at the time, except for
133		the last packet where it read the size left plus 2 more bytes (and
134		thus generating a check condition).
135
136        5: page side
137		   0x00 = front
138		   0x80 = back
139
140      0x80 image size in dots
141         3(?)-4: number of the page to read. Multipage mode.
142
143         returns 16 bytes:
144	       0-3: length in pixels
145	       4-7: width in lines
146
147SEND(10):
148  2A 00 03 00 00 01 00 01 0A 00
149  2 = data type code
150    0x02 = halftone pattern
151       data is 10 bytes of header + 64 bytes for the matrix
152    0x03 = gamma table
153       data is 10 bytes of header + 256 bytes for the table
154  5 = gamma table number (data type code is 2)
155    the scanner can store 4 gamma tables (from 0 to 3)
156  7-8 = length
157
158SET AREA (?)
159C0 00 00 00 00 00 00 00 58 00
160Total message length = 88 bytes
161  7     = length -> 0x40 = 64 bytes
162  14-17 = area 1 X
163  18-21 = area 1 Y
164  22-25 = area 1 width
165  26-29 = area 1 length
166  33    = image composition
167            1 = halftone
168  36    = haltone pattern (if image composition == 1)
169		    0x00 = Bayer 64
170			0x01 = Bayer 16
171			0x02 = Dot 32
172			0x03 = Dot 64
173			0x04 = Error diffusion
174  50-53 = area 2 X
175  54-57 = area 2 Y
176  58-61 = area 2 width
177  62-65 = area 2 length
178  68-71 = area 3 X
179  72-75 = area 3 Y
180  76-79 = area 3 width
181  80-83 = area 3 length
182
183
184Other supported commands:
18516 RESERVE UNIT
18617 RELEASE UNIT
1871D SEND DIAGNOSTIC
18831 OBJECT POSITION
1893B WRITE BUFFER
190