PDA

View Full Version : How to access USB CFII Reader



Ilkka
05-09-2003, 10:35 PM
Hi,

First some bitter critique, after having fought for a couple of hours:
In a distribution like this, one would expect that accessing a USB Compact Flash Card Reader is a trivial task. But I couldn't, even after having read 'all' about it in the web.

I have USB 2.0. And below is some information about the machine. Could anyone help me, please?

knoppix@ttyp1[nvnet]$ cat /proc/bus/usb/devices
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 3
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB OHCI Root Hub
S: SerialNumber=d483c000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 0.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1
P: Vendor=0781 ProdID=0005 Rev= 0.05
S: Manufacturer=SanDisk
S: Product=USB CFII
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=ff Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=5ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 3
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB OHCI Root Hub
S: SerialNumber=d483a000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms


knoppix@ttyp1[nvnet]$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: HL-DT-ST Model: CD-RW GCE-8480B Rev: 1.03
Type: CD-ROM ANSI SCSI revision: 0


knoppix@ttyp1[nvnet]$ lsmod
Module Size Used by Tainted: P
af_packet 13448 0 (autoclean)
nvnet 26208 2
radeon 108164 0
autofs4 8724 1 (autoclean)
nls_iso8859-1 2876 1 (autoclean)
ntfs 50784 1 (autoclean)
i810_audio 23112 0
ac97_codec 9992 0 [i810_audio]
soundcore 3364 2 [i810_audio]
serial 51876 0 (autoclean)
usb-ohci 18120 0 (unused)
usbcore 57088 1 [usb-ohci]
apm 9612 1
rtc 6908 0 (autoclean)
cloop 5168 1

Henk Poley
05-10-2003, 01:50 PM
knoppix@ttyp1[nvnet]$ cat /proc/bus/usb/devices
[snip]
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 0.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1
P: Vendor=0781 ProdID=0005 Rev= 0.05
S: Manufacturer=SanDisk
S: Product=USB CFII
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=ff Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=5ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
It 'knows' it's there. So one thing I would ask. What filesystem does it contain FAT16? I don't know what mountpoint the device is given, so I can't help you with that.

Try looking in /dev ???

Ilkka
05-10-2003, 02:21 PM
Hi,

Thanks for the reply. The filesystem should be FAT16 ... maybe. Hmm.

I think the problem was that it doesn't have any mountpoint.

Well mount says that
"usb is mounted as /proc/bus/usb" but I don't think it's that?

I tried to load the module usb-storage.o but that didn't do anything good for me...

Ilkka

aay
05-10-2003, 04:11 PM
If you plug in the drive before you boot, is there not an icon for it on your desktop? Knoppix always autodetects my drive this way and automatically puts an icon on the desktop which makes access quite easy. This may not have worked for you at all, but I just thought I'd ask.

garyng
05-12-2003, 04:25 PM
If you plug in the drive before you boot, is there not an icon for it on your desktop? Knoppix always autodetects my drive this way and automatically puts an icon on the desktop which makes access quite easy. This may not have worked for you at all, but I just thought I'd ask.

The icon on the desktop was created based on fstab which was based on /proc/partitions. In this case, not even the proper driver is loaded(usb-storage) so there will not be such an entry in /proc/partitions, thus no entry in fstab and nothing on desktop.

rickenbacherus
05-12-2003, 05:50 PM
Well mount says that
"usb is mounted as /proc/bus/usb" but I don't think it's that?

You can mount any mountable device to any mount point listed in /mnt. Devices don't know or care about the different mount points. They are just names that are easier for users to remember. Proc is just a virtual file system.

To get USB 2.0 speeds you'll need to
#modprobe usb-ehci
But everything should still work @ USB 1.1 speeds at least.


I tried to load the module usb-storage.o but that didn't do anything good for me...

Ilkka

