Re: Microtek Scanmaker 35t+

henk van der knaap (henkvand@es.co.nz)
Mon, 5 Jul 1999 18:29:06 +1200 (NZST)

On Sun, 4 Jul 1999, henk van der knaap wrote:

> Hi,
>
> I have been trying to get a Microtek ScanMaker 35t+ to work with the SANE
> package, version 1.0.1. So far I have had no luck. I would be very
> grateful if someone could tell me if I can have any hope that this thing
> will ever work under Linux!!!
>
>
> Here is the debugging information:
>
> Script started on Sat Jun 26 17:49:23 1999
> henk:~$ find-scanner
> # You may want to run this program as super-user to find all devices.
> # Once you found the scanner devices, be sure to adjust access
> # permissions as necessary.
>
> find-scanner: found scanner "Microtek ScanMaker 35t+ 1.40" at device
> /dev/scanner
> find-scanner: found scanner "Microtek ScanMaker 35t+ 1.40" at device /dev/sg0
> find-scanner: found scanner "Microtek ScanMaker 35t+ 1.40" at device /dev/sga
>
> henk:~$ scanimage Scanmaker 35t+ 1.40:/dev/scanner
> [sanei_init_debug]: Setting debug level of microtek to 128.
> [microtek] sane_init: MICROTEK says hello! (v0.9)
> [microtek] sane_init: config- #Uncomment following line to disable "
> clever precalibration" routines...
> [microtek] sane_init: config- #noprecal
> [microtek] sane_init: config- scsi * * Scanner
> [microtek] attach_scanner: /dev/sga
> [microtek] attach_scanner: opening /dev/sga
> [microtek] attach_scanner: sending INQUIRY
> [microtek] id_microtek...
> [microtek] id_microtek: not microtek: -32, -45, 98
> [microtek] attach_scanner: device doesn't look like a Microtek scanner.[microtek] dump_suspect_inquiry...
> === SANE/Microtek backend v0.9 ===
> ========== Scanner Inquiry Block ========mm
> 06 31 19 01 5b 00 00 00 4d 69 63 72 6f 74 65 6b
> 53 63 61 6e 4d 61 6b 65 72 20 33 35 74 2b 20 20
> 31 2e 34 30 53 43 53 49 20 46 2f 57 56 33 2e 34
> 20 43 54 4c 35 33 38 30 03 ef 8c c2 80 ec 62 23
> 01 03 23 01 00 83 00 01 0e 0e 01 05 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff
>
> ========== Scanner Inquiry Report ==========
> ===== Scanner ID...
> Device Type Code: 0x06
> Model Code: 0x62
> Vendor Name: 'Microtek' Model Name: 'ScanMaker 35t+ '
> Firmware Rev: '1.40Ä'
> SCSI F/W version: 3.1 Scanner F/W version: 1.9
> Response data format: 0x01
>
>
> [microtek] sane_init: config- /dev/scanner
> [microtek] attach_scanner: /dev/scanner
> [microtek] attach_scanner: opening /dev/scanner
> [microtek] attach_scanner: sending INQUIRY
> [microtek] id_microtek...
> [microtek] id_microtek: not microtek: -32, -45, 98
> [microtek] attach_scanner: device doesn't look like a Microtek scanner.[microtek] dump_suspect_inquiry...
> === SANE/Microtek backend v0.9 ===
> ========== Scanner Inquiry Block ========mm
> 06 31 19 01 5b 00 00 00 4d 69 63 72 6f 74 65 6b
> 53 63 61 6e 4d 61 6b 65 72 20 33 35 74 2b 20 20
> 31 2e 34 30 53 43 53 49 20 46 2f 57 56 33 2e 34
> 20 43 54 4c 35 33 38 30 03 ef 8c c2 80 ec 62 23
> 01 03 23 01 00 83 00 01 0e 0e 01 05 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff
>
> ========== Scanner Inquiry Report ==========
> ===== Scanner ID...
> Device Type Code: 0x06
> Model Code: 0x62
> Vendor Name: 'Microtek' Model Name: 'ScanMaker 35t+ '
> Firmware Rev: '1.40'
> SCSI F/W version: 3.1 Scanner F/W version: 1.9
> Response data format: 0x01
>
>
>
> [microtek] sane_get_devices
> scanimage: sane_start: Invalid argument
> [microtek] sane_exit...
> [microtek] sane_exit: MICROTEK says goodbye.
>
>
> Here is some output from mtekscan:
>
>
>
> Script started on Sat Jun 26 17:59:27 1999
> henk:~$ mtekscan -I
> Vendor/model: Microtek ScanMaker 35t+
> Firmware revision no. 1.40, device type 06.
> SCSI firmware version: 3.1, scanner firmware version: 9.9
> Response data format: 0x01
> Resolution selection stepsize: 1% 5%
> Supported scanning modes: Lineart Halftone Multi-Bit Color Transparencies
> Negative
> One-pass color scanning supported
> 12 built-in halftone patterns, pattern downloading supported
> Scanner is edge feed type
> Huffman data compression: no, Read data compression: no
> Frame & paper length setting units: 1/8" pixels
> Max. document size code is 0x80 - 35.00 x 35.00 mm
> 14 contrast settings, 12 exposure time settings
> Model code : 0x62 (unknown model code)
> F/W does support document feeder,
> F/W does support feeder/backtracking enable/disable
> Feeder is not installed
> Type / Location code is unknown (0x02)
> Transparency illuminator is not installed
> Expanded resolution range: yes
> Shadow/highlight adjustment supported, midtone adjustment supported
> Gamma adjustment look-up table size: 1024 bytes
> Max. value: 1023 (entry length 2 bytes)
> Fast color prescan supported, data transfer format select not supported
> Color data sequencing: Line by line, non-R-G-B sequence, with data headers
> Three pass scanning supported
> MODE SELECT 1 and MODE SENSE 1 command supported
> cntr_vals = 14, min_cntr = -42, max_cntr = 49
> exp_vals = 14, min_exp = -18, max_exp = 21
> Supported multi-bit data formats: 4 bpp 8 bpp
> Offset adjustment (digital brightness control) supported
> Linearization table can not be disabled
> Start-of-scan recalibration function can be disabled
>
> henk:~$ mtekscan -S
> mtekscan: Performing scanner selftest...
> mtekscan: Selftest result code 0x00 (no failures).
> henk:~$ exit
> exit
>
> Script done on Sat Jun 26 18:00:12 1999
>
>
> I would be very grateful if anybody could make some comments please.
>
> Greetings
>
> Henk
>
>
> Henk van der Knaap,
> 92 Halswell Junction Road,
> Christchurch, New Zealand.
> Phone/fax 64 3 3229185
>
> My Operating system is Linux Debian 2.1
> ===================================================
> My e-mail address is as follows: henkvand@es.co.nz
> ===================================================
>
>
> --
> Source code, list archive, and docs: http://www.mostang.com/sane/
> To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
>
>

Dear Readers,

I have now been able to solve the problem thanks to a hint from Regis
Rampnoux.

To get the Microtek Scanmaker 35t+ to work I have made a small change to
the file microtek.c

My scanner reports its name as "Microtek", not "MICROTEK". Apparently not
all models are the same. The software reported my scanner not to be a
microtek scanner, because Microtek was not in capital letters. With this
small change it now works.

I have added the line:

!(strncmp("Microtek", &(result[8]), 8)) ||

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

/********************************************************************/
/* Determine if device is a Microtek Scanner (from INQUIRY info) */
/********************************************************************/
static SANE_Status
id_microtek(u_int8_t *result, char **model_string)
{
SANE_Byte device_type, response_data_format;

DBG(15, "id_microtek...\n");
/* check device type first... */
device_type = (SANE_Byte)(result[0] & 0x1f);
if (device_type != 0x06) {
DBG(15, "id_microtek: not even a scanner: dev_type = %d\n",
device_type);
return SANE_STATUS_INVAL;
}
if (!(strncmp("MICROTEK", &(result[8]), 8)) ||
!(strncmp("Microtek", &(result[8]), 8)) ||
!(strncmp("MII SC31", &(result[8]), 8)) || /* for the IISP */
!(strncmp("MII SC21", &(result[8]), 8)) || /* for the 600ZS */
!(strncmp("AGFA ", &(result[8]), 8)) || /* for Arcus II */
!(strncmp(" ", &(result[8]), 8)) ) {
switch (result[62]) {
case 0x50 :
*model_string = "ScanMaker II/IIXE"; break;
case 0x51 :
*model_string = "ScanMaker 45t"; break;
case 0x52 :
*model_string = "ScanMaker 35t"; break;
case 0x54 :
*model_string = "ScanMaker IISP"; break;
case 0x55 :
*model_string = "ScanMaker IIER"; break;
case 0x56 :
*model_string = "ScanMaker A3t"; break;
case 0x57 :
*model_string = "ScanMaker IIHR"; break;
case 0x58 :
*model_string = "ScanMaker IIG"; break;
case 0x59 :
*model_string = "ScanMaker III"; break;
case 0x5A :
*model_string = "Agfa StudioScan"; break;
case 0x5B :
*model_string = "Agfa StudioScan II"; break;
case 0x5C :
*model_string = "Agfa Arcus II"; break;
case 0x5f :
*model_string = "ScanMaker E3"; break;
case 0x62 :
*model_string = "ScanMaker 35t+"; break;
case 0x63 :
case 0x66 :
*model_string = "ScanMaker E6"; break;
case 0x64 : /* and "Vobis RealScan" */
*model_string = "ScanMaker E2"; break;
case 0xC8:
*model_string = "ScanMaker 600ZS"; break;
default :
/* this might be a newer scanner, which uses the SCSI II command set. */
/* that's unfortunate, but we'll warn the user anyway.... */
response_data_format = (SANE_Byte)(result[3]);
if (response_data_format == 0x02) {
DBG(15, "id_microtek: (uses new SCSI II command set)\n");
if (DBG_LEVEL >= 15) {
fprintf(stderr, "\n\n\n");
fprintf(stderr, "========== Congratulations! ==========\n");
fprintf(stderr, "You appear to be the proud owner of a \n");
fprintf(stderr, "brand-new Microtek scanner, which uses\n");
fprintf(stderr, "a new SCSI II command set. \n");
fprintf(stderr, "\n");
fprintf(stderr, "Try the `microtek2' backend instead. \n");
fprintf(stderr, "\n\n\n");
}
}
return SANE_STATUS_INVAL;
}
return SANE_STATUS_GOOD;
}
DBG(15, "id_microtek: not microtek: %d, %d, %d\n",
strncmp("MICROTEK", &(result[8]), 8),
strncmp(" ", &(result[8]), 8),
result[62]);
return SANE_STATUS_INVAL;
}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Greetings from

Henk

Henk van der Knaap,
92 Halswell Junction Road,
Christchurch, New Zealand.
Phone/fax 64 3 3229185

My Operating system is Linux Debian 2.1
===================================================
My e-mail address is as follows: henkvand@es.co.nz
===================================================

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