I have just installed Mandrake 9.1 on my Compaq Evo N800v. It went
pretty well (a few problems that I will raise in another email) and
looks pretty good. Now I am trying to get my 3Com OfficeConnect WLAN
PCCard working again, and not having much joy.

I have downloaded both the latest (2.1.1) release and a recent snapshot
of atmelwlandriver and get the same problems with both. So long as I say
no to "Set extra module version information", the pcmcia modules appear
to compile OK, but when I get to compiling lvnet, I get a long list
(attached below) of parse errors and the compile fails.

It makes no difference whether I try with the vanilla atmel source, or make
the changes to fastvnet_cs.c and vnet.h that are recommended in certain
messages in the mailing list archives. In other words, I have tried it
with and without "#define HAS_WIRELESS_EXTENSIONS 1" (as well as the
other mods).

I had this card working adequately on Mandrake 9.0. I use it at home and
at work, both of whose Access Points are using 128-bit WEP keys, so I
need lvnet to be able to configure the card with the right key.
Unfortunately, I was never able to get it to successfully select from
the keys in the config files - it always skipped quickly over the first
key (work) to the second (home). So wireless networking started up
automatically at home, but at work, I had to go into lvnet, add most of
the digits of the key, switch to another console and fire up "ifup eth1"
and then switch back and add the rest of the key and the rest of the WEP
configuration options. If I did this quickly, ifup would bring eth1 up
successfully. If I was too slow, it would overwrite or ignore the key I
was adding and ifup would fail. That was as good as it got, but at least
I know it worked after a fashion.

