Using Sony DSC-P72 Digital Camera with Linux

I recently purchased a new Sony CyberShot P-72 digital camera as a Christmas gift to my family (and myself :) As a Linux user, I need my peripherals to work with Linux as well as Windows. I find it disappointing that most peripheral vendors do not support Linux or Open Source software, so therefore, I try to vote with my money and avoid purchasing peripherals which do not work with Linux. Anyway, I purchased this camera knowing that I could return it if I could not get it to work.

Camera setup (one time):

This camera supports 2 download modes: "Normal" and "PTP" The default is "Normal", but you need to switch it to "PTP" mode, see Camera manual, pp. 106-107. Supposedly if you are running kernel v. 2.4.21 or later, the other mode will work as well. Otherwise, you need to patch your kernel (http://returntonature.com/pipermail/linux-sony/2003-April/004024.html). Since I don't feel like trying to hack my (working) kernel, I'll stick with PTP mode :)

Linux setup (one time):

I am currently running Mandrake 9.0 (kernel 2.4.19). The 1st thing I had to do was:

mknod /dev/video0 c 81 0
ln -s /dev/video0 /dev/video

I got this info from http://linux-usb.sourceforge.net/USB-guide/x370.html.

Then do:

/sbin/rmmod stv680
modprobe usb-storage
mknod -m 0660 /dev/usb/mdc800 c 180 32

I got this info from http://linux-usb.sourceforge.net/USB-guide/x405.html.

Then connect your camera to the USB port, turn it on, and do:

cd /proc/bus/usb
cat devices | grep "Sony"

This should produce something like the following:

S:  Manufacturer=Sony
S:  Product=Sony PTP

Now do (note - I am using gphoto2 v2.1.1dev4):

gphoto2  --auto-detect

This should produce something like:

Model                          Port                                             
----------------------------------------------------------
Sony DSC-F707V                 usb:            

Downloading your pictures and movies:

Now, using gphoto, you should be able to do things like:

gphoto2 --list-files
gphoto2 --folder /store_00010001 --get-file DSC00001.JPG
gphoto2 --get-all-files

The 1st command should display a list of all pictures and movies stored on your camera's memory stick. Picture files look like "DSC#####.JPG" and movies like "MOV#####.MPG". The 2nd command downloads the picture "DSC00001.JPG" from the default "folder" on the camera's memory stick to the current directory. The 3rd command downloads all picture and movie files from the camera to the current directory on your hard drive.

I simply made a tiny shellscript called "getphoto" which if called without arguments, simply returns a list of pictures and movies on the camera waiting to be downloaded. I then call it again with the name of the picture or movie I wish to download as it's argument and it downloads it to my hard drive.

getphoto

#!/bin/bash

if [ X$1 == 'X' ]; then
	gphoto2 --list-files
else
	if [ X$1 == 'Xall' ]; then
		gphoto2 --get-all-files
	else
		gphoto2 --folder /store_00010001 --get-file "$1"
	fi
fi

To see thumbnails of all your pictures, if you have KDE installed, you can then do:

konqueror .

Overall:

Very good camera! It takes excellent pictures, has several different resolutions and many options including 2 different movie resolutions. Using the smaller one ("Email mode"), you can take really long movies (about 11 minutes per 16 megs of your memory stick). Another feature of this camera is sound, so your movies have a full sound track, and even your pictures can have up to 40 sec. of sound recorded with them! I had the chance to get a 4-meg camera from Kodak for the same money, but chose the Sony for the sound feature. Battery life is excellent, The camera came with a charger and 2 AA Nickel-Metal Hydride (NiMH) rechargable batteries which require a good 6 hours to fully charge. You generally want to run these type of batteries down before recharging them so they don't "learn" to accept less than a full charge. I also got a free 64 meg memory stick (in addition to the standard 16 meg stick).

Other reviews:

http://www.tracone.com/cgi-bin/amazon_products_feed-input_item-B00008L3HY-input_search_type-AsinSearch.html

Specs:

http://www.everythinglinux.com.au/item/bfSON65090?elinux=75ffb6963edb65fb2c3961257e0500da

Jim Turner (my homepage)