Koozali.org: home of the SME Server

PCMCIA success

Scott Smith

PCMCIA success
« on: June 25, 2001, 08:24:40 AM »
I have managed to get a Xircom 10/100 + 56K combo card working with e-smith. I was considering writing a howto, but thought I check the interest level first. It would surprise me if many people are using PCMCIA with e-smith. I'm only doing it so I can use two laptops for demos -- one server, one client, and an el cheapo 4 port hub in between.

Post a reply if you are interested. If there are more than a handful interested, I'll go ahead and write the howto.

Scott

Micael Åman

Re: PCMCIA success
« Reply #1 on: June 25, 2001, 05:09:22 PM »
Hello

To use E-smith on a laptop would solve my poblems. I have my E-smith i the room next to our bedroom and my wife complains about the noise from the fan on the PC. A laptop without a fan would be a good solution.



Micael

John Lewis

Re: PCMCIA success
« Reply #2 on: June 26, 2001, 12:41:12 AM »
I would be very interested in a howto for enabling e-smith to run on a laptop.  For low traffic uses, an old laptop would be more than sufficient, and efficient.

I've got such a laptop I'd like to use for testing, but have been stumped by the PCMCIA modules config's etc.

Thanks.

Ritchie Logan

Re: PCMCIA success
« Reply #3 on: June 28, 2001, 01:57:58 AM »
I think this would be a very valid howto..... my last server was a laptop, and I had to move to a desktop to get E-Smith running.

Laptops make the ideal home server: low power consumption, built in screen, keyboard & mouse, tiny footprint, low noise, and built in "UPS" (ie a battery).

Ritchie

Brad

Re: PCMCIA success
« Reply #4 on: September 06, 2001, 09:42:29 AM »
I too would be greatly interested in a howto, I will be using it for a portable test server.  This will save much vehicle space.

Scott Smith

Re: PCMCIA success
« Reply #5 on: September 06, 2001, 05:50:56 PM »
Apologies all around. I've been a bit slow in getting back to the PCMCIA HOWTO as I've been using my spare laptop for a VMware project. I should be able to get back to it in the next week or two, though.

Scott

Jordi

Re: PCMCIA success
« Reply #6 on: November 10, 2001, 07:06:13 PM »
Hi Scott;

I read you message about the "PCMCIA success" in www.e-smith.org.

I was wondering whether you ended up writing the how-to or not, given that I'm struggling in a very similar situation.

I'm running e-smith 5.0 on an old HP ommnibook 800CT that has a xircom credit card ethernet adapter. The driver for the card is xirc2ps_cs, and it even comes within e-smith (it is paced in /lib/modules/2.2.19-7.0.8/pcmcia.

The problem I have is that when I execute "insmod xirc2ps_cs" the program doesn't find 3 symbols:

     - register_pccard_driver
     - unregister_pccard_driver
     - CardServices

If you could provide me with any hint about how I can solve my problem I would appreciate it very much.

Regards,

     Jordi

Yu-Hsiang Shih

Re: PCMCIA success
« Reply #7 on: November 29, 2001, 05:29:59 PM »
I am trying to use a old Twinhead Notebook Pc as SME server but PCMCIA Ethernet card not work. Wish you can finish the PCMCIA HowTo soon.

Yu-Hsiang Shih

Stuart Broderick

Re: PCMCIA success
« Reply #8 on: December 04, 2001, 11:12:03 PM »
I too would like to see the how-to for PCMCIA network adapters - Xircom or 3-Com preferred.

Hope you can provide a how-to, or maybe even a list of steps if you don't have time to create the HOW-TO.

Thanks
Stuart

Daniel

Re: PCMCIA success
« Reply #9 on: February 24, 2002, 06:20:11 AM »
Well, here we all are still waiting for any idea on how to setup e-smith on a PC with a PCMCIA LAN card....

Help!

Stuart Brodercik

How-To located
« Reply #10 on: February 28, 2002, 11:37:16 PM »
Hi,

