Sony Cybershot DSC-F505

$Id: index.html,v 1.22 2001/04/19 16:40:13 cook Exp $
[DSC F505]

This is the story of my Sony digital camera :)

December 1999
I was planning for my millennium-hiding-out-vacation, and I didn't want to buy any more of those disposable cameras, so I read reviews on a number of different digital cameras. I wanted something that took sharp pictures, was fast, could store a large number of images, be able to focus close, take short movies, and had serial and USB support. I finally settled on either the Nikon Coolpix 950 (review) or the Sony Cybershot DSC-F505 (review). A friend of mine already had the Sony, which I really liked, so I figured I'd play with the Coolpix. I went to my local store and played with it. I really didn't like it, and it was much slower, I thought, than the Sony. So I picked up the Sony with a 32MB memory stick and an extra battery.

Since I run Linux everywhere except for my Win95 laptop for work, I was forced to use the serial interface under Win95 to download the images. I worked with gphoto and tried to improve the DSC-F505 driver. After a bunch of work, it was still not great. It still had trouble with error recovery, and re-initializing the camera. As a result, I continued to use the Win95 tool to download images. However, it took well over an hour to download 90 images at 1024x768 (400k per image roughly, at 115200bps kinda sucks).

March 2000
I started working with Linux USB development to find out how far I was from being able to use my camera with USB. As it turns out, the USB "mass storage" device driver was very stable (devel kernel 2.3.51), and just needed some more information about what the Reduced Block Commands were (which I found on the T10 Web Site). After "adding" the RBC support, the camera reported various SCSI errors, which I tracked down to incorrectly detected return values in the usb-storage code. After putting in the changes to correct that, I was immediately able to see, mount, and read from the camera's memory stick filesystem! I quickly bundled my changes to the usb-storage driver and posted them. As it turned out, Matt Dharm had been working on exactly the same portion of the code, and didn't need my patch. Oh well, maybe I'll get my name into the Linux Kernel some other way. :)

April 2000
Woohoo! Paul got me another battery and the 64M Memory Stick for my birthday! It's going to take a lot of work to fill this Stick up.

May 2000
As far as I know, the 2.3.99-pre7 kernels and later support RBC correctly. Some people have been having trouble with the usb-storage almost working correctly. In those situations, using the "UHCI Alternate Driver (JE) support" (uhci.o) instead of the "UHCI (Intel PIIX4, VIA, ...) support" (usb-uhci.o) seems to do the trick for fixing the problems.

June 1 2000
The stand-alone memory stick reader appears to be working with some tweaks:

Date: Thu, 01 Jun 2000 17:50:27 CEST
From: Stephan Henning
Subject: [linux-usb] Working: Sony Memorystick-Reader

Finally it's working:

Kernel: 2.4.0-test1-ac7
Modules: usbcore.o, usb-uhci.o (uhci.o doesn't work for me), usb-storage.o

I added the following lines in usb-storage's unusual devices list:

{0x054c, 0x002d, 0x0100,
 "Sony MSAC-US1", US_SC_SCSI, US_PR_CB,
 US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE | US_FL_ALT_LENGTH}

Unfortunately, it isn't working with the backport to 2.2.14.

June 15, 2000
(whoops, I forgot to add this entry on time)
The DSC-S30 is working with the following "unusual device" entry:

{0x054c, 0x0010, 0x0210,
 "Sony DSC", US_SC_SCSI, US_PR_CB,
 US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE | US_FL_ALT_LENGTH}

June 23, 2000
Looks like the S70 is also working. Thanks to Alexander Feder for sending this to me. Looks like the S30 and S70 need the same tweak. Since the 4th field purely informational, we should call it "Sony DSC-Sx0":

{0x054c, 0x0010, 0x210,
 "Sony DSC-Sx0", US_SC_SCSI, US_PR_CB,
 US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE | US_FL_ALT_LENGTH}
He also reports that the cameras work with the 2.2.16 backport, which I'm going to have to go check out now. :)

A few people have been having trouble finding various information, so I think I'll include a few extra links here. The Linux USB working devices list has lots of information, including Sony cameras and memory stick readers. The DSC-F505, DSC-S30, and MSAC-US1 each have an entry.

July 9, 2000
Well, I finally got 2.2.16 plus the 2.4.0-test2-pre2 2.2.16 back-port compiled and running on my machine. Looks like whatever changes got made to usb-storage over time has finally changed the way things work for the DSC F505. It, too, needs an "unusual device" entry:

 { 0x054c, 0x0010, 0x106,
   "Sony DSC-F505", US_SC_SCSI, US_PR_CB,
   US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE | US_FL_ALT_LENGTH}
However, with that working, everything is great! The only problem I've seen is that usb-storage doesn't re-scan the size of the device on a re-insert. For example, if I change the memory sticks in the camera, it still thinks the old stick is in there. Only way around this is to unload usb-storage and reload it. But that DOES work. :)

September 5, 2000
Tried out 2.4.0test7, and the DSC-F505 is still broken without the "unusual device" entry:

--- linux-2.4.0test7/drivers/usb/storage/usb.c       Mon Sep  4 21:25:52 2000
+++ linux-2.4.0test7-kees/drivers/usb/storage/usb-kees.c  Mon Sep  4 21:26:20 2000
@@ -360,6 +360,12 @@
                US_SC_SCSI, US_PR_CB, NULL,
                US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE },

+       { 0x054c, 0x0010, 0x0106, 0x0106,
+               "Sony",
+               "DSC-F505",
+               US_SC_SCSI, US_PR_CB, NULL,
+               US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE },
+
        { 0x057b, 0x0000, 0x0000, 0x0299,
                "Y-E Data",
                "Flashbuster-U",
But with that, it works great. In fact, I don't even see the I/O errors that sometimes cropped up in the 2.2.16 backport.

September 28, 2000
I've gotten a few emails from people telling me that they still can't mount their Sony devices. Looks like they're forgetting that they need SCSI disk support in the kernel. Either compiled in, or as a module (sd.o), this is needed to interface with usb-storage.


What it looks like

Once working, the "usb-storage" device detected the camera fine, and reported it in the USB devices file (seen with "cat /proc/bus/usb/devices") as: After that was done, the kernel detected the camera as a SCSI device. You must have SCSI disk support compiled in for the "sd" devices to be accessible. (You can see that I have a 32M Memory Stick from the "dmesg" command): This device has a DOS FAT12 filesystem on it (seen with "fdisk /dev/sda"): And I was able to mount it normally under Linux (using "mount -t vfat /dev/sda1 /mnt/camera") and just copy the JPGs and MPGs from the camera. They even retained their time stamps from when the pictures were taken: It's quite nice. About 20 times faster than the serial interface right now.

The next step is to test deleting files and adding files to the filesystem. The SCSI subsystem is lying about the camera being read-only. There is a patch in the latest (2.4.0-test9) kernels to fix this problem, but I haven't verified that it works for me (others say it works like a charm, though).


Home
Kees Cook