# PCMCIA Wireless Ethernet..... woe is me

## dalamarian

Hopefully I will be able to supply all necessary information.

First of all, I have gotten wireless networking before (even without much effort) but had a hard drive go up on me so I am in the process of restoring the system to it's former state.  The card works fine in Windows (grr).

NIC: Orinoco Gold 802.11b (really common card)

In my kernel I disabled support for pcmcia/cardbus, enabled support for wireless internet (non-ham), enabled support for pci hotplug. My Config file

```
emerge pcmcia-cs 

rc-update add pcmcia boot
```

copied net.eth0 to net.eth1.

configured my net script

rebooted

This is of course is where I run into problems.

When I reboot the cardmgr starts and modprobes memory_cs (not familiar with it at all) but memory_cs goes onto error and the card is not found on either socket (and no lights ever blink on it).

When I do an lsmod I get the following.

```

Module                  Size  Used by    Not tainted

memory_cs               9924   0  (unused)

ds                      7432   2  [memory_cs]

i82365                 41408   2

pcmcia_core            44288   0  [memory_cs ds i82365]

```

I can also load the orinoco_cs module without any problems with modprobe but net.eth1 still won't load.

I

```

Aug  9 21:05:53 [kernel] cs: memory probe 0xa0000000-0xa0ffffff: clean.

Aug  9 21:05:53 [cardmgr] socket 0: Anonymous Memory

Aug  9 21:05:54 [cardmgr] executing: 'modprobe memory_cs'

Aug  9 21:05:54 [cardmgr] executing: './memory start mem0'

Aug  9 21:05:54 [kernel] memory_cs: mem0: anonymous: unknown size

```

this is my net script.

```

# /etc/conf.d/net:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface

#

iface_eth0="192.168.0.101 broadcast 192.168.0.255 netmask 255.255.255.0"

#iface_eth0="128.118.119.244 broadcast 128.118.0.255 netmask 255.255.255.0"

iface_eth1="192.168.0.102 broadcast 192.168.0.255 netmask 255.255.255.0"

# For DHCP set iface_eth? to "dhcp"

# For passing options to dhcpcd use dhcpcd_eth?

#

#iface_eth0="dhcp"

#iface_eth1="dhcp"

#dhcpcd_eth0="..."

# For adding aliases to a interface

#

#alias_eth0="192.168.0.3 192.168.0.4"

# NB:  The next is only used for aliases.

#

# To add a custom netmask/broadcast address to created aliases,

# uncomment and change accordingly.  Leave commented to assign

# defaults for that interface.

#

#broadcast_eth0="192.168.0.255 192.168.0.255"

#netmask_eth0="255.255.255.0 255.255.255.0"

# For setting the default gateway

#

gateway="eth0/192.168.0.1"

#gateway="eth0/128.118.119.1"

gateway="eth1/192.168.0.1"

```

this is my net.eth1 init script

