Olympus digital camera and Linux

Olympus digital camera and Linux

Post by Clive Long, » Tue, 22 Jun 2004 00:16:57



Hi,

    Google is not allowing me to "post replies" at the moment - so I
have copied the original posting - My question is at the end

********* copy starts ****************
On 24 Sep 2003 09:23:16 +0200,

Quote:

> Dear experts,

> I have just bought an Olympus mju-300 (aka stylus 300) and I have failed
> to make it communicate with any of the three 'photo-programs' I found
> in Mandrake 9.1. The camera is hooked up to the computer via USB and
> the hardware config. utility of Mandrake identifies it correctly
> but the programs ignore it and /mnt/camera is empty.

> I have scanned google for 'olympus stylus 300 linux' but basically
> only found a zillion copies of the same very positive 'private' 'review'
> of the camera. Any leads will be greatfully accepted. Untill then I
> will have to resort to booting into my Win98 to download pictures.

I have a different model of Olympus digital camera.  Until recently,
I had the same type of problem you're experiencing.  The Olympus
digital
cameras are USB mass storage devices, and are detected as such by
Linux.
As I understand it, USB mass storage devices are supposed to pass a
signature of 'USBS', but the Olympus cameras pass a value of 'USBU'
instead, a value the Linux usb-storage support didn't recognize.
The newer Linux kernels include a fix for this problem.

I'm running 2.4.22 on one of my systems.  That kernel release contains
the fix.  From drivers/usb/storage/transport.h:

#define US_BULK_CS_SIGN         0x53425355      /* spells out 'USBS'
*/
/* This is for Olympus Camedia digital cameras */
#define US_BULK_CS_OLYMPUS_SIGN         0x55425355      /* spells out
'USBU' */

Since upgrading to a kernel with this fix, my Olympus camera works
well
with Linux.

Dave
--
Dave Ulrick

Web:   http://www.niu.edu/~ulrick/

************* end copy ****************

I also have an Olympus mju 300 /400

This camera model is not listed in 0.1.11

Gtkam cannot auto-detect

When I leave the USB cable plugged between the camera and the PC,
periodically the orange and green lights near the optical view finder
flicker - so the USB port is trying to detect a device.

I have tried to navigate to the suggested directory
drivers/usb/storage/
in order to make the suggested modification to the transport.h file.
but that directory does not exist on my system

Other system info: Fedora Core 2.
Kernel : 2.6.6-1.435

Thanks for any ideas

Clive

 
 
 

Olympus digital camera and Linux

Post by Clive Long, » Tue, 22 Jun 2004 15:56:33



> ************* end copy ****************

> I also have an Olympus mju 300 /400

> This camera model is not listed in gtkam 0.1.11

> Gtkam cannot auto-detect

> When I leave the USB cable plugged between the camera and the PC,
> periodically the orange and green lights near the optical view finder
> flicker - so the USB port is trying to detect a device.

The /var/log/messsages when this "light-flicker" occurs follows:

Jun 20 16:42:09 Fedora26Ghz kernel: ohci_hcd 0000:00:03.2: remote
wakeup
Jun 20 16:42:09 Fedora26Ghz kernel: usb 4-1: new full speed USB device
using address 17
Jun 20 16:42:09 Fedora26Ghz kernel: scsi15 : SCSI emulation for USB
Mass Storage devices
Jun 20 16:42:09 Fedora26Ghz kernel:   Vendor: OLYMPUS   Model:
u20D,S400D,u400D  Rev: 1001
Jun 20 16:42:09 Fedora26Ghz kernel:   Type:   Direct-Access  ANSI SCSI
revision: 02
Jun 20 16:42:10 Fedora26Ghz kernel: SCSI device sda: 512000 512-byte
hdwr sectors (262 MB)
Jun 20 16:42:10 Fedora26Ghz kernel: sda: assuming Write Enabled
Jun 20 16:42:10 Fedora26Ghz kernel: sda: assuming drive cache: write
through
Jun 20 16:42:10 Fedora26Ghz kernel:  sda: sda1
Jun 20 16:42:10 Fedora26Ghz kernel: Attached scsi removable disk sda
at scsi15, channel 0, id 0, lun 0
Jun 20 16:42:10 Fedora26Ghz kernel: Attached scsi generic sg0 at
scsi15, channel 0, id 0, lun 0,  type 0
Jun 20 16:42:10 Fedora26Ghz scsi.agent[29368]: disk at
/devices/pci0000:00/0000:00:03.2/usb4/4-1/4-1:1.0/host15/15:0:0:0
Jun 20 16:42:14 Fedora26Ghz kernel: usb 4-1: USB disconnect, address
17

 
 
 

Olympus digital camera and Linux

Post by Clive Long, » Tue, 22 Jun 2004 16:11:41


Also, I get the following - so I think the USB detection is fine.

cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: OLYMPUS  Model: u20D,S400D,u400D Rev: 1001
  Type:   Direct-Access                    ANSI SCSI revision: 02

