VOICE Home Page: http://www.os2voice.org |
March 2003
[Newsletter Index]
|
By Mark Dodel© March 2003 |
I've been promising to write an article on USB CompactFlash readers for some time now. I've started writing several times and always gave up. It wasn't writer's block; it was that I couldn't get a handle on how this USB Mass Storage device stuff works (or in my case usually didn't work). My first attempt to use a USB Compact Flash was prompted by my success with adding a External PCMCIA Travelstar hard drive to my Toshiba Satellite laptop. That forced me to stop using my PCMCIA CompactFlash adapter to read my digital camera's pictures because between the hard drive and my wireless network card taking up the two PCMCIA slots, I had no place to put it anymore. True, I could remove one or the other temporarily, but I wanted a better solution.
After years of wondering why anyone would need to use a USB device, I finally thought this might be a reason to buy one as my laptop had a USB port. Finally a reason to install the USB basic and the USB Mass Storage driver available with eComStation and IBM's Software Choice. There are also free versions of these available on Hobbes. A really good resource for information about USB under OS/2 is the OS/2 World USB site. They list available drivers, links to USB related articles, tips, as well as some reports of devices that work under OS/2 and what driver versions were successful.
My Toshiba Satellite 2545XCDT Laptop is getting a bit old now, and also doesn't have an Intel chipset. The original OS/2 USB drivers did not support the OHCI USB chipset that was in this laptop, only UHCI, but later versions added this capability so I decided to give it a try. The most recent version, USB 2.0, is called EHCI. For more on USB see the USB FAQ.
I couldn't find much about USB CompactFlash readers and OS/2 other then that if the device was "USB Mass Storage Device" compliant it should work with the IBM OS/2 USBMSD driver. I checked my local Staples office supply store to see what they carried in the way of USB devices. I initially only found a Sandisk ImageMate SDDR-75 USB dual card reader for about $30US. It could read both CompactFlash and SmartMedia cards.
According to the SanDisk
web site this product is " Mass Storage Class (MSC) compliant" so
I made the assumption it should work under OS/2. The reader looked like an oversized
mouse, with two slots in the front and a short USB cord on the back. When I plugged
it into my USB port the red power light came on. And with plugging in a CF card
the Slot2 green LED lit up. Using an older USBMSD driver I had a drive letter assigned
to the reader which actually amazed me. I had to run "Refresh Removable Media"
object located in the "Drives folder" first though (This is the same as
typing LVM /RediscoverPRM
I then tried it on my Dual Pentium Pro workstation which has an old Intel chipset, so it uses the UHCI USB driver. With that setup the reader wouldn't get a drive letter assigned to it at all. I tried different versions of the the relevant drivers, but no success. I downloaded Chris Wohlgemuth's USB MSD driver from hobbes which I heard worked better then IBM's but still no luck.
I downloaded the USB Resource Manager from the Netlabs site. This is a great utility for showing what USB devices are attached to your system and some details about what they report to the system. It will show all USB devices, not just storage devices.
Right click on a device and select View device report to see information that the device reports to your system.
So I knew the Sandisk reader was being seen by eComStation. I went on Usenet and asked if anyone could tell me what was going on. One of the more informative posts was by the USBGuy, Markus Montkowski, who is also the author of the USB Resource Manager. He told me that these multi-reader devices used the LUN concept (Logical Unit Number), which is from the SCSI world, and allows a single physical device to have more then one device ID assigned to it. According to Markus, the OS/2 USB drivers did not support this ability. The fact that I was able to recognize the CompactFlash reader in my Sandisk multi-reader was just a matter of luck, as that must be the initial device. Possibly this capability will be added to the OS/2 USB driver, but for now, this Sandisk multi-reader didn't seem to be of much use under OS/2-eComStation. It would be of no value to anyone who needed to read SmartMedia.
So I turned to Usenet to see what if anything others had found did work well with OS/2. This time I was specifically looking for a CompactFlash only reader. A couple of folks had success with a PNY USB CompactFlash reader. So I went back to my local Staples store and found they had one for of these PNY CompactFlash readers for about $20US as well as a similar USB SmartMedia reader as well. The PNY included a 1 meter long USB cable.
I tried this first on my Toshiba Satellite with the OHCI driver and could not get a drive letter assigned. USB Resource Manager showed the device was there, but no matter what driver I tried to use, it wouldn't work. Next I tried it in my Dual Pentium Pro workstation and it was recognized right away after running LVM /RediscoverPRM, I was able to read CompactFlash cards as well as delete and modify and write new files. Unfortunately I really needed this on my laptop, so that when I was traveling I could transfer photos from my Nikon CoolPix 950 camera. I had bought this camera a couple years ago specifically because it had a serial transfer capability, but that is painfully slow compared to directly reading files off of a CompactFlash card.
Well finally with the purchase of a new laptop, my problems seem to be solved. My Medion MD7275 has two USB 1.1 UHCI ports. The PNY USB CompactFlash reader works well with the latest USB UHCI driver and USB Mass Storage driver available from the eComStation website.
Having tried this CF reader in windozeXP, one nice feature noted was that the
card was recognized and assigned a drive letter as soon as it was plugged in. Well
guess what? That feature is available for OS/2 with just a tiny bit of work. On
hobbes is a small utility called USBMOUNTD.
I downloaded this, unzipped it to a directory, created a program object (with a
-s parameter and set to start minimized) and put that in my Startup
Folder. Now whenever I boot into OS/2, this utility checks to see if a USB removable
disk is connected, and if so it refreshes LVM so a drive letter is assigned to it.
As it is running as a daemon, it will refresh LVM whenever a USB storage device
is inserted, so it doesn't have to be inserted on boot. Now I can insert, remove
(after ejecting the drive), and re-insert a new card, without rebooting. This utility
requires the USB Resource Manager (mentioned above) installed and the DEVICE=F:\Utils\USBResMgr\usbresmg.sys
Some things to keep in mind when dealing with USB Mass Storage devices.
DEVICE=USBUHCD.SYS
/FLOPPIES:0
BASEDEV=USBMSD.ADD
eject X:
EHCI - Enhanced Host Controller Interface. A unified format for USB 2.0, also called Hi-Speed USB. USB 2.0 supports target speeds of 480 Mb/sec, 12 Mb/sec, and 1.5 Mb/sec.
OHCI - Open Host Controller Interface. USB 1.x format used by chipsets other then Intel and VIA (such as Opti, Ali, Sis, and others)
UHCI - Universal Host Controller Interface. USB 1.x format used by Intel and VIA chipsets.
References:
|
[Feature Index]
editor@os2voice.org
[Previous Page] [Newsletter Index] [Next Page]
VOICE Home Page: http://www.os2voice.org