```

#!/sbin/runscript

# Copyright 1999-2003 Gentoo Technologies, Inc.

# Distributed under the terms of the GNU General Public License v2

# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/net.eth0,v 1.28 2003/03/16 08:03:19 azarah Exp $

#NB: Config is in /etc/conf.d/net

# For pcmcia users. note that pcmcia must be added to the same

# runlevel as the net.* script that needs it.

depend() {

   use hotplug pcmcia

}

checkconfig() {

   if [ -z "${iface_IFACE}" ]

   then

      eerror "Please make sure that /etc/conf.d/net has \$iface_$IFACE set"

      return 1

   fi

}

setup_env() {

   # No reason to check these multiple times in the file

   iface_IFACE="$(eval echo \$\{iface_${IFACE}\})"

   dhcpcd_IFACE="$(eval echo \$\{dhcpcd_${IFACE}\})"

   inet6_IFACE="$(eval echo \$\{inet6_${IFACE}\})"

   alias_IFACE="$(eval echo \$\{alias_${IFACE}\})"

   status_IFACE="$(ifconfig | gawk -v IFACE="${IFACE}" '/Link/ { if ($1 == IFACE) print "up" }')"

}

start() {

   local retval=0

   setup_env

   checkconfig || return 1

   

   ebegin "Bringing ${IFACE} up"

   if [ "${iface_IFACE}" != "dhcp" ]

   then

      /sbin/ifconfig ${IFACE} ${iface_IFACE} >/dev/null || {

         retval=$?

         eend ${retval} "Failed to bring ${IFACE} up"

         return ${retval}

      }

      # ifconfig do not always return failure ..

      /sbin/ifconfig ${IFACE} &> /dev/null || {

         retval=$?

         eend ${retval} "Failed to bring ${IFACE} up"

         return ${retval}

      }

   else

      # Check that eth0 was not brough up by the kernel ...

      if [ "${status_IFACE}" != "up" ]

      then

         /sbin/dhcpcd ${dhcpcd_IFACE} ${IFACE} >/dev/null || {

            retval=$?

            eend ${retval} "Failed to bring ${IFACE} up"

            return ${retval}

         }

      fi

   fi

   eend 0

   if [ -n "${alias_IFACE}" ]

   then

      local x=""

      local num=0

      local aliasbcast=""

      local aliasnmask=""

      ebegin "  Adding aliases"

      for x in ${alias_IFACE}

      do

         aliasbcast="$(eval echo \$\{broadcast_${IFACE}\} \| awk \'\{ print \$$((num + 1)) \}\')"

         if [ -n "${aliasbcast}" ]

         then

            aliasbcast="broadcast ${aliasbcast}"

         fi

         aliasnmask="$(eval echo \$\{netmask_${IFACE}\} \| awk \'\{ print \$$((num + 1)) \}\')"

         if [ -n "${aliasnmask}" ]

         then

            aliasnmask="netmask ${aliasnmask}"

         fi

      

         ebegin "    ${IFACE}:${num}"

         /sbin/ifconfig ${IFACE}:${num} ${x} \

            ${aliasbcast} ${aliasnmask} >/dev/null

         num=$((num + 1))

         eend 0

      done

      save_options "alias" "${alias_IFACE}"

   fi

   if [ -n "${inet6_IFACE}" ]

   then

      local x=""

      ebegin "  Adding inet6 addresses"

      for x in ${inet6_IFACE}

      do

         ebegin "    ${IFACE} inet6 add ${x}"

         /sbin/ifconfig ${IFACE} inet6 add ${x} >/dev/null

         eend 0

      done

      save_options "inet6" "${inet6_IFACE}"

   fi

   

   if [ -n "${gateway}" ] && [ "${gateway%/*}" = "${IFACE}" ]

   then

      ebegin "  Setting default gateway"

      # First delete any existing routes if it was setup by kernel ..

      /sbin/route del default dev ${gateway%/*} &>/dev/null

      /sbin/route add default gw ${gateway#*/} dev ${gateway%/*} \

         netmask 0.0.0.0 metric 1 >/dev/null || {

         

         local error=$?

         ifconfig ${IFACE} down &>/dev/null

         eend ${error} "Failed to bring ${IFACE} up"

         stop

         return ${error}

      }

      eend 0

   fi

   # Enabling rp_filter causes wacky packets to be auto-dropped by

   # the kernel

   if [ -e /proc/sys/net/ipv4/conf/${IFACE}/rp_filter ]

   then

      echo 1 > /proc/sys/net/ipv4/conf/${IFACE}/rp_filter

   fi

}

stop() {

   local myalias="$(get_options alias)"

   local myinet6="$(get_options inet6)"

   setup_env

   ebegin "Bringing ${IFACE} down"

   # Also down the inet6 interfaces

   if [ -n "${myinet6}" ]

   then

      local x=""

      for x in ${myinet6}

      do

         /sbin/ifconfig ${IFACE} inet6 del ${x} >/dev/null

      done

   fi

   

   # Do some cleanup in case the amount of aliases change

   if [ -n "${myalias}" ]

   then

      local x=""

      local num=0

      for x in ${myalias}

      do

         /sbin/ifconfig ${IFACE}:${num} down >/dev/null

         num=$((num + 1))

      done

   fi

   if [ "${iface_IFACE}" = "dhcp" ]

   then

      local count=0

      while /sbin/dhcpcd -k ${IFACE} &>/dev/null && [ "${count}" -lt 9 ]

      do

         # Give dhcpcd time to properly shutdown

         sleep 1

         count=$((count + 1))

      done

      if [ "${count}" -ge 9 ]

      then

         eerror "Timed out trying to stop dhcpcd"

      fi

   else

      /sbin/ifconfig ${IFACE} down >/dev/null

   fi

   eend 0

}

# vim:ts=4

```

Any and all help would be very appreciated.  I am sincerely hoping/believing that it is something stupid I am doing down the line...[/code]

----------

## SPW

wow. This is a really interesting subject. Unfortunately I cannot help you. On Tuesday I will install a wireless LAN in an "all-Gentoo environment". lol. there will only be my two machines in this LAN, but anyway. If nobody else is going to answer your question in the meantime, I will share my experiences with you. Thanks for your post, I'm sure it will help me

----------

## dj_choco

 *dalamarian wrote:*   