Just in case you haven't found it yet, I found Scott's HOW-TO. It's at

ftp://ftp.e-smith.org/pub/e-smith/docs/howto/contrib/e-smith-pcmcia-howto-0.1-01.txt

or here it is...

                 HOW-TO: Use PCMCIA with e-smith

                    By: J. Scott Smith, simnux

                   Release: 0.1-01, 3 July 2001



/////////////////////////////////////////////////////////////////
Summary
\

This document explains how to use PCMCIA with the e-smith server
and gateway. It has been tested with version 4.1.2 and should
work with versions 4.1.1 and 4.1.

NOTE: Not yet in proper HOW-TO format. That will come later :-)



/////////////////////////////////////////////////////////////////
Introduction
\

The e-smith server and gateway does not support PCMCIA "out of
the box". This makes e-smith difficult if not impossible to use
with most laptop or notebook systems, and the rare desktop or
server system that uses PCMCIA devices. Fortunately, because
e-smith is based on the Red Hat distribution, it is a relatively
simple matter to add PCMCIA support.

"Why," you might ask, "would anyone need PCMCIA support? Aren't
most PCMCIA cards intended for notebook computers? Who would use
a notebook with e-smith?"

Well, if you are an e-smith Partner, notebook computers happen to
be a great way to give product demonstrations. For example,
there's nothing like walking into a potential client's site with
two notebook computers, both loaded with Microsoft Windows, and a
small network hub. Tell the customer you are going to turn one of
the systems into a network server -- during the course of your 30
minute meeting! Start to finish, no smoke, no mirrors. And at the
end of the demonstration you'll be connecting to the server with
the other notebook.

How well does that work? Ten minutes to load the CD, another five
or ten to get through a basic configuration, connect the other
notebook, and presto chango! Instant small office server. If the
client has a phone line handy, hook up the PCMCIA modem and wham!
Internet gateway. Eyes pop out and jaws hang slack and agape!
With any luck your client will have had experience trying to get
similar functionality out of another server platform and will
appreciate even more the beauty of the e-smith magic.

Are you a home user? Old notebooks make great servers! Built in,
well, built in everything. Including a UPS. And they're small,
great for tucking away under a desk or in a drawer or in a
closet. Just make sure you allow plenty of ventilation, as the
little buggers tend to overheat.

A notebook as a small business server? Hmm... Possible, of
course, and perhaps appropriate for a very small office, but
definitely not recommended.



/////////////////////////////////////////////////////////////////
Pre-installation conditions
\

Use the lspci command to determine the current system status. The
output of the lspci command will of course vary from system to
system. A Dell Latitude CPx H system sporting a Xircom CardBus
Ethernet 10/100 + 56K will be used for examples in this HOW-TO.

     [root@laptop /root]# lspci

     00:00.0 Host bridge: Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge (rev 03)
     00:01.0 PCI bridge: Intel Corporation 440BX/ZX - 82443BX/ZX AGP bridge (rev 03)
     00:03.0 CardBus bridge: Texas Instruments PCI1225 (rev 01)
     00:03.1 CardBus bridge: Texas Instruments PCI1225 (rev 01)
     00:07.0 Bridge: Intel Corporation 82371AB PIIX4 ISA (rev 02)
     00:07.1 IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 01)
     00:07.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01)
     00:07.3 Bridge: Intel Corporation 82371AB PIIX4 ACPI (rev 03)
     00:08.0 Multimedia audio controller: ESS Technology ES1978 Maestro 2E (rev 10)
     01:00.0 VGA compatible controller: ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 64)

Note the CardBus bridge, indicating the OS found the PCMCIA
adapter, but does not know what kind of adapter it is.

If your installation happens to detect the Ethernet controller
(or whatever controller is on your PCMCIA card), then you are a
lucky person! You can ignore most of the rest of this HOW-TO.



/////////////////////////////////////////////////////////////////
Installing the PCMCIA package
\

The PCMCIA package is installed by downloading and installing the
latest Red Hat PCMCIA RPM. There are several ways to do this:

* Go to the Red Hat web site and do a site search for the string
  "kernel-pcmcia" or some variation thereof. This will return
  many hits, most of which are irrelevant.

* Go to the Red Hat web site and find the download page, then use
  the RPM search to find the string "kernel-pcmcia". I've found
  this search to be flakey at times, so don't be surprised if the
  search fails. If so, try the above method.

* Go to the Red Hat updates FTP site, updates.redhat.com, and
  look in the /7.0/en/os/i386 directory for the latest
  kernel-pcmcia-cs* file.

NOTE: The current kernel-pcmcia-cs release as of this writing is:

      kernel-pcmcia-cs-2.2.19-7.0.8.i386.rpm

NOTE: We are using the 7.0 release as that is what e-smith 4.1.2
      is based on. If you are using another version of e-smith
      then you will need to adjust the Red Hat version
      accordingly, and be aware that some of the specific
      procedures in this HOW-TO may not be 100% accurate.

After downloading the latest PCMCIA RPM, install it on the
e-smith server using the command:

     rpm -Uvh kernel-pcmcia-cs-2.2.19-7.0.8.i386.rpm

If you'd like a peek at what the RPM has installed on your system
use this command:

     rpm -qli kernel-pcmcia-cs-2.2.19 | less

Or, if you'd like to have that peek before you install:

     rpm -qli -p kernel-pcmcia-cs-2.2.19-7.0.8.i386.rpm | less



/////////////////////////////////////////////////////////////////
Starting pcmcia at init level 7
\

The e-smith server and gateway runs at init level 7. The PCMCIA
package configures a startup script in /etc/rc.d/init.d/pcmcia
and links it to init levels 0-6. A link must be added to init
level 7 in order for e-smith to use PCMCIA.

     ln -s /etc/rc.d/init.d/pcmcia /etc/rc.d/rc7.d/S45pcmcia

NOTE: Using the e-smith upgrade option removes all entries from
      the rc7.d directory. This will result in the S45pcmcia link
      being lost and the pcmcia drivers will not start on boot.



/////////////////////////////////////////////////////////////////
Checking PCMCIA status
\

Reboot the system. If everything is working properly you should
see the "Starting pcmcia" message and hear a sequence of two
beeps. This means the PCMCIA drivers are loaded.

NOTE: For troubleshooting please refer you to the PCMCIA HOW-TO,
      which is located in:

      /usr/share/doc/kernel-pcmcia-cs-2.2.19

      The purpose of this HOW-TO is to help you get e-smith
      working with PCMCIA, not to do troubleshooting for the
      PCMCIA package.

Login as root and check the PCMCIA card status. The following
capture shows the output from the sample system.

     [root@laptop /root]# lspci

     00:00.0 Host bridge: Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge (rev 03)
     00:01.0 PCI bridge: Intel Corporation 440BX/ZX - 82443BX/ZX AGP bridge (rev 03)
     00:03.0 CardBus bridge: Texas Instruments PCI1225 (rev 01)
     00:03.1 CardBus bridge: Texas Instruments PCI1225 (rev 01)
     00:07.0 Bridge: Intel Corporation 82371AB PIIX4 ISA (rev 02)
     00:07.1 IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 01)
     00:07.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01)
     00:07.3 Bridge: Intel Corporation 82371AB PIIX4 ACPI (rev 03)
     00:08.0 Multimedia audio controller: ESS Technology ES1978 Maestro 2E (rev 10)
     01:00.0 VGA compatible controller: ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 64)
     20:00.0 Ethernet controller: Xircom Cardbus Ethernet 10/100 (rev 03)
     20:00.1 Serial controller: Xircom Cardbus Ethernet + 56k Modem (rev 03)

     ## now we have Ethernet and serial controllers,
     ## compliments of the PCMCIA card drivers!

     [root@laptop /root]# cardctl status

     Socket 0:
       3.3V CardBus card
       function 0: [ready]
       function 1: [ready]
     Socket 1:
       no card

     [root@laptop /root]# cardctl config

     Socket 0:
       Vcc 3.3V  Vpp1 3.3V  Vpp2 3.3V
       interface type is "cardbus"
       irq 11 [exclusive] [level]
       function 0:
         io 0x0200-0x0287 [32bit]
       function 1:
         io 0x0200-0x0287 [32bit]
     Socket 1:
       not configured

     [root@laptop /root]# cardctl ident

     Socket 0:
       product info: "Xircom", "CardBus Ethernet 10/100 + Modem 56", "CBEM56G", "1.03"
       manfid: 0x0105, 0x0103
       function: 6 (network)
     Socket 1:
       no product info available

If your system doesn't come up with any controllers, you'll need
to do a litte troubleshooting.



/////////////////////////////////////////////////////////////////
Linking the PCMCIA modules
\

The e-smith configuration system expects to find Ethernet modules
in the /lib/modules/*/net directory, where * represents the
kernel release number. If you look in /lib/modules you'll see
four directories. The one we're interested in is the one without
either "e-smith" or "smp" in the name. The kernel release is
2.2.16-22 on the example system.

In order for e-smith to find the PCMCIA modules we need to link
them into to same directory with the other modules. Only the
files ending with _cs.o or _cb.o need to be linked.

To link the files, do the following from the root login:

     MODS="/lib/modules/2.2.16-22"

     cd "$MODS/pcmcia"

     for MOD in *_c[sb].o
     do
         ln -s "$MODS/pcmcia/$MOD "$MODS/net"
     done



/////////////////////////////////////////////////////////////////
PCMCIA ins and outs
\

It may be necessary to tweak some files before we can use the
PCMCIA card automagically. There are several files that are of
interest to us.

/proc/pci

     The kernel's listing of the PCI bus. The data in this file
     is best queried by the lspci command, and relies on the
     following file to interpret the findings.

/usr/share/pci.ids

     Contains a listing of PCI vendor and device IDs, subdivided
     into sub-vendor and sub-device IDs, with a description at
     each level. This list must remain in sort order, so be very
     careful when modifying it.

/etc/pcmcia/config

     A table of the various supported PCMCIA cards.

/usr/share/kudzu/pcitable

     A lookup table of vendor and device IDs, along with the
     supporting module and a description. This is the file that
     everything except e-smith will use.

/etc/e-smith/pcitable

     This is a duplicate of the file in /usr/share/kudzu, but
     with an "local" changes. In the e-smith 4.1.2 release, the
     only difference is that the 3ware RAID controller module is
     defined. The e-smith hardware detection routines will use
     the most recently modified of these two files.

The first thing to do is to query /proc/pci to determine what
kind of PCI devices you have, and specifically how the PCMCIA
adapter is listed. The following output shows how to do this:

     [root@laptop /root]# lspci

     00:00.0 Host bridge: Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge (rev 03)
     00:01.0 PCI bridge: Intel Corporation 440BX/ZX - 82443BX/ZX AGP bridge (rev 03)
     00:03.0 CardBus bridge: Texas Instruments PCI1225 (rev 01)
     00:03.1 CardBus bridge: Texas Instruments PCI1225 (rev 01)
     00:07.0 Bridge: Intel Corporation 82371AB PIIX4 ISA (rev 02)
     00:07.1 IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 01)
     00:07.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01)
     00:07.3 Bridge: Intel Corporation 82371AB PIIX4 ACPI (rev 03)
     00:08.0 Multimedia audio controller: ESS Technology ES1978 Maestro 2E (rev 10)
     01:00.0 VGA compatible controller: ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 64)
     20:00.0 Ethernet controller: Xircom Cardbus Ethernet 10/100 (rev 03)
     20:00.1 Serial controller: Xircom Cardbus Ethernet + 56k Modem (rev 03)

     ## the line we're interested in is the Ethernet controller
     ## so let's ask for a verbose listing of just that entry

     [root@laptop /root]# lspci -v -s20:00.0

     20:00.0 Ethernet controller: Xircom Cardbus Ethernet 10/100 (rev 03)
          Subsystem: Xircom Cardbus Ethernet 10/100
          Flags: bus master, medium devsel, latency 64, IRQ 11
          I/O ports at 0200
          Memory at 60013000 (32-bit, non-prefetchable)
          Memory at 60012000 (32-bit, non-prefetchable)
          Expansion ROM at 6000c000 [disabled]
          Capabilities: [dc] Power Management version 1

     ## more info than we needed, but that is our card
     ## let's get the numeric values instead

     [root@laptop /root]# lspci -vn -s20:00.0

     20:00.0 Class 0200: 115d:0003 (rev 03)
          Subsystem: 115d:1181
          Flags: bus master, medium devsel, latency 64, IRQ 11
          I/O ports at 0200
          Memory at 60013000 (32-bit, non-prefetchable)
          Memory at 60012000 (32-bit, non-prefetchable)
          Expansion ROM at 6000c000 [disabled]
          Capabilities: [dc] Power Management version 1

     ## Vendor ID: 115d     Device ID: 0003
     ## SubVen ID: 115d     SubDev ID: 1181
     ##
     ## lspci -s20:00.1 would divine details of the modem on
     ## this particular card, but we'll stick to Ethernet

If the PCMCIA Ethernet device comes up as unknown, you'll need to
look at the pci.ids file first. Make sure the device is listed
there, and if not you can add it as a local configuration. Here
is the section of pci.ids for the example system:

     
     115a  Harlequin Ltd
     115b  Parallax Graphics
     115c  Photron Ltd.
     115d  Xircom
          0003  Cardbus Ethernet 10/100
               1014 0181  10/100 EtherJet Cardbus Adapter
               1014 1181  10/100 EtherJet Cardbus Adapter
               115d 0181  Cardbus Ethernet 10/100
               115d 1181  Cardbus Ethernet 10/100
               8086 8181  EtherExpress PRO/100 Mobile CardBus 32 Adapter
               8086 9181  EtherExpress PRO/100 Mobile CardBus 32 Adapter
          0005  Cardbus Ethernet 10/100
               1014 0182  10/100 EtherJet Cardbus Adapter
               1014 1182  10/100 EtherJet Cardbus Adapter
               115d 0182  Cardbus Ethernet 10/100
               115d 1182  Cardbus Ethernet 10/100
          0007  Cardbus Ethernet 10/100
               1014 0182  10/100 EtherJet Cardbus Adapter
               1014 1182  10/100 EtherJet Cardbus Adapter
               115d 0182  Cardbus Ethernet 10/100
               115d 1182  Cardbus Ethernet 10/100
          000b  Cardbus Ethernet 10/100
               1014 0183  10/100 EtherJet Cardbus Adapter
               115d 0183  Cardbus Ethernet 10/100
          000f  Cardbus Ethernet 10/100
               1014 0183  10/100 EtherJet Cardbus Adapter
               115d 0183  Cardbus Ethernet 10/100
          0101  Cardbus 56k modem
               115d 1081  Cardbus 56k Modem
          0103  Cardbus Ethernet + 56k Modem
               115d 1181  CBEM56G-100 Ethernet + 56k Modem
               8086 9181  PRO/100 LAN + Modem56 CardBus
     115e  Peer Protocols Inc
     115f  Maxtor Corporation
     1160  Megasoft Inc
     

Remember, this is just an ID file. You can add new entries if
they are not already there. And there is probably somewhere on
to get a most recent version.

Next, examine the pcitable files. If the vendor/device ID pair
(or the subvendor/subdevice pair) is listed, and the module is
"Unknown", change the module to the correct one for the device.
If the ID pair is not listed at all, add a new entry. Remember to
touch the e-smith version of the file last, so that e-smith will
examine it first.

Here is the snippet from the example system.

     
     0x1158  0x3011  "unknown"  "Voarx R & D Inc|Tokenet/vg 1001/10m anylan"
     0x1158  0x9050  "unknown"  "Voarx R & D Inc|Lanfleet/Truevalue"
     0x1158  0x9051  "unknown"  "Voarx R & D Inc|Lanfleet/Truevalue"
     0x1159  0x0001  "unknown"  "Mutech Corp|MV-1000"
     0x115d  0x0003  "unknown"  "Xircom|Cardbus Ethernet 10/100"
     0x115d  0x0005  "unknown"  "Xircom|Cardbus Ethernet 10/100"
     0x115d  0x0007  "unknown"  "Xircom|Cardbus Ethernet 10/100"
     0x115d  0x000b  "unknown"  "Xircom|Cardbus Ethernet 10/100"
     0x115d  0x000f  "unknown"  "Xircom|Cardbus Ethernet 10/100"
     0x115d  0x0101  "unknown"  "Xircom|Cardbus 56k modem"
     0x115d  0x0103  "unknown"  "Xircom|Cardbus Ethernet + 56k Modem"
     0x1163  0x0001  "Card:Rendition Verite 1000"  "Rendition|Verite 1000"
     0x1163  0x2000  "Card:Rendition Verite 2x00"  "Rendition|Verite V2000/V2100/V2200"
     0x1165  0x0001  "unknown" "Imagraph Corporation|Motion TPEG Recorder/Player with audio"
     

Note that the module for 115d:0003 is unknown. This should be
updated to specify the tulip_cb.o module, as follows:

     0x115d  0x0003  "tulip_cb" "Xircom|Cardbus Ethernet 10/100"

To determine which module to use, check the following file:

     /usr/share/doc/kernel-pcmcia-cs-2.2.19/SUPPORTED.CARDS

Reboot the system after modifying any of the above files.



/////////////////////////////////////////////////////////////////
Configuring the Ethernet controller
\

Now the e-smith console should be able to locate the PCMCIA
adapter and have an associated module to load. Login to the
console and try it!



/////////////////////////////////////////////////////////////////
Check the PCMCIA docs for more help
\

The files in /usr/share/doc/kernel-pcmcia-cs-2.2.19 may contain
pointers for your particular card. You may also want to check the
kernel-pcmcia home page (listed in the docs) to see if there is
any late-breaking news.

For example, the Xircom Ethernet controller does not work after
the above configuration. Seaching the docs and home page reveals
that the following is needed:

     ifconfig eth0 promisc



/////////////////////////////////////////////////////////////////
Summary
\

Hopefully this document will provide sufficient direction to get
you up and running with PCMCIA. If you're lucky you'll have one
of the support cards, and it will be fully supported.

Good luck!

Scott Smith

Re: How-To located
« Reply #11 on: February 28, 2002, 11:51:11 PM »
Before anyone asks :-) I no longer have a laptop or PCMCIA network adapter so I'll not be doing any more work on the HOW-TO. In fact, I did nothing more with PCMCIA after writing the initial document. If someone else wishes to take it over, please do.

Scott

Stuart

Keys to success
« Reply #12 on: March 01, 2002, 08:31:42 PM »
With the latest version of SME Server 5.1.2., many of the steps mentioned in Scott's HOWTO can be omitted. The key (for simplicity) is to check in /usr/share/doc/kernel-pcmcia-cs.2.2.19/SUPPORTED.CARDS to make sure that your pcmcia card is supported. If it is, life is easy....

You don't have to download the kernel-pcmcia-cs-2.2.19-7.0.8.i386.rpm, it's in the distribution under e-smith/RPMS, but you do have to install it (see HOWTO).

After installing the rpm, then you have to setup the PCMCIA links - Note in the HOWTO, MOD & MODS are different - they are NOT typing mistakes :)

On my system, which has a Xircom & a 3-Com PCMCIA network card, there was nothing else to do other than set the addresses, broadcast masks etc for each of the cards. Installation was fairly easy.

Have fun.

Stuart