[juneau-lug] Adding unknown PCMCIA cards to database

  • From: James Zuelow <e5z8652@xxxxxxxxxx>
  • To: jlug <juneau-lug@xxxxxxxxxxxxx>
  • Date: Sun, 18 Jan 2004 15:01:16 -0900

I've been looking for cheap PCMCIA NICs for a while, and couldn't
resist the $3.99 Belkin F5D5020 NICs on their refurb site.  I ended up
buying four of them, which is a good thing - Belkin's quality control
in their refurb sales is not all that great.  Of the four NICs, two of
them had trashed dongles (perhaps the reason they were returned in the
first place).  They worked, but they were not pretty - and could not
be removed from the card without a lot of work.  Two of the cards had
new dongles, which were fine. 

Anyway, google said they were supported by Linux, but no joy when
plugging them in.  Instead of the two beep low-hi tones I usually get
when inserting a card, I just got a low tone single beep which means
the card wasn't configured.  Testing them on Win2k started the add new
hardware wizard, so I was fairly confident the cards were OK.

I did a little research and found that they want to use the pcnet_cs
module.  But my Debian Woody system did not want to load the module
when I inserted the card.  This is because there is a card database at
/etc/pcmcia/config (and possibly /etc/pcmcia/config-2.4, etc.) that
lists specific cards, and will load them if it finds a listing.  If it
doesn't find a matching listing, cardmgr won't load the module.  Using
modprobe to load the module won't bind it to the card.  You have to
use the database.  

Google again showed me some entries for this card, however the card
entries shown didn't work.  The entries have to be EXACTLY correct,
and the ones on Google had small typos (using an underscore instead of
a dash, etc).  Any sort of typo will make the PCMCIA system think it
is a different card.  Therefore I did what I should have done in the
first place, which is forget Google and go to the man pages.

Here's a micro howto on setting up new PCMCIA cards when you know
which module they use, but cardmgr on your laptop does not:

1) From the manufacturer site, documentation, or wherever - find out
which module the card uses.  If the card doesn't use a Linux module
this process probably won't work unless you get lucky.  A card may be
supported even though the manufacturer doesn't specifically say so. 
For example, my Belkin card uses the pcnet_cs module, which supports
NE2000 compatible cards.  So Brand X may not officially support Linux,
but they use Windows NE2000 drivers.  So documentation for other
operating systems might point you in the right direction.

2) Once you know which module you want to try, get the card
information.  `man pcmcia` will explain the /etc/pcmcia/config file
syntax for you.  There are a variety of ways to specify a card,
including text version strings, etc.  To get the information for the
config file, use `cardctl ident`.  If you're not root, you probably
have to specify `/sbin/cardctl ident`.  Don't use cardinfo, the X
program - it doesn't give enough information about the card.

In my case, `cardinfo ident` returns the following:

Socket 0:
     product info: "Belkin", "F5D5020-PCMCIA-Network-Card", "V1", "0"
     manfid: 0x01bf, 0x2328
     function: 6 (network)

3) Make the apropriate entry in /etc/pcmcia/config (and any other
config files that are there, such as config-2.4).  Using the other
entries and what you learned from `man pcmcia`, add your card to the
database.  In my example I chose to use the manfid method of
specifying the card, since it was shortest to type and seemed least
likely to have a typo.  I added the following:

card "Belkin 5020"
     manfid 0x01bf, 0x2328
     bind "pcnet_cs"

4) restart cardmgr and you should be all set.  On a Debian system, I
gave the command `/etc/init.d/pcmcia restart`.  You can also manually
send a SIGHUP to cardmgr, etc. After the PCMCIA system restarted, my
Belkin card came up as eth0 and happily set itself up on the network.

Hopefully this is of some use to you.  I know that there are a lot of
off-brand wireless cards that use common modules such as orinoco, but
if the card doesn't report exactly the right information cardmgr won't
bind a module to it.  Using cardinfo and editing /etc/pcmcia/config
will let you use the card.  Adding new modules requires an additional
entry in /etc/pcmcia/config and is explained fairly well in the pcmcia
man page.

Cheers,

James

------------------------------------
This is the Juneau-LUG mailing list.
To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the 
word unsubscribe in the subject header.

Other related posts:

  • » [juneau-lug] Adding unknown PCMCIA cards to database