> ...
> 
> NIC: Orinoco Gold 802.11b (really common card)
> 
> In my kernel I disabled support for pcmcia/cardbus, enabled support for wireless internet (non-ham), enabled support for pci hotplug. My Config file
> ...

 

I'll research this if no one has the answer: Does pcmcia-cs replace/provide kernel support for pcmcia:?:

You stated that you disabled pcmcia in the kernel. Isn't that necessary for pcmcia functionality?

Did you read latexers tip on making sure the pcmcia init script is started?

Let me know how this goes... I'm headed down this road soon myself   :Wink: 

----------

## dirtboy

I have that same card and had the same problem for awhile.  The bug is not in your scripts, it is in the pcmcia-cs drivers and your Cardbus controller.  If you do a cardctl ident on the card, you won't get anything.  Pcmcia-cs depends on something being returned from this in order to check the id of the card with its list so it knows what module to load.  Since the cardbus drivers aren't working, no ident can be found and it loads the catchall module for pcmcia memory cards (memory_cs).  The problem is that the pcmcia-cs scripts haven't been updated to take advantage of new hardware.  So where do you get updated drivers?  The kernel.  Pcmcia-cs loads a module for your cardbus controller at boot by name.  It doesn't care where the module came from.  It tells you to use i82369 or something like that, but you can put anything in the config files  So, what I have done is configured pcmcia-cs according to the instructions it gives, then recompiled my kernel with Cardbus drivers.  This gives me the "yenta_socket" modules, which worked like a charm.  Take a look at my post here and see if that works.

----------

## diegs

Have you ever installed kernel drivers for your PCMCIA?  If so, you may want to consider wiping out the /lib/modules/kernel-2.4.... directory and starting over with a fresh kernel compile and modules install.  emerge pcmcia-cs and compiling modules from the kernel puts them in different subdirectories under /lib/modules/kernel-2.4... so lord knows what modprobe is trying to load.

So basically I had the same problem.  I think I ran into problems when I was trying to use kernel PCMCIA drivers, then I wasn't, etc. etc. due to conflicting views on the PCMCIA guide in this forum.  Here's how I finally got it to work (I think... had to reformat the computer by accident and gotta get things working again).  It got my orinoco gold card working (don't forget to emerge wireless-tools tho).

USELESS SIDENOTE: In my case I had one other problem: my system would hang on insertion of any pcmcia card.  To fix it I had to comment out an address range in my /etc/pcmcia/somethin config file.  booting with gentoo dopcmcia off the cd had this hangup as well so I had to install off knoppix.  ANYWAYS....

follow the directions here to the letter, don't read any of the suggestions in other comments below.  When you're compiling your kernel you may want to enable "wireless networking" but don't have any drivers selected.  But you definitely don't want any PCMCIA modules from the kernel.   One change from the directions: instead of i82365 in /etc/modules.autoload.d/kernel-2.4 (this is updated for gentoo 1.4 i believe) try using yenta-socket.  It's apparently the good cardbus driver, and it worked great for my brand new Dell Lattitude D600.

Good luck!

----------

## SamBuca

I never added anything to the modules.autoload.d files.

1) Disabled PCMCIA/CardBus support

2) Enabled (builtin) support for hot-pluggable devices

3) Enabled (builtin) PCI hotplug support, but not Compaq or ACPI options

4) Enabled (builtin) wireless LAN (non-hamradio), but none of the options

5) Installed kernel

6) emerge pcmcia-cs

7) Reboot

And I get this:

```
Linux PCMCIA Card Services 3.2.4

  kernel build: 2.4.21 #6 Fri Aug 15 09:51:06 EDT 2003

  options:  [pci] [cardbus] [apm]

Intel ISA/PCI/CardBis PCIC probe:

  O2Micro Oz6912 rev 00 PCI-to-CardBus at slot 02:04, mem 0x10000000

  host opts [0]: [pci+isa] [pci irq 10] [lat 168/176] [bus 3/6]

  ISA irqs (default) = 3,4,5,7,12 PCI status changes

cs: memory probe 0xa0000000-0xa0ffffff: clean.

hermes.c: 4 Dec 2002 David Gibson <hermes@gibson.dropbear.id.au>

orinoco.c 0.13b (David Gibson <hermes@gibson.dropbear.id.au> and others)

orinoco_cs.c 0.13b (David Gibson <hermes@gibson.dropbear.id.au> and others)

cs: IO port probe 0x0100-0x04ff: excluding 0x378-0x37f 0x3c0-0x3df 0x4d0-0x4d7

cs: IO port prove 0x0380-0x03bf: clean.

cs: IO port prove 0x03e0-0x04cf: clean.

cs: IO port prove 0x04d8-0x04ff: clean.

cs: IO port prove 0x0a00-0x0aff: clean.

cs: IO port prove 0x0c00-0x0cff: clean.

eth1: Station identity 001f:0004:0001:0003

eth1: Looks like an Intersil firmware version 1.3.4

eth1: Ad-hoc demo mode supported

eth1: IEEE standard IBSS ad-hoc mode supported

eth1: WEP supported, 104-bit key

eth1: MAC address 00:05:5D:xx:xx:xx

eth1: Station name "Prism I"

eth1: ready

eth1: index 0x01: Vcc 3.3, irq 3, io 0x0100-0x013f

eth1: New link status: Connected (0001)
```

