summaryrefslogtreecommitdiff
path: root/doc/matsushita/matsushita.txt
blob: 0de6d94edaf711aa3bbbbdaa432c6e73942f78b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
Made by Kyushu Matsushita Electric, a.k.a. Panasonic
http://www.kme.panasonic.co.jp/
http://panasonic.com/

The same twain driver handle these scanners:
Same family as  KV-SS25, KV-SS50, KV-SS55, KV-SS50EX, KV-SS55EX, KV-SS850, KV-SS855.

Another driver handle the KV-S2055L, KV-S2055W.

However all these scanner show similarities.

/*--------------------------------------------------------------------------*/

SCSI commands supported by the KV-SS25:

TEST UNIT READY:
00 00 00 00 00 00

REQUEST SENSE:
03 00 00 00 0E 00
  a return after a short read is:
      f0 00 60 00 00 00 02 0a 00 00 00 00 00 00 00 00
  a return after a jam (sure?)
      f0 00 03 00 00 00 00 0a 00 00 00 00 80 01 00 00
  no paper
      f0 00 03 00 00 00 00 0a 00 00 00 00 3a 00 00 00
  jam door open:
	  f0 00 02 00 00 00 00 0a 00 00 00 00 04 81 00 00
  paper jam
	  f0 00 03 00 00 00 00 0a 00 00 00 00 80 04 00 00
  after a power cycle
      f0 00 06 00 00 00 00 0a 00 00 00 00 29 00 00 00
  after ????
      f0 00 05 00 00 00 00 0a 00 00 00 00 2c 02 00 00
  out of memory (scan data too big for scanner)
      f0 00 05 00 00 00 00 0a 00 00 00 00 2c 80 00 00

INQUIRY:
12 00 00 00 60 00
  result:
    06 00 02 02 5B 00 00 10 4B 2E 4D 2E 45 2E 20 20
    4B 56 2D 53 53 32 35 41 20 20 20 20 20 20 20 20
    31 2E 30 35 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

SET WINDOWS:
24 00 00 00 00 00 00 00 00 00
   reset (?)
24 00 00 00 00 00 00 00 48 00
   72 bytes.
   6-7 = 0x40 = window descriptor length

   Window Descriptor Block:
   0 = page side
	 0x00 = front
	 0x80 = back
   2-3 = X resolution
   4-5 = Y Resolution
   14-17 = width  (size in inches * 1200)
   18-21 = length (size in inches * 1200)
   22 = 255 - brightness
   23 = same as 22
   24 = contrast
   25 = image composition
        0x00 = black&white (1 bit)
		0x01 = black&white with halftone pattern
		0x02 = grayscale
   26 = bits/pixel
        0x01, if image comp == 0
        0x04, if image comp == (0x01 || 0x02) -> grayscale 4 bits
		0x08, if image comp == 0x02 -> grayscale 8 bits
   28 = haltone pattern
      0x00 = Bayer 64
      0x01 = Bayer 16
	  0x02 = Dot 32
	  0x03 = Dot 64
	  0x04 = Error diffusion
	  0x80 = User downloaded pattern
   29 = reverse image
      0x00 = no reverse
      0x80 = reverse
   43 = image emphasis
	  0x80 smooth
	  0x00 none
	  0x01 low
	  0x30 medium (twain default)
	  0x50 high
   44 = gamma (Gray 4/8 only)
      0x00 normal
	  0x01 from CRT
	  0x80 gamma table 0 (previously downloaded)
	  0x81 gamma table 1 (previously downloaded)
	  0x82 gamma table 2 (previously downloaded)
	  0x83 gamma table 3 (previously downloaded)
   47 = ? (only used by the ISIS driver)
      bit 7 = ? set by the ISIS driver
      bit 6 = length control
      bit 2 = ? set by the ISIS driver
      bit 1 = ? set by the ISIS driver
   48-51 = width (again?, maybe paper size)
   52-55 = length (again?, maybe paper size)
   57 = feeder mode
      0x00 = one page
	  other = number of pages to read (TWAIN driver defaults to 0xff)
   58 = auto threshold
      0x00 = none (twain default)
	  0x80 = mode 1
	  0x81 = mode 2
	  0x82 = mode 3
   59 = automatic separation
	  0x00 = no (twain default)
	  0x80 = yes
   60 = white level
      0x00 = from white stick (twain default)
	  0x80 = from paper
	  0x81 = automatic
   61 = noise reduction
      0x00 = none (twain default)
	  0x01 = 1x1
	  0x02 = 2x2
	  0x03 = 3x3
	  0x04 = 4x4
	  0x05 = 5x5

READ:
28 00 80 00 00 00 00 00 10 00
28 00 00 00 00 00 00 80 00 00
   2 = data type code
	  0x00 image data
	    The TWAIN driver always reads 0x8000 bytes at the time, except for
		the last packet where it read the size left plus 2 more bytes (and
		thus generating a check condition).

        5: page side
		   0x00 = front
		   0x80 = back

      0x80 image size in dots
         3(?)-4: number of the page to read. Multipage mode.

         returns 16 bytes:
	       0-3: length in pixels
	       4-7: width in lines

SEND(10):
  2A 00 03 00 00 01 00 01 0A 00
  2 = data type code
    0x02 = halftone pattern
       data is 10 bytes of header + 64 bytes for the matrix
    0x03 = gamma table
       data is 10 bytes of header + 256 bytes for the table
  5 = gamma table number (data type code is 2)
    the scanner can store 4 gamma tables (from 0 to 3)
  7-8 = length

SET AREA (?)
C0 00 00 00 00 00 00 00 58 00
Total message length = 88 bytes
  7     = length -> 0x40 = 64 bytes
  14-17 = area 1 X
  18-21 = area 1 Y
  22-25 = area 1 width
  26-29 = area 1 length
  33    = image composition
            1 = halftone
  36    = haltone pattern (if image composition == 1)
		    0x00 = Bayer 64
			0x01 = Bayer 16
			0x02 = Dot 32
			0x03 = Dot 64
			0x04 = Error diffusion
  50-53 = area 2 X
  54-57 = area 2 Y
  58-61 = area 2 width
  62-65 = area 2 length
  68-71 = area 3 X
  72-75 = area 3 Y
  76-79 = area 3 width
  80-83 = area 3 length


Other supported commands:
16 RESERVE UNIT
17 RELEASE UNIT
1D SEND DIAGNOSTIC
31 OBJECT POSITION
3B WRITE BUFFER