From reading other posts, I think the problem may be to do with
"digital signature" , but I haven't worked out what that means.

 
 
 

Olympus digital camera and Linux

Post by Kamus of Kadizha » Tue, 22 Jun 2004 17:50:31




>> ************* end copy ****************

>> I also have an Olympus mju 300 /400

>> This camera model is not listed in gtkam 0.1.11

>> Gtkam cannot auto-detect

>> When I leave the USB cable plugged between the camera and the PC,
>> periodically the orange and green lights near the optical view finder
>> flicker - so the USB port is trying to detect a device.

> The /var/log/messsages when this "light-flicker" occurs follows:

> Jun 20 16:42:09 Fedora26Ghz kernel: ohci_hcd 0000:00:03.2: remote
> wakeup
> Jun 20 16:42:09 Fedora26Ghz kernel: usb 4-1: new full speed USB device
> using address 17
> Jun 20 16:42:09 Fedora26Ghz kernel: scsi15 : SCSI emulation for USB
> Mass Storage devices
> Jun 20 16:42:09 Fedora26Ghz kernel:   Vendor: OLYMPUS   Model:
> u20D,S400D,u400D  Rev: 1001
> Jun 20 16:42:09 Fedora26Ghz kernel:   Type:   Direct-Access  ANSI SCSI
> revision: 02
> Jun 20 16:42:10 Fedora26Ghz kernel: SCSI device sda: 512000 512-byte
> hdwr sectors (262 MB)
> Jun 20 16:42:10 Fedora26Ghz kernel: sda: assuming Write Enabled
> Jun 20 16:42:10 Fedora26Ghz kernel: sda: assuming drive cache: write
> through
> Jun 20 16:42:10 Fedora26Ghz kernel:  sda: sda1
> Jun 20 16:42:10 Fedora26Ghz kernel: Attached scsi removable disk sda
> at scsi15, channel 0, id 0, lun 0

At this point, just mount sda1:

mount /dev/sda1 /mnt/camera

and you should be all set.  I just have to figure out why my Stylus 400
mounts as read-only....

Or, if you want to get fancy, add this to /etc/fstab:

/dev/sda1               /mnt/camera             auto    noauto,user,rw  0 0

Then go into /etc/hotplug and change /etc/hotplug/usb/usb-storage to
something like this:

#!/bin/sh
# hotplug script to mount the usb-storage device
# on /mnt/usbhd

# Discover the ownership of the device. The code is
# From the usbcam script distributed with RedHat.
# Their attribution:
#     Idea and code from Nalin Dahyabhai

# this won't work with my system as I have 3 logins with 3 different
# user IDs, so the console ownership depends on who logged in first

# pentax digicam a17/6/1000
PENTAX="a17/6/1000"
# olympus digicam 7b4/102/1001
OLYMPUS="7b4/102/1001"  <=== you will have to get your product ID
# hard drive 5e3/702/2
EXTERNAL="5e3/702/2"

