LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Need a little help getting USB flash card reader to work (https://www.linuxquestions.org/questions/linux-hardware-18/need-a-little-help-getting-usb-flash-card-reader-to-work-101881/)

Electrode 10-08-2003 09:55 PM

Need a little help getting USB flash card reader to work
 
Earlier today, I bought a "7 in 1" USB 2.0 flash media reader, which has slots for memory stick, compact flash, sd/mmc and smart memory cards. I plugged it in to my laptop and loaded the usb-storage driver, and it assigned it to /dev/sd{a,b,c,d}. I figured that this was a sure indication that all would go well.

However, when I try to mount my camera's compact flash card with it, I run into problems.

First, I don't know which of the 4 devices is the CF slot. Second, none of them seem to work in any way. If I try mounting them or catting them to a file, I either get Input/output errors, "no media present", or the thing just hangs.

I see this in dmesg:

Code:

scsi2 : SCSI emulation for USB Mass Storage devices
  Vendor: SMSC      Model: USB 2 HS-CF      Rev: 1.97
  Type:  Direct-Access                      ANSI SCSI revision: 02
  Vendor: SMSC      Model: USB 2 HS-CF      Rev: 1.97
  Type:  Direct-Access                      ANSI SCSI revision: 02
  Vendor: SMSC      Model: USB 2 HS-CF      Rev: 1.97
  Type:  Direct-Access                      ANSI SCSI revision: 02
  Vendor: SMSC      Model: USB 2 HS-CF      Rev: 1.97
  Type:  Direct-Access                      ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0
Attached scsi removable disk sdb at scsi2, channel 0, id 0, lun 1
Attached scsi removable disk sdc at scsi2, channel 0, id 0, lun 2
Attached scsi removable disk sdd at scsi2, channel 0, id 0, lun 3
sda: Unit Not Ready, sense:
Current 00:00: sns = 70  2
ASC=3a ASCQ= 0
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Current sd00:00: sns = 70  2
ASC=3a ASCQ= 0
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sda : block size assumed to be 512 bytes, disk size 1GB. 
 sda: I/O error: dev 08:00, sector 0
 I/O error: dev 08:00, sector 0
 unable to read partition table
sdb: Unit Not Ready, sense:
Current 00:00: sns = 70  2
ASC=3a ASCQ= 0
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sdb : READ CAPACITY failed.
sdb : status = 1, message = 00, host = 0, driver = 08
Current sd00:00: sns = 70  2
ASC=3a ASCQ= 0
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sdb : block size assumed to be 512 bytes, disk size 1GB. 
 sdb: I/O error: dev 08:10, sector 0
 I/O error: dev 08:10, sector 0
 unable to read partition table
sdc: Unit Not Ready, sense:
Current 00:00: sns = 70  2
ASC=3a ASCQ= 0
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sdc : READ CAPACITY failed.
sdc : status = 1, message = 00, host = 0, driver = 08
Current sd00:00: sns = 70  2
ASC=3a ASCQ= 0
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sdc : block size assumed to be 512 bytes, disk size 1GB. 
 sdc: I/O error: dev 08:20, sector 0
 I/O error: dev 08:20, sector 0
 unable to read partition table
sdd: Unit Not Ready, sense:
Current 00:00: sns = 70  2
ASC=3a ASCQ= 0
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sdd : READ CAPACITY failed.
sdd : status = 1, message = 00, host = 0, driver = 08
Current sd00:00: sns = 70  2
ASC=3a ASCQ= 0
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sdd : block size assumed to be 512 bytes, disk size 1GB. 
 sdd: I/O error: dev 08:30, sector 0
 I/O error: dev 08:30, sector 0
 unable to read partition table
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 3

And this in /proc/bus/usb/devices:

Code:

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0424 ProdID=20fc Rev= 1.97
S:  Manufacturer=SMSC
S:  Product=USB 2 Flash Media Device
S:  SerialNumber=03090810030F
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 96mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

So, what do I do now?

If it matters, I'm running Slackware 9.0 with kernel 2.4.23-pre6. The usb-storage module has everything enabled except verbose mode.

faheyd 10-09-2003 02:31 AM

Boot with no reader plugged in. It helps to start with a known state.
After boot, plug in reader with no mem disks installed. (prior to, you can bring up a console and do a 'tail -f /var/log/messages' to see what's happening when you plug in the reader.)
Look at lsusb, dmesg, etc, and jot down the device ID for the reader. Go over to http://www.qbik.ch/usb/devices/ and pump in the first part of the ID in the search bar and see if anything pops up and read those instructions associated with the device. If that doesn't work, try putting the 'manufacturer' name in the search bar and see what happens.
That's to see if the card reader device is supported. The above site is not all inclusive, and a bit outdated sometimes but it's worth a shot.
Do the same with camera name. In fact, post the name of the camera and let's see if someone else has got it working.
Sometimes it's the format on the CF stick that stops everything.
Do the same for the stick, watch the 'messages' output to see what happens. post that also. Thanks, Dylan sends

Electrode 10-10-2003 12:46 AM

I have already tried all that you mentioned, to no avail.

As for the camera, it's an "HP PhotoSmart C200", a rebadge of one of Konica's cameras.

Also, I tried the reader on a windoze box and got the exact same results. I've found that it "freezes up" when trying to access the first device (sda) only when the CF card is present, accessing any other device, or sda when the card is not present results in "media not present" errors.

I've pretty much ruled it down to either a defective reader, or a data format on the card so perverse that it causes the reader to fail. I've RMA'd the reader, if the replacement doesn't work then I'll know it's the camera's fault.

Electrode 10-20-2003 10:44 AM

up

I recieved my replacement reader today, and I'm still getting the same problems.

faheyd 10-20-2003 11:49 AM

Please post output from 'lsusb -v' .
Motherboard make/model/bios version/chipset.
Thanks!

Electrode 10-20-2003 12:29 PM

Can't give specifics on the motherboard, but the system is a Dell Latitude CPx J650GT laptop. The chipset appears to be the Intel 440BX. Output of lsusb -v:

Code:

Bus 004 Device 001: ID 0000:0000 Virtual Hub
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              1.00
  bDeviceClass            9 Hub
  bDeviceSubClass        0
  bDeviceProtocol        0
  bMaxPacketSize0        8
  idVendor          0x0000 Virtual
  idProduct          0x0000 Hub
  bcdDevice            0.00
  iManufacturer          0
  iProduct                2 USB UHCI Root Hub
  iSerial                1 dce0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          25
    bNumInterfaces          1
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        0
      bAlternateSetting      0
      bNumEndpoints          1
      bInterfaceClass        9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type              none
        wMaxPacketSize          8
        bInterval            255
  Language IDs: (length=4)
    0000 (null)((null))

Bus 003 Device 001: ID 0000:0000 Virtual Hub
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              1.10
  bDeviceClass            9 Hub
  bDeviceSubClass        0
  bDeviceProtocol        0
  bMaxPacketSize0        8
  idVendor          0x0000 Virtual
  idProduct          0x0000 Hub
  bcdDevice            0.00
  iManufacturer          0
  iProduct                2 USB OHCI Root Hub
  iSerial                1 e08d9000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          25
    bNumInterfaces          1
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        0
      bAlternateSetting      0
      bNumEndpoints          1
      bInterfaceClass        9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type              none
        wMaxPacketSize          2
        bInterval            255
  Language IDs: (length=4)
    0000 (null)((null))

Bus 002 Device 001: ID 0000:0000 Virtual Hub
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              1.10
  bDeviceClass            9 Hub
  bDeviceSubClass        0
  bDeviceProtocol        0
  bMaxPacketSize0        8
  idVendor          0x0000 Virtual
  idProduct          0x0000 Hub
  bcdDevice            0.00
  iManufacturer          0
  iProduct                2 USB OHCI Root Hub
  iSerial                1 e08d7000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          25
    bNumInterfaces          1
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        0
      bAlternateSetting      0
      bNumEndpoints          1
      bInterfaceClass        9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type              none
        wMaxPacketSize          2
        bInterval            255
  Language IDs: (length=4)
    0000 (null)((null))

Bus 001 Device 001: ID 0000:0000 Virtual Hub
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              2.00
  bDeviceClass            9 Hub
  bDeviceSubClass        0
  bDeviceProtocol        1
  bMaxPacketSize0        8
  idVendor          0x0000 Virtual
  idProduct          0x0000 Hub
  bcdDevice            2.04
  iManufacturer          3 Linux 2.4.23-pre6 ehci_hcd
  iProduct                2 PCI device 1033:00e0
  iSerial                1 05:00.2
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          25
    bNumInterfaces          1
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        0
      bAlternateSetting      0
      bNumEndpoints          1
      bInterfaceClass        9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type              none
        wMaxPacketSize          2
        bInterval              12
  Language IDs: (length=4)
    0000 (null)((null))

Bus 001 Device 005: ID 0424:20fc Standard Microsystems Corp.
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              2.00
  bDeviceClass            0 Interface
  bDeviceSubClass        0
  bDeviceProtocol        0
  bMaxPacketSize0        64
  idVendor          0x0424 Standard Microsystems Corp.
  idProduct          0x20fc
  bcdDevice            1.97
  iManufacturer          1 SMSC
  iProduct                2 USB 2 Flash Media Device
  iSerial                3 0309081004E4
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          39
    bNumInterfaces          1
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0xc0
      Self Powered
    MaxPower              96mA
    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    0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              none
        wMaxPacketSize        512
        bInterval              1
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              none
        wMaxPacketSize        512
        bInterval              0
  unknown descriptor type: 07 21 07 e8 03 fe ff
  Language IDs: (length=4)
    0409 English(US)


faheyd 10-20-2003 12:38 PM

Well, your card reader is definately supported:
http://www.qbik.ch/usb/devices/showdev.php?id=2103
But I didn't see the memory card?
Again, and sorry for all this work, but post the make/model/id of the memory card and the camera?
I'm assuming that the camera doesn't have an USB connection itself?

Hmm, linux seems to run fine on your laptop.
http://www.studenter.hb.se/~arch/laptop.htm

Electrode 10-20-2003 01:28 PM

The camera is a Hewlett-Packard PhotoSmart C200, which I belive is a rebadge of a Konica camera. The CF card is a Pretec ACT008-P.

One thing that may be of importance is that, on the card reader page you linked to, it mentioned that multiple SCSI LUN support needs to be enabled in the kernel, and after reviewing my .config, I've found that it's not enabled. I will build a new kernel with that feature enabled and tell you how it goes.

faheyd 10-20-2003 02:04 PM

What bothers me is that you said that the reader/memchip does not play well in both linux and windows boxes, "Also, I tried the reader on a windoze box". That leads me to suspect a 'usb' hardware problem, the cable from the usb reader to the motherboard, or the mem card is bad.
1. Is there a cable from the reader to the laptop and did that get replaced when you returned the reader?
2. Do you have another cable laying around from some other device, or can you plug the reader directly into the laptop?

I had a bad cable once.

Thanks,
Dylan sends

Electrode 10-20-2003 02:15 PM

Technically, the "windoze box" I referred to was VMWare 4.0 running on the same laptop, so problems related to kernel configuration might have affected that VM as well. Also, I have tried different cables.

Electrode 10-20-2003 02:36 PM

After building a new kernel with multiple LUN support, the reader still doesn't work.

faheyd 10-20-2003 03:53 PM

You're going to have to find another box to plug that reader/memchip into, to see if the problem follows the device.

Electrode 10-20-2003 04:00 PM

The only other machine I have available to me right now is my file server (p3 866, asus cusl2 mobo, i810 chipset, slack 9.1) and that has the same problems.

faheyd 10-20-2003 04:04 PM

If you are saying that the problem follows the device to another box, I would say that the memory card itself is not supported or 'bad'. Probably bad, as the windoz did not like it either. I think your reader is fine, since you already replaced it. I'm just trying to apply some logic to this one, since you seem to have already done all the footwork.

If anyone else wants to step in with help, feel free.


All times are GMT -5. The time now is 08:36 AM.