Laptops :: Suspend and Wireless PCMCIA problem



I have a Compaq Armada E500, and a D-Link DWL-G650.  Everything works fine, but when I go into suspend mode either because it is not pluged in for a while, or I push the suspend button, when I turn it back on, the wireless card is not recogonized, and will not work until I reboot.

 Any thoughts?

This is pretty common for PCMCIA wireless cards. It's likely that if you eject the card before suspending (which unloads the kernel module) and then plug it back in after resume, it will be ok.

If that works, you may be able to use an apmd script to do a "cardctl eject" on suspend and "cardctl insert" on resume to handle the timed sleep cases.

And what would this script look like?  I'm not a newbie, but I'm also not that knowledgeable in Linux ( as csn be shown by the question).  If the script is all that is needed, maybe it could find it's way into DSL.....?
To answer my own question....

The commands are :

cardctl eject 0
(which stops using the PCMCIA card)

cardctl insert 0
(You can start using the card again)

I have to go through and setup the Iwconfig again but that is minor.

 Thanks for the help
 Matt

Another thought.  What if I dont have the card inserted when I boot up?  Will cardctl start up anyway?  I dont think I saw it starting when nothing was in the slot.

cardctl should always start up if DSL detects PCMCIA slot(s). However if there are no cards inserted, cardctl doesn't print much (if anything) at startup.

As for iwconfig, you should be able to automate all of that by editing /etc/network/interfaces and adding the appropriate entry for your wireless card. For example, mine contains:
Code Sample

iface atml0 inet dhcp
       wireless-mode managed
       wireless-essid myappname

Which associates my wireless card with my AP and assigns an IP via DHCP. Your settings may vary (most likely your wireless card has a different device name) but the basic idea is the same.

Make sure that /etc/network/interfaces is listed in /home/dsl/.filetool.lst so it gets backed up and restored on restarts.

Next Page...
original here.