$ lsmod
Module Size Used by Not tainted
sg 25980 0 (autoclean)
autofs4 8724 0 (unused)
af_packet 13448 0
nls_iso8859-1 2844 0
ntfs 50784 0 (unused)
agpgart 34720 0 (unused)
esssolo1 27464 1
gameport 1276 0 [esssolo1]
soundcore 3364 4 [esssolo1]
hp100 15012 1
serial 51844 0
mousedev 3800 1
hid 19172 0 (unused)
usbmouse 1788 0 (unused)
input 3168 0 [mousedev hid usbmouse]
usb-ohci 18088 0 (unused)
usbcore 57088 0 [hid usbmouse usb-ohci]
apm 9612 1
rtc 6876 0
ext3 62688 1
jbd 45300 1 [ext3]

***notice there is no mention of usb-storage***

You must be root to insert a module:
#modprobe usb-storage
#lsmod
# lsmod
Module Size Used by Not tainted
usb-storage 54460 0 (unused)
sg 25980 0 (autoclean)
autofs4 8724 0 (unused)
af_packet 13448 0
nls_iso8859-1 2844 0
ntfs 50784 0 (unused)
agpgart 34720 0 (unused)
esssolo1 27464 1
gameport 1276 0 [esssolo1]
soundcore 3364 4 [esssolo1]
hp100 15012 1
serial 51844 0
mousedev 3800 1
hid 19172 0 (unused)
usbmouse 1788 0 (unused)
input 3168 0 [mousedev hid usbmouse]
usb-ohci 18088 0 (unused)
usbcore 57088 0 [usb-storage hid usbmouse usb-ohci]
apm 9612 1
rtc 6876 0
ext3 62688 1
jbd 45300 1 [ext3]

So now usb-storage is listed. Good-
cat /proc/scsi/scsi

Is your device there? If so try this:

#mount -t auto /dev/sda1 /mnt/?

Since I don't know your mount points I can't say where you should mount it.

#cd /mnt
#ls
#cdrom dvd hda1 hda4 hda5 hda6
#mkdir reader
#ls
#cdrom dvd hda1 hda4 hda5 hda6 reader

So try it like this:
#mount -t auto /dev/sda1 /mnt/reader
#cd /mnt/reader
#ls

Hopefully you see what ever is on your card.

garyng
05-12-2003, 07:06 PM
to find out recognized partitions, do a "cat /proc/partitions", this does not include floppy and cdrom though but usb storage device will have an entry there, if it can be seen by linux.

Ilkka
06-19-2003, 09:36 PM
You must be root to insert a module:
#modprobe usb-storage

So now usb-storage is listed. Good-
cat /proc/scsi/scsi

Is your device there? If so try this:


Yes I did those, but it's not in /proc/scsi/scsi.

It can be seen and accessed by Windows though. It's SDDR-05b.

I think I'll try some other Knoppix...

Ilkka

garyng
06-20-2003, 06:06 PM
I have said multiple times that the USB support on linux is IMO crappy. The problem(in general for CF reader) is that many of these devices implement some 'pseudo' SCSI or ATA interface that the kernel core have problem communicate with(not critical, just some query things) but the kernel core just refuse to work under this situation. However, some patch up is put into the kernel driver which would lookup a list of 'known' bad device and bypass this restriction.

The problem is, CF readers spawn out everyday from some Mainland China manufacturer and they don't dare about 'correct' implementation and so long the device works under Window, they don't care.

This create a problem for linux. If someone buy such a thing and dare to verify that it can be indeed in the 'bad but not a problem' list and kind enough to forward that device id to kernel.org, it would be supported in some later version.

Try to get 2.4.21 which has many of these device id added. However, it would be better to tell the kernel guys to change the driver to make life easier. A user friendlier solution would be asking them to accept addition list through /proc/usb/storage/badlist(just a made up name) and we can just add a bootup script or something like that to update it.

Ilkka
07-05-2003, 02:52 AM
I have said multiple times that the USB support on linux is IMO crappy.

I cannot but to agree..

Here's what I found
http://www.geocrawler.com/archives/3/4563/2002/10/0/10044046/
http://usbat2.sourceforge.net/

Ilkka

fingers99
07-05-2003, 06:47 AM
I have said multiple times that the USB support on linux is IMO crappy.

I'd put it the other way round: support for the USB standard by certain manufacturers is crappy. My Zio card reader works perfectly...... :wink: