PDA

View Full Version : Wireless settings don't stick



displaced
05-23-2003, 03:40 AM
Hi

Knoppix has been a great way for me to move to Debian from RedHat. The hdinstall went without problem. However, the settings I enter in wlcardconfig are not applied during boot-up. I have to start wlcardconfig, hit Enter repeatedly to skip through the dialogs (all the settings are remembered), then do an ifdown eth0; ifup eth0 to trigger a dhcp and get connectivity.

During boot, I have an error suggesting that the interface is being brought up, but the wireless settings are not applied - so the ifup fails.

I think the cause of this is that my wireless card is a PCMCIA card in a 'plx adaptor' in a PCI slot. So, the settings are being stored within the PCMCIA suite's config files, but the card services themselves are not used. It looks like wlcardconfig runs iwconfig on exit, thus applying the settings irrespective of the card services.

I've been trying to get a feel for how knx/Debian does its init'ing and network setup, but could do with a hand. What's the 'nicest', most debian-ish way to cause the iwconfig settings to be applied when the interface is brought up? A pre-ifup script somewhere?

On another note, my self-installed GRUB doesn't seem to understand reiserfs... grr. But I'll keep experimenting with that one - hopefully (not?) nuking Win2k's bootableness in the process... :)

Thanks for any advice...

--
Chris

garyng
05-23-2003, 04:02 AM
iwconfig as far as I know is not sticky. You would need either to modify the /etc/pcmcia/wireless.opts or you can add those wireless options to /etc/network/interfaces line(read it some where, forgot how).

These are I supposed a more 'linux way' to have the configure being sticky. For KNOPPIX, may be you can modify the knoppix.sh if you use the myconfig feature. Just do a "iwconfig eth? ...." follow by "pump" would do.

If you already have KNOPPIX installed to a HD, /etc/pcmcia/wireless.opts and /etc/pcmcia/network.opts seems to be the best place to change as even DHCP stuff can be specified there. so it really is plug and the network would be available.

There is also a setup of wlan-ng stuff there but I haven't figure out what they are but for me, changing wireless.opts and network.opts is all I need to have the sticky setting and plug and play.

displaced
05-23-2003, 03:03 PM
iwconfig as far as I know is not sticky. You would need either to modify the /etc/pcmcia/wireless.opts or you can add those wireless options to /etc/network/interfaces line(read it some where, forgot how).

Yep - that's what wlcardconfig seems to do automatically - add the settings to /etc/pcmcia/wireless.opts. And that's why it's no use ;) Although the card is a PCMCIA card, it's in a PLX adaptor card in a PCI slot on a desktop PC. The system sees it as a plain PCI card. So, the pcmcia settings are never consulted... The only reason it works after running wlcardconfig is that program also runs a iwconfig command on exit to immediately configure the device...


These are I supposed a more 'linux way' to have the configure being sticky. For KNOPPIX, may be you can modify the knoppix.sh if you use the myconfig feature. Just do a "iwconfig eth? ...." follow by "pump" would do.

I'll check that when I'm back at the box. It's a Knoppix hard disk install, though - so I have a feeling I don't have knoppix.sh, just the standard debian startup process.


If you already have KNOPPIX installed to a HD, /etc/pcmcia/wireless.opts and /etc/pcmcia/network.opts seems to be the best place to change as even DHCP stuff can be specified there. so it really is plug and the network would be available.

But I'm not using PCMCIA ;)


There is also a setup of wlan-ng stuff there but I haven't figure out what they are but for me, changing wireless.opts and network.opts is all I need to have the sticky setting and plug and play.

Had a look at the wlan-ng stuff. Confirmed what I thought, though: I'm definitely using the orinoco drivers and iwconfig stuff.

I think I'll take a closer look at how ifupdown calls scripts. Already, it looks much cleaner than how Red Hat does things... with functions being sourced from all over the place, a real script-soup in /etc/sysconfig/... *shudder*

GRUB's still causing me pain. Can anyone put my mind to rest and say "Yep - I've got grub installed on a reiserfs volume, and it boots fine!" :-)

--
Chris

displaced
05-23-2003, 06:59 PM
Figured out the wireless setup... I'll post the answer here for others' reference...

I read the docs in /usr/share/doc/wireless-tools and found that you could specify wireless options in /etc/network/interfaces

For example, my entry for eth0 (the wireless card) is something like:


iface eth0 inet dhcp
wireless_essid <network name>
wireless_mode Ad-Hoc
wireless_channel 6
wireless_key <raw-hex-key>


These settings are consulted by the network/if-pre-up.d/wireless-tools script whenever the interface is brought up, and the relevant iwconfig command is invoked.

As for the GRUB issue, I've decided to simplify... maaan! and see how lilo manages things first. My config is:

/dev/hda1 (Win2k Boot NTFS)
/dev/hda5 (Win2k NTFS)
/dev/hdb1 (Linux ReiserFS)
/dev/hdb2 (Linux Swap)

lilo now lives in the boot sector of hdb1, and I can get to it by making my BIOS boot from IDE-1 instead of IDE-0. I'm going to continue experimenting. If I get really stuck, expect another thread ;)

garyng
05-24-2003, 05:55 AM
interesting. which program would be responsible for loading the proper driver in this case ? In the case of PCMCIA, the cardmgr would. Just curious to know.

displaced
05-24-2003, 03:39 PM
Good question!

First (because of my RedHat days...) I went looking in /etc/modules.conf What RH usually does is make an alias for the network card driver to the interface name. In this case, orinoco_plx would be aliased to eth0, so whenever eth0 was referenced, the module would be loaded.

Debian looks to be a bit different. Instead, I've got an /etc/modules file which lists the modules to load at boot-time. The orinoco_plx driver's listed there.

There's quite possibly more to it than this - if I uncover anything else I'll post for reference.

The fact that the module isn't dynamically loaded & unloaded as eth0 goes up and down doesn't really cause any problems in this case. The PCMCIA<->PCI PLX adaptor isn't designed to be hot-pluggable, so inserting or removing the card requires a power-down anyway.

--
Chris

Stephen
05-24-2003, 06:01 PM
Good question!

First (because of my RedHat days...) I went looking in /etc/modules.conf What RH usually does is make an alias for the network card driver to the interface name. In this case, orinoco_plx would be aliased to eth0, so whenever eth0 was referenced, the module would be loaded.

Debian looks to be a bit different. Instead, I've got an /etc/modules file which lists the modules to load at boot-time. The orinoco_plx driver's listed there.

--
Chris

There is also an /etc/modutils/aliases where you can put your aliases and then run update-modules to update the modules.conf.

displaced
05-24-2003, 06:47 PM
Thanks, Stephen. [edit: oops - changed 'Steven' to 'Stephen', sorry 'bout that!]

The orinoco driver was already in there - I just found the file by grepping for orinoco_plx in /etc/*

But what you've mentioned has helped me with something else. I've compiled the nvidia kernel module, but couldn't figure out how to get the system to load it when it was needed. In the end, I just stuck it at the end of /etc/modules and had it load at boot time.

I'll undo that, and use the correct method you've described.

--
Chris