Open Digita Services: Usage


ks is the Kodak Service program, a utility program that can be used from the command line to perform various operations, most notably downloading image files from the camera.

Configuring ks

To find your camera, ks needs three configuration parameters: the device the camera is plugged into, the type of device, and, for serial ports, the rate at which to talk to the camera.

Points to the device file under /dev at which the camera will be found. Specified either with the ODSDEVICE environment variable, or the -d command-line option.

ks will attempt to guess the type of device based on the device file name:
  • /dev/tty* or /dev/cua* implies a serial device;
  • /dev/kodak implies a USB device.
If your device file name is nonstandard, the type may be explicitly specified using either the ODSTYPE environment variable or the -t command-line option. May contain either 'serial' or 'usb'.

Specified either with the ODSRATE environment variable, or the -r command-line option. Applies only to serial-port connections. Serial rate defaults to 9600 bps, so users should specify as fast a rate as their serial ports will support. The actual rate is negotiated with the camera, so rates that are too high for the camera will be lowered automatically.
The recommended way to configure ks is to set environment variables in your .profile. For example, my configuration is:
    export ODSDEVICE=/dev/ttyS2
    export ODSRATE=115200
Because I use a normal serial device, I don't have to specify the device type. An equivalent configuration, specified from the command-line is:
    ks -d /dev/ttyS2 -r 115200

Configuring via environment variables is recommended because the settings are automatically inherited by ks from the shell, so the command-line settings can be omitted. However, if both environment and command-line options are used, the command-line options take precedence. Please use ks -h for extra help, and ks -l for supported commands.

Using ks

The utility program is invoked as follows:

ks [ options ] command [ ... ]

Valid ks options are:

-d DEV
Look for camera at device DEV.

Use bit-rate RATE for serial connections. Defaults to 9600. Not applicable to USB.

Specifies device type, "serial" or "usb". Normally, device type can be deduced from DEV and need not be specified (as explained above).

Produce more output (same as the 0.0.2 version of ODS).

Produce minimal output.

List supported commands.

Display help.

Valid ks commands are:

List all files in the camera

Delete all files in the camera

Download pictures

Download thumbnail images

Get camera's date/time

Set camera's date/time from linux system time

Take a picture

Show pictures taken, available and raw count

Checks if camera is on

Turn the camera off

Download Display

While downloading pictures from the camera, ks prints text similar to the following:

    Executing command: download
    1 file in camera...
    p0002346.jpg: size = 353666 ...x...........x.....

Each '.' indicates successful transmission of a protocol block of data, about 20K in size. Each 'x' indicates an I/O error in downloading a block; these blocks are retried by ks until all blocks are correctly received.

SourceForge rocks!  Valid HTML 4.0!
Viljo Hakala / Last modified: Sun Jan 30 23:18:13 PST 2000