Skip to content.

Scientific Linux

Sections
Personal tools
You are here: Home » Documentation » How To » How Use a Flash Multi-Card Reader in S.L. 4.x

How Use a Flash Multi-Card Reader in S.L. 4.x

Although Scientific Linux 4.x has made great progress with USB drives, the USB Flash Multi-Card Reader (6-in-1, 14-in-1, 22-in-1) is still causing problems. This page will give some step by step guidelines to get your's working.

As flash cards of different types become more and more popular, so do the card readers, that are able to read more than one type of flash card. These readers usually only have 2 to 4 slots to plug a flash drive in, yet they make clames to support up to 52 different types of card, at the time of this writting. Now to be honest, they really do support that many different types of flash cards, but they do things like list 8 different types of CompactFlash, while I would have lumped them all into 1.
But anyway, if you are here reading this, you already know all of that.

Problem: When I plug in my multi-card reader, Scientific Linux 4x only see's the flash card in the first slot, but not any of the other slots?
The reason for this is because USB flash card readers are detected as scsi drives. This is nice because it gives them alot of features. The problem is with multi-card readers. Each of those slots on the reader is treated as a different LUN on the scsi bus.
It's possible for Scientific Linux to check out all the lun's on a scsi bus, but the problem is that for some scsi devices, this breaks things, or hangs the system for a very long time. So the default is to only check for more LUN's if it knows about your system.
So now you are thinking, great, I'll just tell it about my system, that should be easy enough. Well, it is an it isn't. Scientific Linux 4x is using HAL and DBUS, and these are wonderful tools that let your system and program's know when a device has been plugged in. It let's things get configured automatically. The problem is that at the time of this writting, it's documentation is pretty scarse, and it's quite hard for the typical end user to figure out how to modify it when you do want something changed.

Anyway, let's just show you how to do it, in a way that has worked consistantly for me on a variety of machines.

  1. Find out what scsi devices are already on the system
    cat /proc/scsi/scsi
  2. On a dedicated console window, watch /var/log/messages, continue to watch it through all these steps
    tail -f /var/log/messages
  3. Put your flash cards in your multi-card reader, and then plug it into the usb slot. You should see some messages go by in /var/log/messages as the system set's up as much as the reader as it can. If you do not see any messages go by, then you need to debug your USB system, and that is not in the scope of this how-to
  4. Look and see how the new device was setup. There should only be one new entry (and entry is 3 lines long)
    cat /proc/scsi/scsi
    It should look something like this
    Host: scsi2 Channel: 00 Id: 00 Lun: 00
      Vendor: OTi      Model: CF CARD Reader   Rev: 2.00
      Type:   Direct-Access                    ANSI SCSI revision: 02
    
  5. Take note of the scsi Bus, Channel, ID, and Lun.
    For this example we have the following BUS:2 Channel:0 ID: 0 LUN:0
    The sneaky one is that we get the scsi bus from scsi2
  6. So, now we are going to scan the scsi bus for lun's, one at a time.
    Take the numbers from above, and do the following
    echo "scsi add-single-device (BUS) (CHANNEL) (ID) 1" > /proc/scsi/scsi
    so from our example we would do
    echo "scsi add-single-device 2 0 0 1" > /proc/scsi/scsi
  7. As you do the above command, you should see some output in /var/log/messages. If you see something that looks like it saw the flashcard you need, and set it up, then you can stop.
    To double check to make sure it saw the new LUN, again do at
    cat /proc/scsi/scsi
    It should have added another entry, that looks something like
    Host: scsi2 Channel: 00 Id: 00 Lun: 01
      Vendor: OTi      Model: SM CARD Reader   Rev: 2.00
      Type:   Direct-Access                    ANSI SCSI revision: 02
    
  8. Typically, you would only need to walk 4 lun's, because there are only slot's on a multi-card reader. So you would increase the lun number and repeate the previous steps.
    echo "scsi add-single-device 2 0 0 2" > /proc/scsi/scsi
    echo "scsi add-single-device 2 0 0 3" > /proc/scsi/scsi
    echo "scsi add-single-device 2 0 0 4" > /proc/scsi/scsi
  9. Any now, use the USB device as you would any other, wich also is not in the scope of this how-to.
Created by dawson
Last modified 2006-03-29 11:55 AM
 

Powered by Plone

This site conforms to the following standards: