Billiger Speicherkartenleser von Aldi geht mit FreeBSD!

From: Oliver Fromme <olli(at)secnetix.de>
Date: Mon, 9 Dec 2002 12:08:28 +0100 (CET)

Moin,

Neulich hatte wir ja so einen Thread über Lese-/Schreib-
geräte, die per USB angeschlossen werden. Aldi-Süd ver-
kauft ab heute so ein Ding, das alle möglichen Typen von
Speicherkarten unterstützt: CompactFlash (Typ I und II),
Microdrive, SDC, MMC, MemoryStick und was es sonst noch
so alles gibt. Siehe auch: http://www.aldi-sued.de

Ich bin heute morgen gleich da gewesen und habe so ein
Teil für 22,99 Euro eingesackt und daheim eingestöpselt.
Ergebnis: Funktioniert mit FreeBSD! Man muß lediglich
den üblichen 6-Byte-Quirk reinpatchen (ich werde dafür
noch einen PR abschicken).

Nach dem Einstecken sagt der Kernel folgendes:

umass0: GENERIC USB Mass Storage Device, rev 1.10/0.12, addr 2, SCSI over Bulk-Only
umass0:2:0:-1: Attached to scbus2 as device 0
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <GENERIC CF 1.00> Removable Direct Access SCSI-0 device
da0: 650KB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present

# camcontrol devlist
<TOSHIBA DVD-ROM SD-C2502 1711> at scbus0 target 1 lun 0 (pass0,cd0)
<GENERIC CF 1.00> at scbus2 target 0 lun 0 (da0,pass1)

Dann habe ich testweise einen 8Mb-CompactFlash reingesteckt.
Die Reihenfolge sollte man einhalten, denn umgekehrt (d.h.
erst CF in das Gerät und dann Gerät an Rechner einstecken)
scheint nicht zu gehen.

# camcontrol rescan 2:0:0
Re-scan of 2:0:0 was successful

# camcontrol inquiry 2:0:0
pass1: <GENERIC CF 1.00> Removable Direct Access SCSI-0 device
pass1: Serial Number ~
pass1: 650KB/s transfers

# camcontrol tur 2:0:0
Unit is ready

# dd if=/dev/da0 of=/dev/null bs=512 count=10
10+0 records in
10+0 records out
5120 bytes transferred in 0.069921 secs (73226 bytes/sec)

# fdisk da0
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=245 heads=2 sectors/track=32 (64 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=245 heads=2 sectors/track=32 (64 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 1,(Primary DOS with 12 bit FAT)
    start 32, size 15584 (7 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 243/ head 1/ sector 32
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

# mount -t msdos -o ro /dev/da0s1 /mnt
# df -k /mnt
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/da0s1 7776 28 7748 0% /mnt
# ls -al /mnt
total 26
drwxr-xr-x 1 root wheel 16384 Jan 1 1980 .
drwxr-xr-x 19 root wheel 512 Dec 9 09:27 ..
drwxr-xr-x 1 root wheel 4096 Jun 29 2000 dcim
drwxr-xr-x 1 root wheel 4096 Jun 29 2000 misc

DISCLAIMER: Ich habe es bisher nur mit oben erwähnter 8Mb-
CompactFlash-Karte (von SanDisk) getestet, und zwar unter
4-stable mit einem UHCI-Controller, und (noch) nicht beson-
ders intensiv. Ich übernehme natürlich keine Gewähr dafür,
daß es bei jemand anderem unter irgendwelchgen Bedingungen
funktioniert. Works for me. :)

Gruß
   Olli

PS: Der Patch für 4.7-Release bzw. 4-stable:

--- src/sys/cam/scsi/scsi_da.c.orig Sat Aug 24 21:03:58 2002
+++ src/sys/cam/scsi/scsi_da.c Mon Dec 9 12:06:26 2002
@@ -373,6 +373,13 @@
                 */
                {T_DIRECT, SIP_MEDIA_REMOVABLE, "Digital", "World DMC","*"},
                /*quirks*/ DA_Q_NO_6_BYTE
+ },
+ {
+ /*
+ * Tevion Card Reader/Writer 6 in 1
+ */
+ {T_DIRECT, SIP_MEDIA_REMOVABLE, "GENERI*", "*","*"},
+ /*quirks*/ DA_Q_NO_6_BYTE
        }
 };
 

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
"All that we see or seem is just a dream within a dream" (E. A. Poe)
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Mon 09 Dec 2002 - 12:08:30 CET

search this site