Sitecom CN-300 multi flash reader success

Scott Mitchell <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
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

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-mobile" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.