echo ${DEVICE} > /tmp/device
echo ${PRODUCT} > /tmp/product  <=== read product ID from /tmp/product

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
    #decide which usb-storage device we have
    if [ "${PRODUCT}" = $PENTAX ]
    then
        # Mount the usb-storage device
        /bin/mount /mnt/camera
        DATE=`date "+%Y-%m-%d.%H:%M"`
        mkdir /home/pentax/$DATE
        mv /mnt/camera/dcim/100pentx/* /home/pentax/$DATE
        chown -R noriko:parent /home/pentax
        chmod 775 /home/pentax/$DATE
        chmod 664 /home/pentax/$DATE/*
        /bin/umount /mnt/camera
        /sbin/rmmod usb-storage
    fi
    if [ "${PRODUCT}" = $OLYMPUS ]
    then
        # Mount the usb-storage device
        /bin/mount /mnt/camera
        DATE=`date "+%Y-%m-%d.%H:%M"`
        mkdir /home/olympus/$DATE
        mv /mnt/camera/dcim/100olymp/* /home/olympus/$DATE
        chown -R yan:parent /home/olympus
        chmod 775 /home/olympus/$DATE
        chmod 664 /home/olympus/$DATE/*
        /bin/umount /mnt/camera
        /sbin/rmmod usb-storage
    fi
    if [ "${PRODUCT}" = $EXTERNAL ]
    then
        # Mount the usb-storage device
        /bin/mount -t ext3 /dev/sdb1 /mnt/external
    fi
fi

# Create the script to remove the "usb-storage" kernel-module
# when the USB drive is unplugged.  If we do not do this then
# the drive will only mount once.  A big thanks to Jeremy Kerr
# who figured out that you have to do this.
/bin/cat <<EOF > $REMOVER
#!/bin/sh
/sbin/rmmod usb-storage
EOF
# Set file permissions for new script
/bin/chmod 755 $REMOVER

That script should automagically detect your camera (or other USB storage
device), create a directory based on the current date and time, and move
all the pics from the camera to the dir.  The camera should be empty at
that point (except that mine mounts read-only, so I have to delete by hand...)

--Kamus

--
           o   |
 o__      >[]  | A roadie who doesn't ride a mountain bike has no soul.
 ,>/'_    /\   | But then a mountain biker who doesn't ride a road bike has no legs...
(_)\(_)   \ \  |                             -Doug Taylor, alt.mountain-bike

 
 
 

Olympus digital camera and Linux

Post by Clive Long, » Wed, 23 Jun 2004 02:00:04



Quote:

> At this point, just mount sda1:

> mount /dev/sda1 /mnt/camera

> and you should be all set.  I just have to figure out why my Stylus 400
> mounts as read-only....

Bingo!

There are two directories "below" /mnt/camera

These are dcim/100olymp

Now I can see all the jpgs when I perform an "ls"

Only "problem" left is that when I navigate GIMP to this folder, GMP
cannot display previews - which makes selecting the correct image
hit-and-miss.

gtkam still cannot detect the camera even though the mount has worked.

Regards,

Clive

 
 
 

Olympus digital camera and Linux

Post by Clive Long, » Wed, 23 Jun 2004 02:15:20



Quote:

> At this point, just mount sda1:

> mount /dev/sda1 /mnt/camera

> and you should be all set.  I just have to figure out why my Stylus 400
> mounts as read-only....

When I used your instructions

"Grabbed" a random image into GIMP from the /mnt/camera/dcim/100olymp
directory

Cropped the image in  GIMP

Saved the image in GIMP

The Modified image is now loaded in the camera and viewable on the LCD
at the back of the camera.

So in my case the USB file system has been mounted read /write

Now this MAY be because I created /mnt/camera with chmod 777 - as a
result of reading one of the HOW-TOs on USB digital cameras.

Clive

 
 
 

Olympus digital camera and Linux

Post by Kamus of Kadizha » Wed, 23 Jun 2004 03:31:16



> Bingo!

> There are two directories "below" /mnt/camera

> These are dcim/100olymp

> Now I can see all the jpgs when I perform an "ls"

> Only "problem" left is that when I navigate GIMP to this folder, GMP
> cannot display previews - which makes selecting the correct image
> hit-and-miss.

Remember, your card has a limited # of writes - *DO NOT* work in that
directory.  Grab your images and unmount.

Use the script I attached to dump all your images at once to a temporary
directory.

Quote:> gtkam still cannot detect the camera even though the mount has worked.

gtkam won't - IIRC gtkam only works with non-mass-storage cameras.

--Kamus

 
 
 

Olympus digital camera and Linux

Post by Kamus of Kadizha » Wed, 23 Jun 2004 03:33:54



> So in my case the USB file system has been mounted read /write

> Now this MAY be because I created /mnt/camera with chmod 777 - as a
> result of reading one of the HOW-TOs on USB digital cameras.

Actually, the file system on that card was marked read-only - not quite
sure why.  The camera refused to work with that card as well....

Mounted the card, chmod a+rw . ; all is well.

--Kamus

 
 
 

Olympus digital camera and Linux

Post by Clive Long, » Wed, 23 Jun 2004 06:29:40


this par tof the thread is now redundant as I have got at the files with Kamus' help

Top man!

 
 
 

Olympus digital camera and Linux

Post by Jim Shaffer, Jr » Wed, 23 Jun 2004 07:16:29



Quote:>gtkam still cannot detect the camera even though the mount has worked.

gtkam is probably designed to access the camera as a camera, not as a removable
storage device.  For what it's worth, I have to access my 2040Z as a drive
rather than a camera even in Olympus's Windows software.
 
 
 

1. Olympus digital camera and Linux

Dear experts,

I have just bought an Olympus mju-300 (aka stylus 300) and I have failed
to make it communicate with any of the three 'photo-programs' I found
in Mandrake 9.1. The camera is hooked up to the computer via USB and
the hardware config. utility of Mandrake identifies it correctly
but the programs ignore it and /mnt/camera is empty.

I have scanned google for 'olympus stylus 300 linux' but basically
only found a zillion copies of the same very positive 'private' 'review'
of the camera. Any leads will be greatfully accepted. Untill then I
will have to resort to booting into my Win98 to download pictures.

Cheers,

--
========================================================================

                                     "Problems worthy of attack
                                      prove their worth by hitting back"
                                                              Piet Hein
========================================================================

2. slow ttys pl10 net-2

3. OLYMPUS C400 Digital Camera and Linux ?

4. HELP - adding another soundcard to linux

5. olympus D-100 digital Camera not working

6. GBU/HURD fs Support

7. Reading SmartMedia files from Olympus Digital Camera

8. Those MS API disclosures - errors, incomplete, useless?

9. driver for Olympus c3040 digital camera using usb?

10. Olympus digital camera

11. set up Olympus D360L digital camera in Red Hat 8.0

12. RadioShack Flatfoto or Ultra-Pocket Digital Camera or Creative CardCam or Logitech Pocket Digital Camera

13. Olympus D220L Digital Cam...under linux?