Subject: Re: Media (e.g., SmartMedia) via Belkin USB media reader.
To: None <netbsd-help@NetBSD.ORG>
From: MLH <MLH@goathill.org>
List: netbsd-help
Date: 11/15/2002 21:01:49
On 15 Nov 2002 01:15:01 -0600, Richard Rauch wrote:
> I thought that I'd like to access the SmartMedia cards (from my Olympus
> digital camera) at faster-than-serial-port speeds.  (The camera has an
> interface for good ol' 115kbps serial ports, and uses SmartMedia for the
> removable media format.)
> 
> Is it possible that my camera is just doing something funky for the format
> and NetBSD can't recognize it as valid?  Or is the reader brain-damaged?
> I assume that it *should* look like an sd unit that I can mount using
> ``mount -t msdos /dev/sd??'' for appropriate ??.
> 
> When I plug the device into a USB port, it probes as follows, in my 1.6
> machine (presently running absolutely stock GENERIC 1.6):
> 
>  /~~~ dmesg excerpt
> 
> umass0 at uhub0 port 2 configuration 1 interface 0
> umass0: vendor 0x55aa 8-in-2, rev 1.10/1.01, addr 2
> umass0: using SCSI over Bulk-Only
> scsibus0 at umass0: 2 targets, 2 luns per target
> scsibus0: waiting 2 seconds for devices to settle...
> sd0 at scsibus0 target 1 lun 0: <, , > SCSI0 0/direct fixed
> sd0: drive offline
> 
>  \___ dmesg excerpt
> 
> The "offline" bit at the end worries me.  I get that "offline" bit whether
> or not there is media inserted in the reader when the reader is plugged
> in.  Inserting or removing media doesn't register with the device.

I have an Olympus D-360L (1.3Mpix) with a PQI Travel Flash USB
SmartMedia car reader (~$14 at Fry's):

umass0 at uhub0 port 2 configuration 1 interface 0
umass0: PQI Travel Flash, rev 1.10/2.05, addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, 1 lun per target
scsibus1: waiting 2 seconds for devices to settle...
sd0 at scsibus1 target 1 lun 0: <General, Flash Disk Drive, 2.05> disk removable
sd0: drive offline
sd0: no disk label

With 32M SM card in it:
$ mount /dev/sd0e /mnt
/dev/sd0e                 31968    21488     10480    67%    /mnt

$ cd /mnt
$ ls -lR
total 16
drwxrwxrwx  1 root  wheel  16384 Jun  5 17:55 dcim

./dcim:
total 16
drwxrwxrwx  1 root  wheel  16384 Jun 21 07:34 100olymp

./dcim/100olymp:
total 21456
-rwxrwxrwx  1 root  wheel  199322 Nov 14 22:52 calitr~1.jpg
-rwxrwxrwx  1 root  wheel  202861 Nov 14 22:52 calitr~2.jpg
-rwxrwxrwx  1 root  wheel  187706 Nov 14 21:47 pa280001.jpg
-rwxrwxrwx  1 root  wheel  188668 Nov 14 21:48 pa280002.jpg
-rwxrwxrwx  1 root  wheel  192903 Nov 14 21:48 pa280003.jpg
...

Actually, these file were taken earlier with the camera, but I had
reloaded them from disk back into the card using the card reader,
so the filenames are not what they would look like if the camera
had generated them.  It also has some larger files from my brother's
3.x Mpix Olympus in the same directory:

-rwxrwxrwx  1 root  wheel  656844 Nov 14 21:48 pa280454.jpg
-rwxrwxrwx  1 root  wheel  621454 Nov 14 21:48 pa280455.jpg
-rwxrwxrwx  1 root  wheel  630113 Nov 14 21:48 pa280456.jpg

The camera will display them but in a tinycenter-framed part of
the display, so the camera is downsizing the image in some quantum-like
step that it can handle in order to display it.

===========================================
Amd automounter entry for the card :
amd/smcard :
# $NetBSD: sm
#
# /sm - mount local smartmedia card reader by cd'ing into it:
#       cd /sm/sm0. Be sure to mkdir /sm before using this.
#       Umount by typing "amq -u /sm/sm0" etc.
/defaults       type:=pcfs;opts:=rw,nosuid,nodev

sm0             dev:=/dev/sd0e
-------------
added to amd/master :
[ /sm ]
map_name =              /etc/amd/smcard