Viola   :Very Happy: 

----------

## SPW

Today I got my wireless LAN PCMCIA card. It is an SMC2835W (802.11g)

That's why I share my exeriences with you even if they may not help you a lot.

I decided to install the software from the Linux-WLAN Project. That's why I chose to disable pcmcia support in the kernel (built WLAN support into the kernel)

```
emerge pcmcia-cs

emerge linux-wlan-ng

rc-update add pcmcia boot
```

At boottime I get the following

 *Quote:*   

> Starting PCMCIA...
> 
> cardmgr[820]: no pcmcia driver in /proc/devices
> 
> * cardmgr failed to start Make sure that you have PCMCIA modules built or support compiled into the kernel [!!]

 

That's quite strange because before I HAD pcmcia support built-in and I got a message I had to remove it because if one uses pcmcia-cs and linux-wlan-ng one has to deactivate them.

What shall I do?

I also tried

```
/etc/init.d/pcmcia start
```

and he tells me:  *Quote:*   

> modprobe: Can't locate module ds

 

This module of course does not exist with my current kernel as I have deactivated pcmcia support. Does anyone else have this SMC2835W?

----------

## dvink

Fellas:

The Gentoo docs say that the pcmcia script needs to be in the same runlevel as your net.* scripts. I have a net.eth1 scripts in default runlevel, which is my wireless, so the above "rc-update add pcmcia boot" looks strange to me. Am I wrong?

By the way, when my laptop shuts down, I see my eth1 brought down before the pcmcia script, so I get the complained that net.eth1 has not been started by the pcmcia script. Any ideas to resolve this?

----------

## Bonkie

 *dvink wrote:*   

> Fellas:
> 
> The Gentoo docs say that the pcmcia script needs to be in the same runlevel as your net.* scripts. I have a net.eth1 scripts in default runlevel, which is my wireless, so the above "rc-update add pcmcia boot" looks strange to me. Am I wrong?

 

It should at least be the same runlevel as your ethx scripts, meaning that its ok to have pcmcia runlevel boot if eth0 is default, but not vice-versa; eth0 boot and pcmcia default. Thats at least what I think. I always set my pcmcia runlevel boot, never had any problems with that.

Oh and i have no idea how to get that warning away but it doesnt bother me much.

----------

## Thulle

 *dirtboy wrote:*   

> I have that same card and had the same problem for awhile.  The bug is not in your scripts, it is in the pcmcia-cs drivers and your Cardbus controller.  If you do a cardctl ident on the card, you won't get anything.  Pcmcia-cs depends on something being returned from this in order to check the id of the card with its list so it knows what module to load.  Since the cardbus drivers aren't working, no ident can be found and it loads the catchall module for pcmcia memory cards (memory_cs).  The problem is that the pcmcia-cs scripts haven't been updated to take advantage of new hardware.  So where do you get updated drivers?  The kernel.  Pcmcia-cs loads a module for your cardbus controller at boot by name.  It doesn't care where the module came from.  It tells you to use i82369 or something like that, but you can put anything in the config files  So, what I have done is configured pcmcia-cs according to the instructions it gives, then recompiled my kernel with Cardbus drivers.  This gives me the "yenta_socket" modules, which worked like a charm.  Take a look at my post here and see if that works.

 

i tried that solution (using kernel yenta_socket -driver, which is correct driver) - but it doesnt work anyway - it identifies all cards as memorydevices.

bridge is; Cirrus Logic PD 6832

----------

## travisau

Just a quick suggestion.  I got my pcmcia working in gentoo for the first time the other day by enabling ISA support in the kernel.  I guess most other distros have that built in automatically.  Sometimes it doesn't pay to strip out EVERYTHING:)  Hope that helps.

----------

## lbrtuk

 *SamBuca wrote:*   

> 
> 
> Viola  

 

Viola? Where?

----------

