Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Apr 2003 14:17:33 +0100
From:      Scott Mitchell <scott+freebsd@fishballoon.org>
To:        Dima Veselov <kab00m@lich.phys.spbu.ru>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: CRW-600 MultiCard reader
Message-ID:  <20030401131732.GA30248@tuatara.fishballoon.org>
In-Reply-To: <20030401093247.GA352@lich.phys.spbu.ru>
References:  <20030401093247.GA352@lich.phys.spbu.ru>

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

--UlVJffcvxoiEqYs2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Apr 01, 2003 at 01:32:47PM +0400, Dima Veselov wrote:
> Hello there!
> 
> I have problem using Multi-Card reader CRW-600 6-in-1

Hi Dima,

First of all, I assume this is one of those 6-in-1 devices that has four
slots, for different flash media types?  Each of those slots should
probably map to a separate 'da' device, although as you've seen only the
first one is recognised automatically.  Try this:

# camcontrol rescan 1:0:1
# camcontrol rescan 1:0:2
# camcontrol rescan 1:0:3

(use whatever bus/device the reader has been attached to... I'd be slightly
concerned that your message shows it attaching to 0:0:0 while the devlist
at the end shows 1:0:0 - any idea what happened there?)

Hopefully then you should have da1-da4 attached and be able to put media in
one of the slots and mount the appropriate /dev/daX device.  You'll need to
figure out which slot corresponds to which device, and note that you might
need to mount a slice (/dev/da1s1, or whatever).  Trial and error is
required to get this right :-)

I'm almost certain that the 'Medium not present' messages you were getting
when you tried to mount the device were simply because you were trying to
mount from a slot with no media in it...

Afraid I can't help with the multiple attach/detach problem; best advice is
probably to not do that.  At least you should be able to get the thing
working, or turn up some more information to tell us why it isn't.

I've attached a message I wrote a while ago describing how I got my own
very similar card reader working.  Maybe that will be helpful to you as
well.

> [root@laura files]$ camcontrol devlist
> <QUANTUM FIREBALL_TM3200S 300X>    at scbus0 target 3 lun 0 (pass0,da0)
> <PLEXTOR CD-ROM PX-40TS 1.13>      at scbus0 target 5 lun 0 (pass1,cd0)
> <PLEXTOR CD-R   PX-W1210S 1.04>    at scbus0 target 6 lun 0 (pass2,cd1)
> <MCRW CRW600        CF 2.1D>       at scbus1 target 0 lun 0 (pass3,da1)

Thinking about the changing device number a bit more, you might want to
look into 'wiring down' the device numbers of your various SCSI drives in
your kernel config - so that they always come up as da0, cd0, cd1.  That
should also ensure that the card reader uses da1-da4 every time.

Cheers,

	Scott

-- 
===========================================================================
Scott Mitchell           | PGP Key ID | "Eagles may soar, but weasels
Cambridge, England       | 0x54B171B9 |  don't get sucked into jet engines"
scott at fishballoon.org | 0xAA775B8B |      -- Anon

--UlVJffcvxoiEqYs2
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Date: Fri, 21 Feb 2003 23:00:46 +0000
From: Scott Mitchell <scott+freebsd@fishballoon.org>
To: freebsd-mobile@freebsd.org
Subject: Sitecom CN-300 multi flash reader success
Message-ID: <20030221230046.GA952@tuatara.fishballoon.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.4i
X-Operating-System: FreeBSD 4.7-STABLE i386

Hi all,

A USB mass storage success story...

I just acquired this device -- one of those USB flash card readers with
MMC/SD, SmartMedia, CF and MemoryStick slots (for those in the UK, it's
£19.99 at maplin.co.uk until Saturday... not a bad price).  I bought it
specifically because it claimed to be Linux-friendly, which I took as a
good chance it would work with FreeBSD as well.

Anyway, it works fine in Win2K, and (much happiness) in FreeBSD as well.
When I plug it in, with the umass module loaded, I get (in
/var/log/messages):

