LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Thread Tools
Old 09-26-2002, 10:12 PM   #1
thanko
Member
 
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83
Thanked: 0
Linksys WAP11, WMP11 and linux-wlan Round II


[Log in to get rid of this advertisement]
I am still trying to get my wireless equipment running in Linux. I am able to use the Prism2 driver in 2.4.19 (and maybe earlier) but only briefly if WEP is enabled. With WEP disabled it works fine but I don't really like having my AP out there for just anyone. So...

Before I begin round 2, thanks go to Finegan for all the effort he expended on my behalf (and probably other as well). He's a wizard.

Round 2 begins.

I am SOOO close. I think once more WEP is in the way.

Following are the contents or relevant sections of some pertinent files.

First, contents of /etc/rc.local.

==========================
touch /var/lock/subsys/local

hdparm -c3 -d1 -u1 /dev/hda
hdparm -c3 -d1 -u1 /dev/hdb

# Enable IP masq support
echo "Enabling IP masq filters"
ipchains -P forward DENY
echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -A forward -i eth1 -j MASQ

modprobe prism2_pci
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
wlanctl-ng wlan0 lnxreq_autojoin ssid=linksys authtype=opensystem
ifconfig wlan0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255
route add default gw 192.168.0.1
============================

Second, output of ifconfig:

============================
wlan0 Link encap:Ethernet HWaddr 00:06:25:09:08:C0
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Memory:d08bb000-d08bc000
================================

As far as I can tell this is correct.

Third, output of iwconfig:

=============================
wlan0 IEEE 802.11-b ESSID:"linksys"
Mode:Managed Frequency:2.437GHz Access Point: 00:06:25:55:76:CE
Bit Rate:200kb/s
Link Quality:78/100 Signal level:-138 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
======================================

A couple of suspicious things here. First the transmit rate is very low. Second there is no mention of encryption. I think I turned it on (correct me if I am wrong) in wlan.conf which follows:

========================================
WLAN_DEVICES="wlan0"

wlandevice_config()
{
case "$1" in
*)
#=======ENABLE========================================
# Do we want to enable the card at all? Set to 'n' if you don't
# want the card initialized for normal operation. Helpful for
# (re)loading flash or for test purposes.
WLAN_ENABLE=y

#=======USER MIB SETTINGS=============================
# You can add the assignments for various MIB items
# of your choosing to this variable, separated by
# whitespace. The wlan-ng script will then set each one.
# Just uncomment the variable and set the assignments
# the way you want them.

#USER_MIBS="p2CnfRoamingMode=1"

#=======WEP===========================================
# [Dis/En]able WEP. Settings only matter if PrivacyInvoked is true
lnxreq_hostWEPEncrypt=false # true|false
lnxreq_hostWEPDecrypt=false # true|false
dot11PrivacyInvoked=true # true|false
dot11WEPDefaultKeyID=0 # 0|1|2|3
dot11ExcludeUnencrypted=false # true|false, in AP this means WEP
# is required for all STAs

# If PRIV_GENSTR is not empty, use PRIV_GENTSTR to generate
# keys (just a convenience)
PRIV_GENERATOR=/sbin/nwepgen # nwepgen, Neesus compatible
PRIV_KEY128=false # keylength to generate
PRIV_GENSTR=""

# or set them explicitly. Set genstr or keys, not both.
dot11WEPDefaultKey0=XX:XX:XX:XX:XX # format: xx:xx:xx:xx:xx or
dot11WEPDefaultKey1=XX:XX:XX:XX:XX # xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
dot11WEPDefaultKey2=XX:XX:XX:XX:XX # e.g. 01:20:03:40:05 or
dot11WEPDefaultKey3=XX:XX:XX:XX:XX # 01:02:03:04:05:06:07:08:09:0a:0b:0c:0d

#=======SELECT STATION MODE===================
IS_ADHOC=n # y|n, y - adhoc, n - infrastructure

#=======INFRASTRUCTURE STATION START===================
# SSID is all we have for now
AuthType="opensystem" # opensystem | sharedkey (requires WEP)
# Use DesiredSSID="" to associate with any AP in range
DesiredSSID="linksys"

