Kodak KDS TWAIN Driver

Debugging Guide

03-July-2012

 

 

Contents

          1.0     Overview

          2.0     Finding the Driver Files

          3.0     Configuring the System

          4.0     Dumping the Data Files

          5.0     Dumping the Image Files

 

 

 

1.0     Overview

If sending information to Kodak about the TWAIN driver, we recommend including log data, which will result in a quicker diagnosis.  This document should be helpful to select what to send.  If in doubt, send everything you can.

 

The TWAIN driver debugs most problems through its logging system.   This logging system is reasonably sophisticated, and can be configured to focus on specific areas, as needed.  The most common kinds of logging configurations are as follows:

 

Logging everything: recording all activity.  Occasionally this is the best way to capture needed information, especially if the problem is easily reproducible, but not obviously a problem with either the application or the scanner.  Logs generated this way tend to be very large, and full of a lot of information. (Debug=1)

 

Flushing to disk: best when analyzing crashes.  Disk drives rely on caches to boost performance, however, when programs crash they may strand vital information in those caches.  If an application crash is easily reproducible, then it’s possible to flush every log entry to disk.  This is typically used when logging everything, so the log files are very large and the application and driver performance is very slow. (Debug=7)

 

Database Dumping: (5.x only) used to take a snapshot of the main database elements in the driver.  (Debug=256)

 

Image Dumping: used to capture images as soon as they are transferred from the scanner, and before they are processed or passed to the application.

 

 

 

2.0     Finding the Driver Files

All Kodak TWAIN driver files are accessible through the following path:

 

%winbootdir%\twain_32\kodak

 

Where %winbootdir% is the path to the Windows directory, which is usually either C:\WINDOWS or C:\WINNT.  If you are not sure what this is you can do the following to find it out.  This works for all versions of Windows.

 

1)      Click on START

2)      Select RUN

3)      Type in COMMAND and hit the Enter key

4)      Type SET in the DOS window

5)      Look for WINBOOTDIR

 

When you look in the %winbootdir%\twain_32\kodak you may see several directories and files.  Look for anything beginning with the letters KDS; these contain the Kodak TWAIN drivers.  Pick the one that matches your scanner.  You can find the version at the top of the readme.txt file.

 

kds_i30_i40     - Version 6.x i30/i40 driver

 

kds_i100          - Version 6.x i100 driver

 

kds_i200          - Version 4.x i200 driver

 

kds_i600          - Version 5.x or 6.x i600 driver

 

kds_i800          - Version 4.x or 6.x i800 driver

 

            kds_i1200        - Version 7.x i1200 driver

 

            kds_i1300        - Version 7.x i1300 driver

 

            kds_i1400        - Version 9.x i1400 driver

 

            kds_i1800        - Version 8.x i1800 driver

 

            kds_i1100        - Version 9.x i1100 driver

 

            kds_i700          - Version 9.x i700 driver

 

            kds_i4200_i4600 - Version 10.x i4000 driver

 

            kds_i5000        - Version 11.x i5000 driver

 

            kds_i2000        - Version 11.x i2000 driver

 

            kds_i900          - Version 11.x i900 driver

 

            kds_i2900        - Version 12.x i2900 driver

 

            kds_i3000        - Version 12.x i3000 driver

 

            kds_pss            - Version 12.x PS50/PS80 driver

 

 

3.0     Configuring the System

 

If you are using a 2/3.x driver, then edit the const.ini file.  If you are using a 4/5/6.x driver, then click on the file called a shortcut to const.ini to edit the file.

 

Inside of this file you will find two values near the top.

 

            Debug=0

            DebugFilter=

 

These are the switches used to configure the Kodak TWAIN driver logging system.  By default they are turned off, so that the driver will only record a small amount of information in the event of an error.

 

The recommended values for Debug are as follows:

 

Debug=0         - record nothing but errors

Debug=1         - record everything

Debug=7         - record everything and flush to disk

Debug=64       - record just the memory usage

Debug=256     - (5.x only) dump the data files

 

 

4.0     Dumping the Data Files

This is available with the version 5/6.x drivers.  If there is doubt about the state of the database or the language files or the device configuration data, then it is possible to dump those files at the start of the session.  This is done by setting Debug=256 in the const.ini file.

 

The files all start with the letters KDS and are placed in the user’s temp directory.  Unfortunately, there is no single, common way to find this directory across all versions of Windows, so rather than try to describe how it’s done for each OS, we recommend that you search on your Windows OS disk (usually C:\) for all occurrences of KDS*.TXT, finding the files:

 

            KdsDbFixed.txt

KdsDeviceConfig.txt

KdsLabel.txt

KdsLookupGui.txt

KdsLookupTwain.txt

 

So, if you’re looking for everything possible to send when looking for help, feel free to include these files.

 

 

 

5.0     Dumping the Image Files

Not all drivers support this, but those that do will show a Dump tab in the TWAIN GUI when it is run from the Scanner Validation Tool (SVT), if the user has the right license level.

 

You have to contact Kodak to get a license.

 

For all scanners the tab offers a way to write images to disk before they are passed up to the application.

 

The first option provides a way to guarantee that the transfer of the image from the driver to the application did not change it in any way.

 

The second option dumps the data before it is processed by the driver.  This ‘raw’ image is the one that we would want to see if there are questions about image quality.  It’s also the image you need to use if you want to feed it back into the driver using the simulator.