FAQ   Search   Memberlist  
Profile    Log in to check your private messages    Register    Log in
Multi Card Readers - HOW-TO quici

 
Post new topic   Reply to topic    BLAG Forum Index -> support
View previous topic :: View next topic  
Author Message
kazim
PostPosted: Thu May 20, 2004 9:01 pm    Post subject: Multi Card Readers - HOW-TO quici Reply with quote

Under RH/BLAG Single storage devices work fine, and you can mount them after insert with
Code:
mount /dev/sda1 /mnt/usbflash


Someone at a BLAG session was asking about USB storage multiple card readers (you know the ones with slots for Compact Flash, Memory Stik etc..) I got my generic 4-card reader working this way:

Insert the cardreader with at least one card therein.
Code:
cdrecord --scanbus

will show which bus it got onto (this may vary depending on whether it lwas inserted at boottime)
Adapt this script to the bus as appropriate:
Code:

#!/bin/sh
echo "scsi add-single-device 0 0 0 0" > /proc/scsi/scsi
echo "scsi add-single-device 0 0 0 1" > /proc/scsi/scsi
echo "scsi add-single-device 0 0 0 2" > /proc/scsi/scsi
echo "scsi add-single-device 0 0 0 3" > /proc/scsi/scsi
cat /proc/scsi/scsi

At this point you should have access to the card-slots on /dev/sda /dev/sdb /dev/sdc /dev/sdc -
You can mount your storage device like so
Code:
 mount /dev/sdb1 /mnt/mcr_compactflash

You can install sg3_utils from http://www.torque.net/sg/index.html to help show where scsi devices are mapped. You can also install them with
Code:
apt-get install sg3_utils

More info from these pages:
http://www.linux-sxs.org/hardware/flashreaders.htm

blaggard
PostPosted: Tue Nov 09, 2004 4:04 am    Post subject: Re:Multi Card Readers - HOW-TO quici Reply with quote

Kazim,

OK, I need help.

I got one of those cardreaders to read my Secure Digital card.

DMESG output:
Code:

usb 1-2: new full speed USB device using address 16
scsi14 : SCSI emulation for USB Mass Storage devices
  Vendor: GENERIC   Model: USB Storage-SMC   Rev: I03A
  Type:   Direct-Access                      ANSI SCSI revision: 02
Attached scsi removable disk sdb at scsi14, channel 0, id 0, lun 0
Attached scsi generic sg2 at scsi14, channel 0, id 0, lun 0,  type 0
USB Mass Storage device found at 16
updfstab: Using deprecated /dev/sg mechanism instead of SG_IO on the actual devi
ce
updfstab: Using deprecated /dev/sg mechanism instead of SG_IO on the actual devi
ce
updfstab: Using deprecated /dev/sg mechanism instead of SG_IO on the actual devi
ce


Output from my /proc/scsi/scsi:

Code:
mypc> cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: E-IDE    Model: CD-ROM CR-852E   Rev: 1.11
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi10 Channel: 00 Id: 00 Lun: 00
  Vendor: PNY      Model: Attache 2.0      Rev: 4.85
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi14 Channel: 00 Id: 00 Lun: 00
  Vendor: GENERIC  Model: USB Storage-SMC  Rev: I03A
  Type:   Direct-Access                    ANSI SCSI revision: 02



QUESTION: What should be the entry in /etc/fstab for this?
The device simply can't be read.

Please help.

Thanks.

Hari

blaggard
PostPosted: Tue Nov 09, 2004 5:10 am    Post subject: Reply with quote

Hi,

Did some more research on this and found out that if you have an n-in-1 card reader that can deal with multiple cards, then I have to make sure that "Probe all LUNs on each SCSI device" (CONFIG_SCSI_MULTI_LUN) is enabled in the kernel.

How do I do that?

Thanks.

Hari

jebba
PostPosted: Tue Nov 09, 2004 9:44 am    Post subject: Reply with quote

blaggard wrote:
Hi,

Did some more research on this and found out that if you have an n-in-1 card reader that can deal with multiple cards, then I have to make sure that "Probe all LUNs on each SCSI device" (CONFIG_SCSI_MULTI_LUN) is enabled in the kernel.


I think it is enabled by default.

-Jeff

kazim
PostPosted: Sun Nov 14, 2004 12:17 am    Post subject: Reply with quote

hey,

This how-to was done on BLAG 9002 mind you... not sure but things is probly different in whatever alpha :twisted: you are using now.

proc/scsi indicates that your memstick is located on dev 0,0,1. Use the script above but on bus #1 instead of zero, thus:
Code:

echo "scsi add-single-device 0 0 1 0" > /proc/scsi/scsi


let us know if that gets you any further, or not.

Display posts from previous:   
Post new topic   Reply to topic    BLAG Forum Index -> support
Page 1 of 1

Protected by Anti-Spam ACP