#=======ADHOC STATION START============================
SSID="linksys" # SSID
BCNINT=100 # Beacon interval (in Kus)
CHANNEL=6 # DS channel for BSS (1-14, depends
# on regulatory domain)
BASICRATES="2 4" # Rates for mgmt&ctl frames (in 500Kb/s)
OPRATES="2 4 11 22" # Supported rates in BSS (in 500Kb/s)
;;
esac
}
===============================

I do not quite understand the explanation of wlan.conf in ../linux-wlan/doc/config.linux-wlan-ng, especially the part about the WEP section. There may be a problem here. I have tried the configuration you see here and one with all the variables in the WEP section set to true. I X'd out the keys for the obvious reason. These were obtained from the Windows setup, which work fine.

Relevant snippets of /var/log/messages

============================
Sep 26 21:40:33 localhost network: Bringing up interface wlan0: succeeded

Sep 26 21:40:43 localhost kernel: init_module: prism2_pci.o: 0.1.15 Loaded
Sep 26 21:40:43 localhost kernel: init_module: dev_info is: prism2_pci
Sep 26 21:40:43 localhost kernel: PCI: Found IRQ 11 for device 02:0d.0
Sep 26 21:40:43 localhost kernel: A Prism2.5 PCI device found, phymem:0xf47fd000, irq:11, mem:0xd08bb000
Sep 26 21:40:43 localhost kernel: ident: nic h/w: id=0x8013 1.0.0
Sep 26 21:40:43 localhost kernel: ident: pri f/w: id=0x15 1.1.0
Sep 26 21:40:43 localhost kernel: ident: sta f/w: id=0x1f 1.4.2
Sep 26 21:40:43 localhost kernel: MFI:SUP:role=0x00:id=0x01:var=0x01:b/t=1/1
Sep 26 21:40:43 localhost kernel: CFI:SUP:role=0x00:id=0x02:var=0x02:b/t=1/1
Sep 26 21:40:43 localhost kernel: PRI:SUP:role=0x00:id=0x03:var=0x01:b/t=4/4
Sep 26 21:40:43 localhost kernel: STA:SUP:role=0x00:id=0x04:var=0x01:b/t=1/9
Sep 26 21:40:43 localhost kernel: PRI-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1
Sep 26 21:40:43 localhost kernel: STA-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1
Sep 26 21:40:43 localhost kernel: STA-MFI:ACT:role=0x01:id=0x01:var=0x01:b/t=1/1
Sep 26 21:40:43 localhost kernel: Prism2 card SN: 0123456789\x00\x00
=============================

I am stumped at this point. I can ping my address but nothing else. Any suggestions will be appreciated.

Last edited by thanko; 09-26-2002 at 10:15 PM..
thanko is offline     Reply With Quote
Old 09-26-2002, 10:48 PM   #2
thanko
Member
 
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83
Thanked: 0

Original Poster
Ok, I found one mistake. In ifcfg-wlan0 I had DEVICE="eth0". I have changed that to wlan0 and now wlan0 fails to start on boot. The error I get in /var/log/messages is

SIOCSIFFLAGS: No such device.

Does this have to do with this statement from linux-wlan README:

"We don't currently create the soft-link from the runlevel directory to the wlan startup script because the distributions vary too much in this respect. You'll need to create the soft-link yourself."

If this is relevant, and I suspect it is, how do I create this soft-link?

Thanks again.
thanko is offline     Reply With Quote
Old 09-28-2002, 04:00 AM   #3
finegan
Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700
Thanked: 0
Unless you have the modules loaded before ifcfg-wlan0 inits, yeah its always going to hork, the device doesn't exist yet, it was changing settings to whatever eth0 is and piping all the errors, if there were any, to /dev/null.

If you put an entry in modules.conf that should take care of it, but really, I always modprobed p80211 and prism2_pci in /etc/rc.d/rc.local, and then manually set them with calls to ifconfig and route or simply dhcpcd.

If you try to put any wireless setting calls in ifcfg-wlan0, they're going to get ignored, the script will send arguments to "iwconfig", which the linux-wlan project's prism2_pci driver has never worked with. They ignore in-kernel wireless extensions, are not compatible at all, and any correct read you get off of the card from iwconfig is coincidental. All settings are made in that wlan startup script, so to make changes while the machine is on, you have to bring the device down, edit that script, and then run it again. Then of course ifconfig the device again.

About those soft links, they're if you want to do everything "properly" for start-up. Again, stick it all in rc.local is easiest. Heck, this should work:

modprobe p80211 (do they still have this module?)
modprobe prism2_pci
ifconfig wlan0 192.168.0.23 up (a guess at what your IP should be)
/etc/pcmcia/wlan-ng.opts (that's the script right?)
route add default gw 192.168.0.1 (a guess at your wireless router's IP)

Some of these toys just won't send or recieve a dhcp request right, but alternatively that last line could be:

dhcpcd wlan0

As for the .conf file, I've never used encryption, or more to the point, gotten it to work with the linux-wlan drivers, but that was very beta days, long ago.

lnxreq_hostWEPEncrypt=false # true|false
lnxreq_hostWEPDecrypt=false # true|false

These might have to be true.

Also, later on the list, you have the default key set to key0, which further down is blank... did you set the key to match the one on your router?

May I also recommend, these drivers, that work with iwconfig:

http://hostap.epitest.fi/

Luck,

Finegan

Last edited by finegan; 09-28-2002 at 04:02 AM..
finegan is offline     Reply With Quote
Old 09-28-2002, 03:04 PM   #4
thanko
Member
 
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83
Thanked: 0

Original Poster
Ok, Finegan, I took your advice and got the HostAP driver from the site in Finland. I wasn't getting anywhere with the linux-wlan drivers. These new drivers I think seem to be much better and easier to setup.

However, I'm still stuck just a little. I can ping my local pc but not the AP or anything else.

iwconfig wlan0 reports:

IEEE 802.11-DS ESSID:"linksys" Nickname:"localhost.localdomain"
Mode:Managed Frequency:2.437GHz Access Point: 00:06:25:55:76:CE
Bit Rate:11Mb/s Tx-Power=15 dBm Sensitivity:1/3
Retry min limit:8 RTS thr: off Fragment thr: off
Encryption key: 11E2-54BE-EB Encryption mode: Restricted
Power Management: off
Link Quality:90/92 Signal level:-12 dBm Noise level:-149 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

I think Encryption mode should be Open, right? How do I force that in ifcfg-wlan0 or should I do it in /etc/rc.local?

I think I was able to force it with:

ifconfig wlan0 key 11E2-54BE-EB open

but after keying that in I still could not ping the AP.

Do you have any further advice?

Last edited by thanko; 09-28-2002 at 03:06 PM..
thanko is offline     Reply With Quote
Old 09-28-2002, 09:33 PM   #5
finegan
Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700
Thanked: 0
First off, make certain that this driver works right un-encrypted, just to make certain the driver is doing the job right. After that I don't know, I got that driver to work with a 3com Airconnect that was giving me troubles under other driver packages, got it to talk 40-bit WEP, but that was at work.

Cheers,

Finegan
finegan is offline     Reply With Quote
Old 10-01-2002, 03:24 PM   #6
thanko
Member
 
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83
Thanked: 0

Original Poster
As far as I can tell, everytime I try encryption I run into problems. I'm going to leave encryption off for now. Maybe RedHat 8.0 has better drivers, etc.

I'm in process of retrieving the iso's now.

Thanks for helping, Finegan.
thanko is offline     Reply With Quote
Old 10-03-2002, 08:46 AM   #7
thanko
Member
 
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83
Thanked: 0

Original Poster
I think the linux-wlan drivers are what is going to work for me. I got the Red Hat 8.0 distro, installed it and tried the Prism drivers that are part of the kernel. The wireless connection again died after a few minutes. So I got the linux-wlan drivers, installed them, and now the connections has been running flawlessly for 14-15 hours. I was beating it up pretty good last night and it stayed up.

Thanks, everyone, for the help.
thanko is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PS2 mouse goes crazy [it goes round n round n round...] goci Linux - Hardware 2 10-09-2003 09:15 AM
How To Configure Wireless Pci Linksys Card Wmp11 Ver 2.7 On Mandrake Linux AKBARL Linux - Hardware 3 09-29-2003 09:08 PM
Linksys WMP11 and Linux timmelissa1 Linux - Networking 2 09-22-2002 05:54 AM
Linux Newb Needs Help with Linksys WMP11 SSTwinrova Linux - Networking 0 08-03-2002 11:12 PM
MRTG & Linksys WAP11 Avalon Linux - Networking 1 10-15-2001 11:06 PM


All times are GMT -5. The time now is 05:56 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration