Re: [PARPORT] SanDisk ImageMate flash card reader [long]

From: Joshua Jore (moomonk@ns.electricgod.net)
Date: Mon Dec 04 2000 - 12:58:50 EST

  • Next message: Dave Farrance: "Re: [PARPORT] Mysterious PCI Dual Parallel Port Card"

    Actually... You could try the patch at
    http://www.electricgod.net/~moomonk/epat/ and see if that fixes it. It
    updates the epat driver to handle the newer c7 and c8 chips.

    If you do try it, plz let me know what happens. It works for me (on
    another device) but I haven't gotten any validation yet from anyone else.

    Josh

    On Sat, 2 Dec 2000, Matt Roberds wrote:

    > Hello all!
    >
    > I'm trying to get a SanDisk ImageMate flash card reader,
    > parallel port version, working under Linux, and having
    > little luck.
    >
    > I know about the SanDisk USB reader that is supposed to work
    > with Linux, but I got the parallel one for compatibility
    > with an older non-USB W*nd*z* box. It worked just fine with
    > that machine, but I'm having trouble with it on my Linux box.
    >
    > The reader specs (from the label) are:
    > SanDisk ImageMate
    > Part No. SDDR-01
    > Serial No. SD99114505426
    > Made in Taiwan
    > Approvals: VCCI, FCC, CE, (check mark) N532
    > Shuttle Connects
    >
    > That last wording and logo made me hopeful. I opened it up
    > (peel back the end of the sticker closest to the cord to
    > reveal one Philips-head screw) to find a small circuit board,
    > about 7cm x 6cm. There is a 1.5 cm x 2 cm SMT chip labelled
    > SHUTTLE TECHNOLOGY EP1234-01 9927D . The circuit board is
    > labelled WHALE-CFII SCM Microsystems Rev 3.1 AUG 1999 .
    > It has no "eject" button for the flash card; you just pull
    > it out with your fingers.
    >
    > The connection to the computer is via a 36-wire cable.
    > One end of the cable has the reader, and the other end
    > has male and female DB25 connectors, plus a coaxial jack
    > for DC +5V power. In normal operation this is "stolen"
    > with another adapter cable from the keyboard or mouse
    > port. The 8 data bits from the PC are passed to both
    > the reader and the output parallel port - just a simple
    > "Y" cable. The 9 control bits from the PC go directly
    > to the reader, and the 9 control bits for the output
    > port come from the reader on different wires - the
    > reader intercepts these lines.
    >
    > I have been trying to use the paride device drivers, since
    > they mention compatibility with the Shuttle chips used in
    > some parallel->IDE external devices. I have tried both the
    > pd (IDE disk) and pf (ATAPI disk) drivers with no success.
    >
    > The reader has two LEDs, a green "power" one and an orange
    > "activity" one. When used with W*nd*z*, the orange one
    > blinks dimly at about 1 Hz whether a card is installed or
    > not. When a flash card is put in, the orange one lights
    > up brightly for a moment, and a "SanDisk" drive icon appears
    > in Explorer. When you are transferring data to or from the
    > flash card, the orange LED also lights brightly, just like
    > the "activity light" on a standard rotating-media IDE or
    > SCSI hard disk.
    >
    > I can load the paride and epat modules with no problem.
    > When I try to load the pd or pf modules, the epat autoprobe
    > fails. However, the orange "activity" light on the reader
    > flashes during the pd autoprobe. It does not do this with
    > the epia module. I have twiddled the options to epat
    > (force master/slave, differing delays) with no effect.
    >
    > Doing 'strings' on the Windows miniport driver (IMGMATE.MPD)
    > returns a few references to "EPAT", so I believe this
    > is the right protocol.
    >
    > I put in a bit of code to do a hex dump of the 'scratch'
    > buffer used by the epat_test_proto function and can
    > provide dumps if needed. I get some response on modes
    > 2d, 4, and 5:
    >
    > pda: epat: port 0x378, mode 0, ccr 0, test=(255,255,0)
    > pda: epat: port 0x378, mode 1, ccr 0, test=(255,255,0)
    > pda: epat: port 0x378, mode 2, ccr 2d, test=(255,255,464)
    > pda: epat: port 0x378, mode 3, ccr 0, test=(255,255,0)
    > pda: epat: port 0x378, mode 4, ccr 0, test=(255,255,447)
    > pda: epat: port 0x378, mode 5, ccr 0, test=(255,255,506)
    >
    > Looking at the code, it seems to step through the 'scratch'
    > buffer. The even bytes are "expected" to go 0-255 and the
    > odd bytes go 255-0. If a byte in the buffer doesn't match
    > this pattern, this fact is recorded.
    >
    > There is also some code above this that writes 170 xor (0-255)
    > to register 2 and and 85 xor (1-255) to register 3, and then
    > reads register 2. If it doesn't equal the value just written,
    > this fact is also recorded.
    >
    > These two facts are taken together to create the return value
    > of epat_test_proto . I'm not quite sure yet whether this
    > is supposed to be simply 1 or 0 (device found or not) or
    > where there is a list elsewhere mapping return codes to
    > what device was found.
    >
    > I have a feeling that this device is simply using some extension
    > or newer version of the EPAT protocol that the current driver
    > (I have v1.01) doesn't address. I haven't been able to find
    > a DOS SanDisk driver, so I don't think I can do the dosemu
    > debugging thing. I may be able to hack it under Wine, though.
    >
    > I know the reader is working, as I can use in on a laptop
    > with Win98 and another desktop with Win95. The port is
    > working, as my parallel ZIP drive works on it, as well
    > as a printer. (I do not have the lp or ppa modules loaded
    > when trying to make the SanDisk reader work - it's the
    > only thing on the port.) The port is set to EPP mode,
    > and when I use the Zip drive, ppa driver does find it and
    > uses 32-bit EPP mode.
    >
    > I'm running RedHat 6.1, kernel 2.2.12-20. paride is all
    > built as modules. Hardware is a Gateway 2000
    > Intel Aladdin motherboard, which used to have a P5-100,
    > but now has an Evergreen AMD K6-400 upgrade, including
    > the Evergreen-supplied MR BIOS. I'm using the parallel
    > port on the motherboard, not an add-in card. The system
    > has 64MB RAM. Other devices in the system include 10GB
    > and 3GB IDE hard disks, Mitsumi 4x IDE CD-ROM, Adaptec
    > AHA1520 SCSI card with HP 2x SCSI CD-ROM, Colorado floppy-tape
    > drive, Sound Blaster 16 ISA, and ATI Mach64 PCI video.
    > All of these devices have been working fine...the only
    > change I've made is to add the SanDisk reader.
    >
    > Has anyone gotten this device to work under Linux? Am
    > I on the right track with the paride drivers or should
    > I use something else?
    >
    > Any information or pointers would be very much appreciated.
    > Thanks!!
    >
    > Matt Roberds
    > mroberds@worldnet.att.net
    >
    >
    >
    > -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    > -- with the single word "unsubscribe" in the body of the message. --
    >
    >

    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Mon Dec 04 2000 - 13:08:41 EST