[nSLUG] Card Reader

Rich budman85 at eastlink.ca
Sat Feb 9 16:00:40 AST 2008



Jeff Warnica wrote:
>>
>> mount -t vfat /dev/uba /media/sd
>
> ...
>
>> lsusb
>> Bus 002 Device 006: ID 090c:6000 Feiya Technology Corp.
>>
>> dmesg
>> usb 2-1: USB disconnect, address 5
>> usb 2-1: new full speed USB device using uhci_hcd and address 6
>> usb 2-1: configuration #1 chosen from 1 choice
>>  uba: uba1
>> usbcore: deregistering interface driver usb-storage
>
>
> You seem to be tying to mount the device (uab), not the first 
> partition on it (uab1). Im confident that
>
> mount -t vfat /dev/uba1 /media/sd
>
> would work.
>

Sorry, I forgot to mention that I tried that originally and found no 
device defined.
So I'm thinking its a udev thing right now.

I downloaded the latest kernel, 2.6.24.1 and installed that.

Important Note: This option MUST be enabled in SCSI section "Probe All LUNS"

I picked this tip up on one of the sites mentioning card readers, or any 
USB devices.
System Freeze will occur when a card reader or other device grabbed ubaX.
What occurs when a 2nd or 3rd USB device is added, it starts at uba and 
works downward.
Result - system freeze - even Alt-Sysrq could not break out.

Once I recompiled the kernel with the probe luns option,
device assignment works correctly now.  The first card reader has 4 
slots, so it now uses uba thru ubd.

Bus 002 Device 003: ID 090c:6000 Feiya Technology Corp.
Bus 002 Device 001: ID 0000:0000 
Bus 001 Device 002: ID 058f:6362 Alcor Micro Corp.
Bus 001 Device 001: ID 0000:0000 

/dev
root # ls -al ub*
brw-rw---- 1 root video 180,  0 2008-02-09 15:21 "uba"
brw-rw---- 1 root video 180,  8 2008-02-09 15:21 "ubb"
brw-rw---- 1 root video 180, 16 2008-02-09 15:21 "ubc"
brw-rw---- 1 root video 180, 24 2008-02-09 15:21 "ubd"
brw-r----- 1 root disk  180, 32 2008-02-09 15:23 "ube"

The new card reader (it looks like a mini-iPod with a card slot) now 
assigns to ube

I tried a normal 1GB SD card (leaving out SDHC for the moment)

mount -t vfat /dev/ude1 /media/sddisk/
mount: special device /dev/ude1 does not exist

FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev ube.

Now I plug into old card reader:

dmesg>   uba: uba1

brw-rw---- 1 root video 180,  1 2008-02-09 15:55 "/dev/uba1"

mount -t vfat /dev/uba1 /media/sd
ls -al /media/sd
total 52
drwxr-xr-x  3 root root 16384 1969-12-31 20:00 "."/
drwxr-xr-x 22 root root  4096 2008-02-06 02:49 ".."/
drwxr-xr-x  3 root root 16384 2008-02-08 23:04 "dcim"/

Plug in SDHC in to old reader, uba1 disappears


Sounds like it may not be detected by udev or kernel.



Here is the usb specs from each card mounted separately as uba devices.


The differences

Feiya:
 bcdDevice            1.00
 MaxPower              500mA
 bEndpointAddress     0x81  EP 1 IN
 bInterval             255
 bEndpointAddress     0x02  EP 2 OUT
 bInterval             255


Alcor:
bcdDevice            1.29
MaxPower              250mA
bEndpointAddress     0x82  EP 2 IN
bInterval               0
bEndpointAddress     0x82  EP 2 IN
bInterval             0



lsusb -s 002:003 -v

Bus 002 Device 003: ID 090c:6000 Feiya Technology Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x090c Feiya Technology Corp.
  idProduct          0x6000
  bcdDevice            1.00
  iManufacturer           1 Generic       ,   .
  iProduct                2 USB2.0 Card Reader 
  iSerial                 3 12345678901234567890
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval             255
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval             255
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


====================================
Works like a charm - except doesn't support SDHC cards :(
====================================

 lsusb -s 001:002 -v

Bus 001 Device 002: ID 058f:6362 Alcor Micro Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x058f Alcor Micro Corp.
  idProduct          0x6362
  bcdDevice            1.29
  iManufacturer           1 Generic
  iProduct                2 Mass Storage Device
  iSerial                 3 058F312D81B
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              250mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)





More information about the nSLUG mailing list