Results 1 to 10 of 11
I have a usb sd card reader (A sandisk microcuzer). It used to work with older linux version, but doesn't run on my fedora 17 anymore. I am a developer ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-08-2013 #1Just Joined!
- Join Date
- Jan 2013
- Posts
- 5
usb sd card reader driver - where to start?
I have a usb sd card reader (A sandisk microcuzer). It used to work with older linux version, but doesn't run on my fedora 17 anymore. I am a developer and I know some C language.
The point is I don't know where to start!
I have the log messages from /var/log/messages that appear when I plug in the reader on a usb port.
But where is the usb driver code for it? What part of the kernel do I need to look at?
Can someone guide me?
- 01-08-2013 #2Just Joined!
- Join Date
- Dec 2012
- Location
- Utah
- Posts
- 25
Plug your device in and post the output of
andCode:sudo fdisk -l
and alsoCode:mount -l
These will tell you all connected devices, default mount settings, and where they are mounted (if at all).Code:cat /etc/fstab
/etc/fstab contains mount settings for each drive.
Another site suggests repartitioning or formatting the device.
I don't know if this applies to Fedora, but the package/program
may solve this by mounting it automatically. But I wouldn't know how you would install it of Fedora.Code:usb-mount
- 01-08-2013 #3Linux Newbie
- Join Date
- Jun 2004
- Location
- Halesowen, West Midlands, UK
- Posts
- 100
dmesg should tell you.
I just took this one out of my pocket and plugged it in.
[99664.426798] usb 9-4: new high-speed USB device number 2 using ehci-pci
[99664.542128] usb 9-4: New USB device found, idVendor=0781, idProduct=5406
[99664.542131] usb 9-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[99664.542133] usb 9-4: Product: U3 Cruzer Micro
[99664.542134] usb 9-4: Manufacturer: SanDisk Corporation
[99664.542136] usb 9-4: SerialNumber: 0000161CB2723653
[99664.542515] scsi7 : usb-storage 9-4:1.0
[99665.542309] scsi 7:0:0:0: Direct-Access SanDisk U3 Cruzer Micro 3.27 PQ: 0 ANSI: 2
[99665.542761] scsi 7:0:0:1: CD-ROM SanDisk U3 Cruzer Micro 3.27 PQ: 0 ANSI: 2
[99665.546047] sd 7:0:0:0: [sdc] 8015502 512-byte logical blocks: (4.10 GB/3.82 GiB)
[99665.546563] sr1: scsi3-mmc drive: 8x/40x writer xa/form2 cdda tray
[99665.546669] sr 7:0:0:1: Attached scsi CD-ROM sr1
[99665.547041] sd 7:0:0:0: [sdc] Write Protect is off
[99665.547044] sd 7:0:0:0: [sdc] Mode Sense: 03 00 00 00
[99665.547912] sd 7:0:0:0: [sdc] No Caching mode page present
[99665.547915] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[99665.551032] sd 7:0:0:0: [sdc] No Caching mode page present
[99665.551035] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[99665.553675] sdc: sdc1
[99665.555645] sd 7:0:0:0: [sdc] No Caching mode page present
[99665.555648] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[99665.555650] sd 7:0:0:0: [sdc] Attached SCSI removable disk
from lsusb
=========
Bus 009 Device 002: ID 0781:5406 SanDisk Corp. Cruzer Micro U3
If it's not automounted you can manually mount it.
It's handled by the usbstorage module.
- 01-09-2013 #4Just Joined!
- Join Date
- Jan 2013
- Location
- Russia, Nizhny Archyz
- Posts
- 14
run
and plug in your cardreader.Code:udevadm monitor
If udev understand it, plug to it sd card and watch udev messages.
However if your cardreader is really too old there maybe no needed kernel module in your kernel.
Look for output of lsusb, find there your cardreader, then run
where _Bus_ and _Device_ are corresponding numbers from lsusb output.Code:lsusb -vv -s _Bus_:_Device_
Then try to google appropriate kernel module to your idVendor/idProduct. As it worked early, It should be and in new kernel. If so — compile and install that module.
If you have this module, but cardreader doesn't work, maybe you don't have appropriate udev rule?
For example to mount external devices I use next udev rule:
Code:KERNEL=="sd[b-z]", GOTO="do-disk-rules" KERNEL!="sd[b-z][0-9]", GOTO="end-of-file" LABEL="do-disk-rules" ACTION=="add", ENV{ID_USB_DRIVER}="usb-storage", GROUP="storage" IMPORT{program}="/sbin/blkid -o udev -p %N" ACTION=="remove", ENV{ID_FS_TYPE}!="", RUN+="/bin/sed -i '/\/dev\/%k /d' /etc/fstab" ACTION=="remove", ENV{ID_FS_TYPE}!="", RUN+="/bin/rmdir /media/$env{ID_FS_TYPE}-%k" ACTION=="add", ENV{ID_FS_TYPE}!="", RUN+="/bin/mkdir -p /media/$env{ID_FS_TYPE}-%k" # Mount fat32 ACTION=="add", ENV{ID_FS_TYPE}=="vfat", RUN+="/bin/sed -i '$a\/dev/%k /media/$env{ID_FS_TYPE}-%k vfat rw,noatime,noauto,noatime,dmask=022,user,fmask=133,iocharset=koi8-r 0 0' /etc/fstab" # Mount ntfs ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/sed -i '$a\/dev/%k /media/$env{ID_FS_TYPE}-%k ntfs-3g rw,noatime,noauto,dmask=000,fmask=111,user,locale=ru_RU.koi8-r,allow_other 0 0' /etc/fstab" # other FSs ACTION=="add", ENV{ID_FS_TYPE}!="", ENV{ID_FS_TYPE}!="ntfs|vfat", RUN+="/bin/sed -i '$a\/dev/%k /media/$env{ID_FS_TYPE}-%k $env{ID_FS_TYPE} defaults,noatime,user 0 0' /etc/fstab" LABEL="end-of-file"
- 01-09-2013 #5Just Joined!
- Join Date
- Jan 2013
- Posts
- 5
Hi Eddy_Em and All,
udevadm monitor sound interesting. I will try that.
I filled a bugzilla long time ago bugzilla.redhat.com/show_bug.cgi?id=781977
Here are my entries from dmesg
[ 1949.404650] usb 2-1.4: device descriptor read/64, error -32
[ 1949.578398] usb 2-1.4: device descriptor read/64, error -32
[ 1949.752318] usb 2-1.4: reset full-speed USB device number 5 using ehci_hcd
[ 1950.154057] usb 2-1.4: device not accepting address 5, error -32
[ 1950.227217] usb 2-1.4: reset full-speed USB device number 5 using ehci_hcd
[ 1950.628810] usb 2-1.4: device not accepting address 5, error -32
[ 1950.629139] sd 7:0:0:0: Device offlined - not ready after error recovery
[ 1950.629150] sd 7:0:0:0: [sdb] Unhandled error code
[ 1950.629153] sd 7:0:0:0: [sdb]
[ 1950.629155] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK
[ 1950.629157] sd 7:0:0:0: [sdb] CDB:
[ 1950.629158] Read(10): 28 00 00 00 00 00 00 00 01 00
[ 1950.629168] end_request: I/O error, dev sdb, sector 0
[ 1950.629172] Buffer I/O error on device sdb, logical block 0
[ 1950.629205] sd 7:0:0:0: rejecting I/O to offline device
[ 1950.629223] sd 7:0:0:0: rejecting I/O to offline device
[ 1950.629246] usb 2-1.4: USB disconnect, device number 5
[ 1950.629334] Dev sdb: unable to read RDB block 0
[ 1950.629349] sdb: unable to read partition table
[ 1950.629598] sdb: detected capacity change from 512 to 0
[ 1950.702974] usb 2-1.4: new full-speed USB device number 6 using ehci_hcd
[ 1950.776781] usb 2-1.4: device descriptor read/64, error -32
[ 1950.950703] usb 2-1.4: device descriptor read/64, error -32
[ 1951.124602] usb 2-1.4: new full-speed USB device number 7 using ehci_hcd
[ 1951.197538] usb 2-1.4: device descriptor read/64, error -32
[ 1951.371590] usb 2-1.4: device descriptor read/64, error -32
[ 1951.545383] usb 2-1.4: new full-speed USB device number 8 using ehci_hcd
[ 1951.947068] usb 2-1.4: device not accepting address 8, error -32
[ 1952.020125] usb 2-1.4: new full-speed USB device number 9 using ehci_hcd
[ 1952.421892] usb 2-1.4: device not accepting address 9, error -32
[ 1952.422064] hub 2-1:1.0: unable to enumerate USB device on port 4
- 01-09-2013 #6Linux Newbie
- Join Date
- Dec 2011
- Posts
- 121
Does this reader mount correctly on another PC? Perhaps it's been infected with bogons

I have a USB card reader that doesn't like my USB hub. I have no idea why. When I plug it straight into my PC it works fine.
- 01-09-2013 #7Just Joined!
- Join Date
- Jan 2013
- Location
- Russia, Nizhny Archyz
- Posts
- 14
Maybe there's not enough power? Try active USB hub.I have a USB card reader that doesn't like my USB hub
Maybe in your case the problem is in insufficient power too?Code:[ 1950.629158] Read(10): 28 00 00 00 00 00 00 00 01 00 [ 1950.629168] end_request: I/O error, dev sdb, sector 0
- 01-09-2013 #8
- 01-16-2013 #9Just Joined!
- Join Date
- Jan 2013
- Posts
- 5
I have tried the sd card reader on a windows xp machine. It can regonize it, but is
unable to show any data from the sd card.
One thing that could be that my SD Card is to big.
The card is 4GB. The readed is probably unable to read such it. Time to through it away, or better recycle it.
- 01-16-2013 #10Just Joined!
- Join Date
- Jan 2013
- Location
- Russia, Nizhny Archyz
- Posts
- 14
Let me guess: your SD-card is SDHC, but cardreader recognize only slow-SD?


Reply With Quote

