Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Apr 2002 12:48:51 -0400
From:      Curtis Villamizar <curtis@workhorse.fictitious.org>
To:        freebsd-scsi@FreeBSD.ORG, multimedia@FreeBSD.ORG
Cc:        curtis@fictitious.org
Subject:   Olympus USB camera success with some kernel mods
Message-ID:  <200204281648.MAA94567@workhorse.fictitious.org>

next in thread | raw e-mail | index | archive | help

FYI - this is just an informational message.  Possible code to commit
in scsi_da.c.  See below.

I just got an Olympus C700 working with the USB.  I can mount the
flash and copy the files off it.  I haven't tried gphoto or anything
else to control the camera.

The normal way to use it is just copy off the *.jpg files that would
appear in the dcim/100olymp/ directory (you'd see files there if I
hadn't just copied them and erased them from this flash).

  [curtis@laptoy770 1] #  mount -o ro -t msdos /dev/da0s1 /mnt
  [curtis@laptoy770 2] #  ls -ltR /mnt
  total 8
  drwxr-xr-x  1 root  wheel  8192 Apr 27 20:53 dcim/

  /mnt/dcim:
  total 8
  drwxr-xr-x  1 root  wheel  8192 Apr 27 20:53 100olymp/

  /mnt/dcim/100olymp:
  [curtis@laptoy770 3] #  ls -lR /mnt
  total 8
  drwxr-xr-x  1 root  wheel  8192 Apr 27 20:53 dcim/

  /mnt/dcim:
  total 8
  drwxr-xr-x  1 root  wheel  8192 Apr 27 20:53 100olymp/

  /mnt/dcim/100olymp:
  [curtis@laptoy770 4] #  umount /mnt

To make this work, the kernel needs:

  options  MSDOSFS

  # SCSI peripherals
  device   scbus    # SCSI bus (required)
  device   da       # Direct Access (disks)
  device   pass     # Passthrough device (direct SCSI access)

  # USB support
  device   uhci     # UHCI PCI->USB interface
  device   ohci     # OHCI PCI->USB interface
  device   usb      # USB Bus (required)
  device   ugen     # Generic
  device   umass    # Disks/Mass storage - Requires scbus and da

An edit has to be made to /sys/cam/scsi/scsi_da.c

	{
		/*
		 * Olympus Cameras quirks
		 */
		{T_DIRECT, SIP_MEDIA_REMOVABLE,
		 "OLYMPUS*", "C-700*", "*"},
		/*quirks*/ DA_Q_NO_6_BYTE
	}

I also added the following after the "match = cam_quirkmatch("
statement providing a confirmation in dmesg output after reboot.

	printf("scsi quirks: %s - type %d med %s "
	       "vend \"%s\" prod \"%s\" ver \"%s\"\n",
	       match ? "match" : "none",
	       SID_TYPE((&cgd->inq_data)),
	       SID_IS_REMOVABLE((&cgd->inq_data)) ? "remov" : "fixed",
	       cgd->inq_data.vendor, cgd->inq_data.product,
	       cgd->inq_data.revision);

The printf is useful if for some reason you aren't getting the string
match right (if using a similar camera or USB/SCSI device).

That was all it took.  Manually run the following before the mount:

  usbdevs - make sure the camera is powered on and shows up

  camcontrol rescan 0 - detect the scsi device (I did this on my
        laptop but on a machine with scsi buses you'd get a higher number.

  camcontrol tur da0 - check for unit ready.

If the unit doesn't indicate ready, chances are the DA_Q_NO_6_BYTE
quirk is not in effect.  Recheck the kernel changes.

This might work with other Olympus USB only cameras.  Probably would.

Curtis

ps - I haven't confirmed whether the camera is usable under an MS OS
and I have no intention to do so.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204281648.MAA94567>