Feb 21 22:11:22 tuatara /kernel: umass0:                          MultiFlash, rev 1.10/1.00, addr 2
Feb 21 22:11:22 tuatara /kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Feb 21 22:11:22 tuatara /kernel: da0: <DMI MultiFlash 3.00> Removable Direct Access SCSI-0 device
Feb 21 22:11:22 tuatara /kernel: da0: 650KB/s transfers
Feb 21 22:11:22 tuatara /kernel: da0: Attempt to query device size failed: NOT READY, Medium not present

According to the Linux docs, it should come up as a SCSI device with 4
LUNs, so I stuck a SmartMedia card from my camera in the slot and tried:

tuatara# camcontrol rescan 0:0:1
Re-scan of 0:0:1 was successful
tuatara# camcontrol rescan 0:0:2
Re-scan of 0:0:2 was successful
tuatara# camcontrol rescan 0:0:3
Re-scan of 0:0:3 was successful

which got me:

Feb 21 22:26:55 tuatara /kernel: da1 at umass-sim0 bus 0 target 0 lun 1
Feb 21 22:26:55 tuatara /kernel: da1: <DMI MultiFlash 3.00> Removable Direct Access SCSI-0 device
Feb 21 22:26:55 tuatara /kernel: da1: 650KB/s transfers
Feb 21 22:26:55 tuatara /kernel: da1: 62MB (128000 512 byte sectors: 64H 32S/T 62C)
Feb 21 22:27:01 tuatara /kernel: da2 at umass-sim0 bus 0 target 0 lun 2
Feb 21 22:27:01 tuatara /kernel: da2: <DMI MultiFlash 3.00> Removable Direct Access SCSI-0 device
Feb 21 22:27:01 tuatara /kernel: da2: 650KB/s transfers
Feb 21 22:27:01 tuatara /kernel: da2: Attempt to query device size failed: NOT READY, Medium not present
Feb 21 22:27:04 tuatara /kernel: da3 at umass-sim0 bus 0 target 0 lun 3
Feb 21 22:27:04 tuatara /kernel: da3: <DMI MultiFlash 3.00> Removable Direct Access SCSI-0 device
Feb 21 22:27:04 tuatara /kernel: da3: 650KB/s transfers
Feb 21 22:27:04 tuatara /kernel: da3: Attempt to query device size failed: NOT READY, Medium not present

Notice that it has detected the '64MB' card in slot 1.  I'm pretty sure
this card has a FAT filesystem on it, so I tried to mount it:

tuatara# mount_msdos /dev/da1 /mnt
mount_msdos: /dev/da1: Input/output error

with the following in /var/log/messages:

Feb 21 22:29:32 tuatara /kernel: (da1:umass-sim0:0:0:1): READ(6)/WRITE(6) not supported, increasing minimum_cmd_size to 10.
Feb 21 22:29:33 tuatara /kernel: (da1:umass-sim0:0:0:1): READ(10). CDB: 28 20 0 20 0 0 0 0 1 0
Feb 21 22:29:33 tuatara /kernel: (da1:umass-sim0:0:0:1): MEDIUM ERROR info:200000 asc:11,0
Feb 21 22:29:33 tuatara /kernel: (da1:umass-sim0:0:0:1): Unrecovered read error
Feb 21 22:29:33 tuatara /kernel: da1: reading primary partition table: error reading fsbn 0

Fdisk said there was a good partition table there though, so I started
working my way through the /dev/da1* entries and eventually found that
/dev/da1s1c would mount successfully, and there were all my photos :-)

tuatara# umount /mnt
tuatara# camcontrol eject 0:0:1

turns out the LED next to the slot so I can eject the card safely, and I
seem to be able to insert and mount other cards without problems, even
different capacity ones.  I don't have any non-SmartMedia flash devices
around right now, but I expect they would work just as well.  This was all
done on -STABLE from a week ago... I guess it would work on -CURRENT also.

So a big round of thanks to all those who've contributed to getting this
stuff to 'just work'!  Now all I need to do is set up amd to mount the
cards automatically for me...

Cheers,

	Scott

-- 
===========================================================================
Scott Mitchell           | PGP Key ID | "Eagles may soar, but weasels
Cambridge, England       | 0x54B171B9 |  don't get sucked into jet engines"
scott at fishballoon.org | 0xAA775B8B |      -- Anon

--UlVJffcvxoiEqYs2--



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