I have the kernel source and libncurses-devel (which I think is
Mandrake's name for the required ncurses-devel) installed.

It seems from the error messages that there are massive problems with
/usr/src/linux/ethtool.h. Looking at my home server, which is still
running 9.0, I see that /usr/src/linux/wireless.h did not include
ethtool.h, as 9.1 does. I assume this is what has caused the problem,
but I'm not sure why or what to do about it.

Based on a comment from Jean Tourillhes
(http://www.ussg.iu.edu/hypermail/linux/kernel/0208.3/1283.html), I
guessed that ethtool.h was dispensible for wireless.h, and commented out
the include line. The compile of atmelwlandriver then completes
successfully. But is this include needed for other circumstances, and am
I likely to have problems later if I do this?

When I try to "make install" the modules, I get a warning "install:
installing multiple files, but last argument,
'/lib/modules/2.4.21-0.13mdk/pcmcia' is not a directory". If I "mkdir
/lib/modules/2.4.21-0.13mdk/pcmcia", make install then completes
successfully. But is the absence of the pcmcia directory an indication
that something isn't installed that should be there, or just that I
haven't recompiled the kernel yet (which seems to be the circumstance in
9.0 that caused the pcmcia directory to be created)?

With the modules installed, I try to modprobe the relevant module, but this fails because the modules were compiled against a different kernel version, although I only have the original Mandrake kernel and kernel-source packages installed. This, of course, is because Mandrake set the EXTRA_VERSION in /usr/src/linux/Makefile and /usr/src/linux/include/linux/version.h to "-0.13mdkcustom", rather than "-0.13mdk". Editing those to match the current kernel version and then rerunning the compile of the atmel drivers gives me installed modules that I can successfully modprobe (although depmod complains about "unresolved symbols", it doesn't seem to stop the modules from loading happily).

I still have no eth1 or wlan0 device at this point, but I added "alias eth1 pcmf502r3" to /etc/modules.conf and at some point not long after that the eth1 network device was setup - don't know if it was the alias that did it or something else (perhaps the accidental effect of rebooting restarting the pcmcia drivers?).

If I disable WEP on the Access Point, I can now ifup eth1 and connect successfully to the network (although eth1 still does not appear in the Network Connections section of MCC). However, I really want to use WEP - I know it's not brilliant security, but I'd rather have something than nothing, and at work I have no choice. I can use the same trick as before (using lvnet to setup most of the key, then ifup eth1, then finish the WEP settings) to get the connection running with WEP, but this is hardly an optimal solution, and now I don't seem to be able to get it to connect to either AP using keys in /etc/pcmcia/wireless.opts.

If I try to use iwconfig to setup the key (which would at least allow me to setup some scripts to avoid typing in the 13 hex digits each time), it seems to work, but then gets wiped when I run ifup eth1. I tried:
iwconfig eth1 key 0112233445566778899AABBCCD
iwconfig eth1 key on
lvnet then showed the key setup correctly under Advanced and the BSSID, Channel, SSID etc. correctly identified under View Configuration. Using "restricted" when setting the key show up in lvnet as "Mandatory" rather than "Optional" WEP Mode. So I think iwconfig is working to that extent. But whether I use ifup or a manual "ifconfig add", I cannot get the network connection established after setting the key in this way. It tries for a while, and eventually unsets the key. Strangely, using ifup will eventually report success and an IP address appears to be assigned to eth1, but it is not really working. Pinging any address will fail with "Destination Host Unreachable", and "View Configuration" in lvnet shows that the card has neither the Channel nor the SSID set.


One guess is that the problem is with the "Authentication Type" setting, which is "Open System" by default. This is the last thing I configure when I get the connection working manually using lvnet, and I set it to "Shared Key". I cannot find an equivalent command using iwconfig, so when I ifup or ifconfig after setting the key with iwconfig, I guess the Authentication Type is wrong, so the configuration fails. I tested this by setting the key with iwconfig, used lvnet to set the Authentication Type and then ifconfig to add the address, and ifconfig completes successfully straight away (as long as eth0 is up to perform the hostame lookup). However, the connection is still not working (checked with ping). lvnet shows all the configuration parameters apparently set correctly, but the Driver State goes from "Authenticating" to "Not Known yet.....". If I set the Authentication Type mack to Open System, the Driver State shows as "Associated", which sounds better, but still doesn't give me a working connection.

If I revert to using lvnet to pass the configuration options while ifup eth1 is running, the connection is made, but just before it is, I get a "SIOCADDRT: File exists" warning, which I don't remember on Mandrake 9.0. If I check the connection using lvnet, the Driver State is showing as "Associated", and all the other parameters look correct, including an Authentication Type of "Shared Key". To check whether the issue was a general question of timing, rather than timing of the setting of the Authentication Type, I tried doing the same series of actions, but setting Authentication Type to "Open System" instead. This also gave me a working connection. So it looks like the Authentication Type is a distraction, it is just something to do with the timing of providing the WEP configuration parameters. In fact, it seems to be sufficient simply to enter the last digit of the encryption key and hit enter just after starting ifup eth1, for it to establish a valid connection - the other parameters seem to be irrelevant.

To avoid the hostname lookup warnings, I had been starting up eth1 with eth0 already connected. I wondered if this was the cause of the SIOCADDRT warning, and sure enough, I get a working connection and no SIOCADDRT warning if I "ifup eth1" after I "ifdown eth0".

As "ifup eth1" actually wipes out any existing key unless that key is provided during configuration, I assumed that ifup must be attempting to apply a key not extracted from /etc/pcmcia/wireless.opts. I had a look at /etc/sysconfig/network-scripts/ifup and /etc/sysconfig/network-scripts/ifup-wireless, and I guess it is taking its parameters from /etc/sysconfig/network-scripts/ifcfg-eth1. So I added a KEY parameter in this file and ran "ifup eth1" again. This now took some time to return, and when it did, it reported:

/sbin/ifup: line 433: 7002 Hangup /etc/init.d/tmdns reload >/dev/null 2>&1

ifconfig showed no IP address had been applied to eth1, but eth1:9 had been setup with an address on the 169.254.80.0 subnet. I am using 192.168.0.0, so this was not provided by my server. I believe it is the subnet used by the Access Point if no other DHCP server is available to supply an address. lvnet showed that the connection appeared to be fine, so my guess is that there was a problem with DHCP. This would fit with the other problems people have had with the switch to dhclient, tmdns and zeroconf in Mandrake 9.1. So I added DHCP_CLIENT="/sbin/dhcpcd" to ifcfg-eth1 and tried again. Got much the same result, but with an additional warning line:

/etc/dhcpc/dhcpcd.exe: line 27: .: filename argument required .: usage: . filename

This was followed by the same warning as previously from ifup. Again, the connection looked fine from lvnet. Checked syslog and it confirmed that dhcpcd "timed out waiting for a valid DHCP server response" and dhclient received "No DHCPOFFERS" so used the "recorded lease".

This is as far as I have got. I don't understand many things, but 2 in particular:

1. why DHCP appears to fail when this way seems to provide an equally valid connection as the manual kludge using lvnet which works with DHCP. The DHCP server is running Mandrake 9.0 and therefore is not a zeroconf setup, but I don't see why this has an effect configuring in one way and not in the other.

2. How do I set this up so that ifup eth1 uses the appropriate key for the appropriate location? I can add a second key to KEY in ifcfg-eth1, but I don't see how to make ifup use one or the other, and as timing of insertion of the key appears to be critical to success or failure, I am afraid that iterating through the keys will simply result in ifup fixing on the one that is provided at the right time. And reading ifup-wireless, it looks to me like if KEY contains more than one key, both will be added, but there is neither will be selected. Particularly as "iwconfig eth1 key [1]" fails for me with "Error for wireless request "Set Encode" (8B2A) : SET failed on device eth1 ; Invalid argument". So I can set more than one key, but I can't choose which one I want! And even if the command worked, there is no provision in ifup-wireless to apply it.

I wondered if the following should work in principle: Setup the two keys in wireless.opts. Using network profiles, setup two ifcfg-eth1 configuration files, one with KEY='[1]' and the other with KEY='[2]'. Setup lilo with two boot options, one for each profile. /etc/pcmcia/wireless should then call iwconfig on any appropriate keys in wireless.opts, before ifup-wireless passes the relevant key number to iwconfig. One problem is, although /etc/pcmcia/wireless says it is called by network (/etc/pcmcia/network or /etc/rc.d/init.d/network?), I can't see where. But this part could presumably be made to work. The practical barriers at the moment are (a) Mandrake 9.1 stuffed up network profiles and (b) iwconfig doesn't want to accept a key number ([1]) as a parameter to enc/key. But is this how it should work?

And one final point - I haven't got close enough to being able to start eth1 during boot to check this on 9.1, but in 9.0, init.d/ypbind failed if the network card was the only connection, I believe because the scripts fired off in such short succession that ypbind had tried and failed to bind to the nisdomain before init.d/network had finished starting eth1, thereby allowing DHCP to fetch the nisdomain. Adding sleep 10 near the start of ypbind was a kludgy fix, but there really ought to be a more elegant solution.

Cheers,

Bruno Prior


----------- Compile errors:

ld -r -o /usr/src/apps/atmelwlandriver/objs/pcmf504.o fastvnet_cs.o
card.o command.o   interrupt.o mgmt.o rx.o tx.o vnet.o vnetlinux.o
nm /usr/src/apps/atmelwlandriver/objs/pcmf504.o |sort -u
 >/usr/src/apps/atmelwlandriver/objs/pcmf504.map;
make[3]: Leaving directory `/usr/src/apps/atmelwlandriver/src/Pcmcia_Pci'
make[2]: Leaving directory `/usr/src/apps/atmelwlandriver/src/Pcmcia_Pci'
make[1]: Leaving directory `/usr/src/apps/atmelwlandriver/src/Pcmcia_Pci'
make[1]: Entering directory
`/usr/src/apps/atmelwlandriver/src/apps/cmd_line'
gcc -DATMEL -O2 -g -I/usr/src/apps/atmelwlandriver/src/includes -o lvnet
-lncurses cofvnet.c sets.c bootcnf.c
In file included from /usr/include/linux/wireless.h:75,
                  from vnet.h:33,
                  from cofvnet.c:23:
/usr/include/linux/ethtool.h:18: parse error before "u32"
/usr/include/linux/ethtool.h:20: parse error before "advertising"
/usr/include/linux/ethtool.h:21: parse error before "speed"
/usr/include/linux/ethtool.h:22: parse error before "duplex"
/usr/include/linux/ethtool.h:23: parse error before "port"
[SNIP]
/usr/include/linux/ethtool.h:250: parse error before "data"
/usr/include/linux/ethtool.h:251: parse error before '}' token
In file included from /usr/include/linux/wireless.h:75,
                  from vnet.h:33,
                  from sets.c:21:
/usr/include/linux/ethtool.h:18: parse error before "u32"
/usr/include/linux/ethtool.h:20: parse error before "advertising"
/usr/include/linux/ethtool.h:21: parse error before "speed"
/usr/include/linux/ethtool.h:22: parse error before "duplex"
[SNIP]
/usr/include/linux/ethtool.h:250: parse error before "data"
/usr/include/linux/ethtool.h:251: parse error before '}' token
In file included from /usr/include/linux/wireless.h:75,
                  from vnet.h:33,
                  from bootcnf.c:22:
/usr/include/linux/ethtool.h:18: parse error before "u32"
/usr/include/linux/ethtool.h:20: parse error before "advertising"
/usr/include/linux/ethtool.h:21: parse error before "speed"
/usr/include/linux/ethtool.h:22: parse error before "duplex"
/usr/include/linux/ethtool.h:23: parse error before "port"
[SNIP]
/usr/include/linux/ethtool.h:250: parse error before "data"
/usr/include/linux/ethtool.h:251: parse error before '}' token
make[1]: *** [all] Error 1
make[1]: Leaving directory `/usr/src/apps/atmelwlandriver/src/apps/cmd_line'
make: *** [all] Error 2






Reply via email to