What is needed: OpenDiS 0.0.3
Run the following commands to compile, extract and install OpenDiS
tar -zxvf opendis-0.0.3.tar.gz cd opendis-0.0.3 ./configure make make install
The following usage section is taken directly from the output of the ks command.
Usage: ks [OPTION]... [COMMAND]... Connect to camera and perform COMMANDs. Updated: 0.0.3 Development note: currently some COMMANDs are supported; default action is to display this help. However, all listed OPTIONS are now supported. -d DEV, --device=DEV Look for camera at device DEV. Defaults to /dev/ttyS0. -r RATE, --rate=RATE Use bit-rate RATE for serial device. Defaults to 9600. Not applicable to USB or IrDA. -t TYPE, --type=TYPE Specifies device type, one of: "serial" "usb", or "irda". Normally, device type can be deduced from DEV and need not be specified -i, --irda Same as --type=irda -s, --serial Same as --type=serial -u, --usb Same as --type=usb -v --verbose More output. -q --quiet Less output. -l, --list List supported commands -h, --help Display this help and exit. Currently following commands are supported: delall Delete all files in the camera download Download pictures thumbs Download thumbnails gettime Get camera's date/time settime Set camera clock according to computer's clock shoot Take a picture status Show pictures taken, available and raw count getpowermode Checks if camera is on poweroff Turn the camera off
USB:
Special USB notes. The USB stack has been ever changing in the developmental kernels and as such works differently from time to time. In playing with the latest developmental kernel released the camera tends to show up on /dev/kodak00 or /dev/kodak01, independent of the fact that only one camera is connected. The support for these devices is all fairly new, so expect to have to play with it to get it working. The following should allow one to download all images from the camera to the working directory with a USB connection. Make sure that the camera is in connect mode.
ks -d /dev/kodak00 download
Serial:
Serial support does work and as such the following command should allow one to download all images from the camera into their current working directory. Modify the serial port device name as necessary.
ks -d /dev/ttyS0 download
IrDA:
Infrared support is not yet supported by OpenDiS. As such no example can be provided. The reason it is not supported yet is that the protocol differs from that of the USB/serial protocols. USB and Serial use very similar if not the same protocol for their functionality.
This Python script written by Sai Lai Lo of AT&T Cambridge Laboratories allows for download of images from Kodak Digital Cameras running DigitaOS and using USB for transfer. Some have problems with this script and some don't. However it is nice to cover all bases.
Here a working copy of the Command Device Protocol Python Script can be attained. The original Command Device Protocol Python Script for which the one above is derived has to be edited to remove leading text to work.
The script depends on /dev/kodak existing due to the way older kernels accessed the Kodak Digital Camera USB Device. A symbolic link must be created between the actual device the camera is on and /dev/kodak. If the camera is on /dev/kodak00 the symbolic link needed can be created with the following command:
ln -s /dev/kodak00 /dev/kodak
Be sure to substitute in the proper device name instead of kodak00 if the camera was not assigned kodak00. To list all files on the camera run the following command:
python cdp.py
To download a single image from the camera run the following command:
python cdp.py 2:DC265_01/P0000748.JPG
That command will download the image P0000748.JPG to the directory DC265_01 in the current directory. A quick and easy command to download all the images from the camera would be:
for file in $(python cdp.py); do python cdp.py $file; done
This is just a few of the many ways such a script can work. It is possible to use the above command in a larger shell script to automate downloading the images from the camera, converting the images to another format, resizing the images, creating a web page automatically, and many many others. The options are endless when it comes to scripts like this.