Instructions for setting up SONY DSC-Sxx cameras with Linux
SYNOPSIS
- The information supplied here leans more toward basic USB support than
specifically a digital camera, but this is often where people (including
myself before doing lots of RTFM and STFW) get a little muddled. Models
supported include the DSC-S30, DSC-S50 (which I have, and these directions
are based on) and the DSC-S70.
- Cathy Nicoloff reports that the DSC-P20 under Progeny Debian, Kernel 2.4.8
is also supported in accordance with these directions (09/19/2001). Also,
evidently the P20 can be mounted read-write. Thanks for the information.
- The DSC-S30 camera is also confirmed to work correctly. Thanks to Jared
Armstrong for that one. (09/21/2001)
- The DSC-S50 (and probably any DSC-xx) camera works perfectly with ZERO
modifications to RedHat 7.2 - just plug it in and go. It should detect
and automatically mount your camera in /mnt/camera. It also mounts it
RW, however if you're not root, you will need to create and chown your
mountpoints prior to plugging in the camera if you want to be able to
delete items from your memstick (01/24/2002)
REQUIRED
- Kernel >2.4.0-test5 (I'm using 2.4.2 which you can download here)
PREPARATION & INSTALLATION
- Build new kernel as you normally would (instructions for doing this are way
beyond the scope of this document)
- Enable the following options in USB support (or click here for a screen
capture of the USB section in "make xconfig"):
CONFIG_USB=m
CONFIG_USB_DEVICEFS=y
CONFIG_USB_UHCI=m (*)
CONFIG_USB_UHCI_ALT=m (*)
CONFIG_USB_UHCI_OHCI=m (*)
CONFIG_USB_STORAGE=m
Say "N" to everything else (unless you have other USB devices, obviously)
(*) NOTE: You only need ONE of these and which one will depend on your
motherboard/system architecture. It is safe to build modules for all
three. For my Intel FX440 (very standard) motherboard, I use the first
one which I imagine most people will use. More below.
TESTING USB CONFIGURATION
- Reboot on your new kernel
- Load the necessary modules:
[root@foo /root]# modprobe usb-uhci (OR usb-ohci or uhci)
PCI: Found IRQ 10 for device 00:07.2
PCI: The same IRQ used for device 00:0b.0
usb-uhci.c: Detected 2 ports
[root@foo /root]# modprobe usbcore
[root@foo /root]# modprobe usb-storage
- Check your logfile to make sure everything went okay:
[root@foo /root]# tail -f /var/log/messages
Mar 17 07:58:04 localhost kernel: usb.c: registered new driver usbdevfs
Mar 17 07:58:04 localhost kernel: usb.c: registered new driver hub
Mar 17 07:58:04 localhost kernel: usb-uhci.c: $Revision: 1.251 $ time 07:38:52Mar 17 2001
Mar 17 07:58:04 localhost kernel: usb-uhci.c: High bandwidth mode enabled
Mar 17 07:58:04 localhost kernel: PCI: Found IRQ 10 for device 00:07.2
Mar 17 07:58:04 localhost kernel: PCI: The same IRQ used for device 00:0b.0
Mar 17 07:58:04 localhost kernel: usb-uhci.c: USB UHCI at I/O 0xe000, IRQ 10
Mar 17 07:58:04 localhost kernel: usb-uhci.c: Detected 2 ports
Mar 17 07:58:04 localhost kernel: usb.c: new USB bus registered, assigned bus number 1
Mar 17 07:58:04 localhost kernel: hub.c: USB hub found
Mar 17 07:58:04 localhost kernel: hub.c: 2 ports detected
Mar 17 07:58:19 localhost kernel: Initializing USB Mass Storage driver...
Mar 17 07:58:19 localhost kernel: usb.c: registered new driver usb-storage
Mar 17 07:58:19 localhost kernel: USB Mass Storage support registered.
- Check the output of "lsmod" - you should see this:
[root@foo /root]# lsmod
Module Size Used by
usb-storage 21664 0 (unused)
usb-uhci 21872 0 (unused)
usbcore 48016 0 [usb-storage usb-uhci]
MOUNT CAMERA FILESYSTEM
- Plug your camera in to your USB port and it should be detected automatically:
[root@foo /root]# tail -f /var/log/messages
Mar 17 07:59:42 localhost kernel: hub.c: USB new device connect on bus1/1, assigned device number 2
Mar 17 07:59:42 localhost kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Mar 17 07:59:42 localhost kernel: Vendor: Sony Model: Sony DSC Rev: 2.10
Mar 17 07:59:42 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02
Mar 17 07:59:42 localhost kernel: Detected scsi removable disk sdc at scsi1, channel 0, id 0, lun 0
Mar 17 07:59:42 localhost kernel: SCSI device sdc: 7904 512-byte hdwr sectors (4 MB)
Mar 17 07:59:42 localhost kernel: usb-uhci.c: interrupt, status 3, frame# 1186
Mar 17 07:59:42 localhost kernel: sdc: test WP failed, assume Write Protected
Mar 17 07:59:42 localhost kernel: sdc: sdc1
- Note the last line! This may be different on other systems. I already have
sdaX and sdbX on my machine, so sdcX is the next available.
- Create a mountpoint for your camera, and mount the disk:
[root@foo /root]# mkdir /mnt/cam
[root@foo /root]# mount -t msdos /dev/sdc1 /mnt/cam
mount: block device /dev/sdc1 is write-protected, mounting read-only
CAMERA CONTENTS
- This is what you'll see when the camera is empty:
[root@foo /root]# ls -l /mnt/cam
total 0
-r-xr-xr-x 1 root root 0 Jul 8 2000 memstick.ind
- Any movies or pictures will be stored in their own directories as MPEG or
JPG respectively. Naturally you will not be able to delete anything from
the camera/memory stick since it is mounted read-only, but this is easily
accomplished via the camera itself.
- After you copy all your files:
[root@foo /root]# umount /mnt/cam
- Unplug camera:
[root@foo /root]# tail -f /var/log/messages
Mar 17 08:04:03 localhost kernel: usb-uhci.c: interrupt, status 3, frame# 414
Mar 17 08:07:14 localhost kernel: usb.c: USB disconnect on device 2
NOTES
- Although the camera itself is not supported, you can use gphoto to
view and manipulate images. You will need to copy your files somewhere
where gphoto can write to.
- These instructions should be relatively easy, however if there are
any suggestions or noted ommissions/errors, etc. feel free to drop
me a note at bofh at ls dash l dot net
RAM
- The image below links to a site where I found some very competitive
prices on memory sticks for DSC-Sxx cameras:
Colin Bloch [03/17/2001]