The FreeBSD Diary
Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link.
Card reader for FreeBSD 10 April 2006
When I first heard of a card reader, I thought of business cards. I imagined a device that took business cards and digitized them so you could save contact information. Yes, such tools exist, but the card reader in question is actually a memory card reader. A very common use of this tool is to take a memory card from a digital camera and read it into your computer. I have two such devices. One I've had for year or so, and the other one is a recent acquistion.
I bought a second card reader just recently in order to get the pictures off the kids' camera. Their cameras take an XD meory chip. My original card reader was a USB 2.0 7-in-1 device. It can handle the following types of cards:
Most cameras come with a cable that allows you to connect to a USB connection. Kids being kids, they can't find the cable, which, as luck would have it, is not a standard USB cable. That's another reason why a card reader is handy.
While I was able to use this card reader under NT, FreeBSD 4, 5, and 6, it would not handle the XD cards.
The new device, which I got at Staples, is from SanDisk. It's an ImageMate 12 in 1, model number SDD3-89 V3, part number 20-90-30329. It can take the following cards:
The unit comes with an optional docking station. You don't have to use it, and the card reader also comes with a short USB cables just right for plugging directly into a laptop. Everything is powered from the USB connection; you do not need an external power supply for it.
The SanDisk unit worked every time I used it. No problems at all, under both FreeBSD 6 and Windows XP. Including with the card reader is some Windows software to use the one-touch button. I have not installed that.
Under FreeBSD 6, here is an extract from
umass0: SanDisk ImageMate 14 in 1 Reader/Writer, rev 2.00/93.21, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 da0:
To access the memory card, you need to mount the device. To FreeBSD, this memory card appears as a SCSI device.
# mount_msdosfs /dev/da1s1 /mnt
Make sure that /mnt exists before you issue this command.
Most cameras use a FAT file system, and that is why I used
The memory stick is now just another filesystem according to your FreeBSD system:
# df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad0s2a 507630 102034 364986 22% / devfs 1 1 0 100% /dev /dev/ad0s2e 507630 72 466948 0% /tmp /dev/ad0s2f 15709014 6505554 7946740 45% /usr /dev/ad0s2d 1254862 282386 872088 24% /var /dev/da1s1 16000 15744 256 98% /mnt
Here's a look around that memory stick:
# cd /mnt # ls dcim # cd dcim # ls 100_fuji # cd 100_fuji # ls dscf0001.jpg dscf0048.avi dscf0091.jpg dscf0002.jpg dscf0049.avi dscf0092.jpg dscf0003.jpg dscf0081.jpg dscf0093.jpg dscf0030.jpg dscf0082.jpg dscf0117.jpg dscf0046.jpg dscf0086.jpg dscf0118.avi #
Now you can copy files around, just as you would on any other disk:
# mkdir ~/my-photos # cd ~/my-photos # cp /mnt/dcim/100_fuji/* . # ls dscf0001.jpg dscf0048.avi dscf0091.jpg dscf0002.jpg dscf0049.avi dscf0092.jpg dscf0003.jpg dscf0081.jpg dscf0093.jpg dscf0030.jpg dscf0082.jpg dscf0117.jpg dscf0046.jpg dscf0086.jpg dscf0118.avi #
Always remember to unmount the filesystem before you disconnect the USB device, or remove the memory stick from the card reader. Failure to do this may result in a corrupted filesystem.
# umount /mnt
This SanDisk card is a nice addition to my laptop bag. It has proven useful already, just for being able to get the photos off the kids' cameras. I'm glad I bought it.