SanDisk ConnectPlus Wi-Fi 128 MB on OpenZaurus

2007-12-29This guide is now officially no longer maintained. I leave it online in case it should still find it useful.
2006-06-01Today I received an e-mail from Dr. Sharukh K. R. Pavri detailing his steps to get the card to work with OpenZaurus v. 3.5.4.
2006-04-17I've received reports that this procedure doesn't work with OpenZaurus v. 3.5.4. If you can confirm or deny this, and/or if you are aware of another, working way to get the ConnectPlus to work, please get in touch (acb at bentzon dot net). Thank you.
2005-05-06Updated to include info on OZ 3.5.2. Corrected a few minor mistakes (wrong path to /etc/pcmcia/hostap_cs.conf; missing last command in in-line script). Added this summary.
2005-03-29Added hostap-utils to the files section.
2005-03-28Corrected a few minor mistakes.
2005-03-26Finished this guide.

IMPORTANT (2006-04-17): OpenZaurus v. 3.5.4 has recently been released. I've received reports that the below procedure no longer works with this new version. If you can confirm or deny this, and/or if you are aware of another, working way to get the ConnectPlus to work, please get in touch (acb at bentzon dot net). Thank you. ADDED (2006-06-01) A confirmed procedure to get the card to work with OZ v. 3.5.4 is provided by Dr. Pavri here. Sometime in the near future, I hope to be able to go through these steps myself and incorporate them into the main how-to. It's getting a little outdated, anyway! :-)

(2005-05-06): OpenZaurus v. 3.5.3 has recently been released. To use your SanDisk card with this version, ignore the steps listed below to compile or download new drivers. Simply install hostap-utils, copy the firmware and script, and edit the network script, and you're good to go!

The SDWCFB-128-768 is a compact flash wireless network card with built-in 128 MB of storage. This specific card uses the Prism3 chipset, and before it can be used a special initialization sequence is needed. It is supported by HostAP v. 0.3.2 and later.

This describes my steps to get the networking part of the card working with my Sharp Zaurus SL-5500 PDA. I never succeeded at being able to use both networking and storage at the same time. The information has been gathered from a forum especially set up to discuss the development of a Linux driver for this device. Since this resource is very technical, it may not be easy for an outsider to acquire specific installation instructions; I know it wasn't for me. It is my hope that by reading this guide, others may be able to save some time in getting the ConnectPlus card to work. It assumes some basic knowledge of Linux, the Zaurus, and OpenZaurus.

For good measure: This information is provided without any kind of warranty. I don't guarantee it will work, and it may break your device(s)

I'm running the OpenZaurus distribution on my Zaurus. This is an open-source version of the preinstalled Sharp Zaurus system. The first problem that arises is that the current version of OZ as of the time of writing (March 27, 2005), v. 3.5.2, doesn't include the recent version of the HostAP driver needed to support the card. However, it is scheduled to be included in the next release and as such already implemented in the sources available online. Thus, I was forced to cross-compile the driver myself for the ARM platform. I followed the instructions at the OpenZaurus/OpenEmbedded GettingStarted and ZaurusKernels Wikis and actually compiled a complete image for Opie ("bitbake opie-image"). If you don't want to upgrade everything, it would probably work just to compile the HostAP package ("bitbake hostap-modules"). I can't vouch for that though. Finally, if you don't want to compile at all, you can download the images.

After flashing the Z with the newly generated initrd.bin and zImage (they can be found in the build/tmp/deploy/images directory after running bitbake), the card will be recognized upon insertion. Look in /etc/pcmcia/hostap_cs.conf for details. However, special steps are needed to get the card to work. More specifically, the card needs to be initialized with new firmware every time it is inserted. The firmware, stored in the two files pm010101.hex and rf010704.hex, can be downloaded from this website. The hex-files are in the primary and 1.7.4 tarballs, respectively. Every time the card is inserted, the following commands are required to upload the firmware:

prism2_srec -gs wlan0 pm010101.hex
prism2_srec -gp wlan0 pm010101.hex # this will fail
iwpriv wlan0 reset 1
prism2_srec -rp wlan0 rf010704.hex
iwconfig wlan0 mode 2

Note that these commands are provided by the hostap-utils package, which you need to install as well. A recent version is available from this website.

For convenience, I bundled these commands into a script, /etc/pcmcia/conf_cp128 (remember to make it executable). It assumes the firmware hex-files are placed in /etc/pcmcia/firmware. Now, this script will have to be executed every time the card is inserted, before it can be configured with ifconfig or ifup. You can do that manually, but I chose to do it from the /etc/pcmcia/network script, which will be run anyway. If you only have one compact flash network device (which I do), this isn't a problem; however, if you have multiple, you need to take special care to check which card was inserted—otherwise you will try to flash all cards with the firmware for the SanDisk card! I determined that the best place in the network script to upload the firmware is just before control is passed to ifup (about line 55). Here is a snippet:

case $ACTION in
start)
# upload firmware to device (PRESUMED TO BE SANDISK CONNECTPLUS)
/etc/pcmcia/conf_cp128
ifup $DEVICE
;;

This is really all there is to it. Now you should be able to configure the device like any other using the Network applet.

As noted at first, this only gets the network interface up and running. I was never able to get the IDE part up as well at the same time. However, if you remove the line for hostap_cs in /etc/pcmcia/hostap_cs.conf and instead use the line for ide-cs, the card will work like a normal compact flash storage card. Without Wi-Fi abilities, mind you.

Comments and/or suggestions of any kind are very welcome at acb at bentzon dot net. If you follow these steps and get your card to work, I'd very much like to hear about it. Likewise if you don't :) And finally a huge thanks to the people who did the actual research and got this device to work, as well as the HostAP developers and open-source community in general. This is a feeble attempt at paying back a little of all that I have received.

Resources

Dedicated forum
OpenEmbedded Wiki
HostAP modules, OZ images, and scripts
Prism2/3 firmware


Last updated: December 29, 2007 by acb.