Open Digita Services: Usage

ks

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.

Device
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.

Type
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'.

Rate
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.

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

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

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

-q
Produce minimal output.

-l
List supported commands.

-h
Display help.


Valid ks commands are:

list
List all files in the camera

delall
Delete all files in the camera

download
Download pictures

thumbs
Download thumbnail images

gettime
Get camera's date/time

settime
Set camera's date/time from linux system time

shoot
Take a picture

status
Show pictures taken, available and raw count

getpowermode
Checks if camera is on

poweroff
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!

http://ods.sourceforge.net/usage.html
Viljo Hakala / Last modified: Sun Jan 30 23:18:13 PST 2000