usb multi card reader doesnt detect newly inserted cards
EDIT
SOLVED.. use HAL (hardware abstraction layer) once the hal daemon is running, it automatically probes USB card readers for newly inserted cards ! Igore pretty much everything in this thread ! ############################################################# Origonal post Follows. I have an Internal Memory Card Reader. Model Trust CR-3300. The card reader has 4 different slots, i use 2 of them. One slot for SD (secure digital) memory cards, one for SM (Smart Media) Memory cards, and 2 more i dont use. When the drivers are modprobed, the kernel reports the addition of 4 scsi devices. /dev/sda /dev/sdb /dev/sdc /dev/sdd But when i insert a memory card, for example SD card into the slot (/dev/sdd) the card is not detected. and cannot to used. "cat /proc/partitons" shows only my hard disks. HOWEVER, if i insert the card BEFORE loading the drivers, then aswell as the 4 scsi controllers being registed, the kernel also makes note of a 512 meg card, and attaches it to /dev/sdd1. "cat /proc/partitons" shows Quote:
This is very annoying, i have to keep loading, and unloading the drivers every time i want to use, or switch over a memory card. EDIT: ive found i can make the kernel probe the device for new cards with the "hdparm -z /dev/sdd" command. It makes the kernel re-load partiton tables. This command also uptades the data shown in /proc/partitons. But this is still very annoying, it means i need to become root, anter root password, an run hdparm EVERY TIME i need ot switch a card. There are only 2 solutions i can think of, both are messy... 1) make hdparm suid root, so i can quickly add cards with a shortcut applet in KDE. (this is very un0-secure to give un-privilaged users access to hdparm) 2) make a boot script that runs loops forever, running hdparm -z /dev/sdd, and hdparm -z /dev/sdb, every 2 seconds. Does anyone have a better idea ??? EDIT2: Ive tested the device in windows, the activity light blinks every half second. in linux he activity light doesnt blink when the device is idle, however it does blink when i run the hdparm command. so it seems windows is useing my hdparm on a loop method. i suppose running 4 disks off a single usb connection means the device hs lost its ability to hot-plug ??? HELP. thanks. EDIT3: The hdparm -z on a loop is a very bad idea. it fills the logs with mesages about re-scanning the partiton table. and when the device is in use, and files are being transfered, the constant poling for new cards degrages performance and genrates "media is busy" errors all over the place. there MUST be a way ? is there maybe a patch to usb storeage that can poll for new cards, but only when there device is idle ??? thanks again, |
In my experience, multi-slot USB card readers do not work unless you plug the card into the reader before you plug the card reader into the USB socket.
So I have to plug in the card, then plug in the reader. Then it works just fine, with an icon added to my desktop (Mandriva 2005LE, 2.6.11-12mdk). As you have probably already discovered, each different card-slot is associated with a different sdx HTH |
My USB card reader is internal, you cannot unplug it.
Anyways, i have fixed it by adding an extra script to run before mount. here is the script for others. Code:
#!/bin/bash and save this script as /bin/mount so when somhing calls /bin/mount my script looks at what you are mounting... if you are mounting a multi slot usb, the script uses hdparm to re-scan the partiton table. this causes the kernel to SEE cards that were inserted after bootup, or after the device was plugged in. for my full guide of how to get it working, see http://www.astahost.com/index.php?sh...=0&#entry50147 ENJOY ! |
Interesting work-around. Thanks.
|
I wrote a much better, much more simplistiv, much less complicated script...
here it is. Code:
#!/bin/bash ENJOY ! |
SOLVED..
use HAL (hardware abstraction layer) once the hal daemon is running, it automatically probes USB card readers for newly inserted cards ! Igore pretty much everything in this thread ! |
All times are GMT -5. The time now is 08:55 AM. |