LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 02-26-2004, 10:42 AM   #1
NLawrence
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Rep: Reputation: 0
Enabling WEP keys with iwconfig on RH8?


I'm using a Microsoft MN-510 USB on Red Hat 8, running the 2.4.18-14 kernel, and trying to set up my wireless network. I've run wlan-ng...whenever I run wlan start, the first four script lines run fine, but all the ones after it fail.

The last lines in dmesg return this:

Linkstatus : ASSOCFAIL (unhandled)
Linkstatus : Connected

When I run iwlist wlan0 enc, it gives me this:

wlan0 2 Key Sizes : 40, 104 bits
4 Keys available :
[1]: Off
[2]: Off
[3]: Off
[4]: Off
Current transmit key : [1]
Encryption mode : restricted

Here's the iwconfig output...

[root@localhost root]# iwconfig
lo no wireless extensions.

wlan0 IEEE 802.11-b ESSID:""
Mode:Managed Frequency:2.437GHz Access Point: 00:0D:3A:22:2A:B6
Bit Rate:2Mb/s Tx-Power:2346 dBm
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:off
Link Quality:56/92 Signal level:-58 dBm Noise level:-98 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


This is the last part of the dmesg output -- If you need all of it (Very long) I can post that.

hub.c: USB new device connect on bus2/2, assigned device number 2
divert: allocating divert_blk for wlan0
ident: nic h/w: id=0x8010 1.0.0
ident: pri f/w: id=0x15 1.1.2
ident: sta f/w: id=0x1f 1.5.1
MFI:SUP:role=0x00:id=0x01:var=0x01:b/t=1/1
CFI:SUP:role=0x00:id=0x02:var=0x02:b/t=1/1
PRI:SUP:role=0x00:id=0x03:var=0x01:b/t=1/4
STA:SUP:role=0x00:id=0x04:var=0x01:b/t=1/10
PRI-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1
STA-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1
STA-MFI:ACT:role=0x01:id=0x01:var=0x01:b/t=1/1
Prism2 card SN: \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
linkstatus=ASSOCFAIL (unhandled)
linkstatus=CONNECTED


I don't know if this is the right command or not, but whenever I try to turn the key 'on,' I get this:

[root@localhost root]# iwconfig wlan0 key on
Error for wireless request "Set Encode" (8B2A) :
SET failed on device wlan0 ; Function not implemented.


If any of y'all can help me get this up, I'd be really thankful.

Last edited by NLawrence; 02-26-2004 at 10:50 AM.
 
Old 02-26-2004, 12:06 PM   #2
beyer42
Member
 
Registered: Dec 2003
Location: San Jose
Distribution: Redhat WS 3
Posts: 410

Rep: Reputation: 30
iwconfig wlan0 key restricted [1] xxxxxxxxxx

Look at /etc/sysconfig/network-scripts/ifup-wireless for
the settings you can add to /etc/sysconfig/network-scripts/ifcfg-wlan0

ifcfg-wlan0 can be created by hand from another ifcfg-* file if it does not exist.
 
Old 02-26-2004, 12:35 PM   #3
NLawrence
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Original Poster
Rep: Reputation: 0
Awesome. Thanks a lot, man. You saved me from a sure trip to the mental hospital... One more day of Windows and I'd have surely gouged my eyes out with blunt objects.
 
Old 02-26-2004, 01:22 PM   #4
NLawrence
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Original Poster
Rep: Reputation: 0
I spoke too soon -- After about three minutes, my connection drops for seemingly no reason. Any thoughts on this, or what I should do?
 
Old 02-26-2004, 04:38 PM   #5
NLawrence
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Original Poster
Rep: Reputation: 0
Now I'm back to where I was --

Prism2 card SN: \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
linkstatus=ASSOCFAIL (unhandled)
linkstatus=CONNECTED

And whenever I try and pass

iwconfig wlan0 key restricted [1] xxxxxxxxxx (with my key)

through iwconfig, I get this message:

Error for wireless request "SET ENCRYPT" (8B2A) :
SET failed on device wlan0 ; function not implemented

What does this mean? I get the same thing every time Linux is loading and it runs /etc/init.d/network start...
But when I'm in Gnome and using the terminal, having loaded wlan start, I don't get this -- But trying to pass the key setting into iwconfig, I still get that error -- I tried with other things, too, the ESSID and Channel, and I still get the same general message.

I'm -really- confused and exasperated right now...
 
Old 02-26-2004, 05:15 PM   #6
beyer42
Member
 
Registered: Dec 2003
Location: San Jose
Distribution: Redhat WS 3
Posts: 410

Rep: Reputation: 30
in ifcfg-wlan0 enclose the settings for KEY in double quotes.

KEY="restricted [1] xxxxxxxxxx"
 
Old 02-26-2004, 06:06 PM   #7
NLawrence
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Original Poster
Rep: Reputation: 0
Still no dice. Here's a copy of my wlancfg:

#=======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 p2CnfShortPreamble=mixed"

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

# 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=C4:BC:EA:2C:1A:0C:9E:BD:33:91:C8:50:1B
dot11WEPDefaultKey1= #
dot11WEPDefaultKey2= # e.g. 01:20:03:40:05 or
dot11WEPDefaultKey3= # 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 ===================
# What kind of authentication?
AuthType="sharedkey" # opensystem | sharedkey (requires WEP)

#======= ADHOC STATION ============================
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)


This is the ifcfg-wlan0:

DEVICE=wlan0
MODE=Managed
CHANNEL=6
RATE=Auto
NWID=NTLL
KEY="restricted [1] C4BCEA2C1A0C9EBD3391C8501B"
ONBOOT=yes
BOOTPROTO=DHCP # change this to static to specify an IP addr
IPADDR=192.168.2.38
GATEWAY=192.168.2.1
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.2.255
GATEWAYDEV=wlan0 # this is for setting default route
TYPE=Ethernet
USERCTL=yes
PEERDNS=yes # this lets DHCP define the DNS setup

This is what I do after booting:

/etc/init.d/wlan start
ifconfig wlan0 up
iwconfig wlan0


After this last time, my dmesg read:


Linux version 2.4.18-14 (bhcompile@stripples.devel.redhat.com) (gcc version 3.2
20020903 (Red Hat Linux 8.0 3.2-7)) #1 Wed Sep 4 11:57:57 EDT 2002
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000000fffc000 (usable)
BIOS-e820: 000000000fffc000 - 000000000ffff000 (ACPI data)
BIOS-e820: 000000000ffff000 - 0000000010000000 (ACPI NVS)
BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
255MB LOWMEM available.
On node 0 totalpages: 65532
zone(0): 4096 pages.
zone(1): 61436 pages.
zone(2): 0 pages.
Kernel command line: ro root=LABEL=/
Initializing CPU#0
Detected 449.125 MHz processor.
Speakup v-1.00 CVS: Tue Jun 11 14:22:53 EDT 2002 : initialized
Console: colour VGA+ 80x25
Calibrating delay loop... 894.56 BogoMIPS
Memory: 253528k/262128k available (1193k kernel code, 6172k reserved, 984k data, 200k init, 0k highmem)
Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode cache hash table entries: 16384 (order: 5, 131072 bytes)
Mount cache hash table entries: 4096 (order: 3, 32768 bytes)
ramfs: mounted with options: <defaults>
ramfs: max_pages=31946 max_file_pages=0 max_inodes=0 max_dentries=31946
Buffer cache hash table entries: 16384 (order: 4, 65536 bytes)
Page-cache hash table entries: 65536 (order: 6, 262144 bytes)
CPU: Before vendor init, caps: 008021bf 808029bf 00000000, vendor = 2
CPU: L1 I Cache: 32K (32 bytes/line), D cache 32K (32 bytes/line)
CPU: After vendor init, caps: 008021bf 808029bf 00000000 00000002
CPU: After generic, caps: 008021bf 808029bf 00000000 00000002
CPU: Common caps: 008021bf 808029bf 00000000 00000002
CPU: AMD-K6(tm) 3D processor stepping 0c
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: AMD K6
PCI: PCI BIOS revision 2.10 entry at 0xf0720, last bus=1
PCI: Using configuration type 1
PCI: Probing PCI hardware
Unknown bridge resource 0: assuming transparent
PCI: Using IRQ router ALI [10b9/1533] at 00:07.0
isapnp: Scanning for PnP cards...
isapnp: Card 'U.S.Robotics Inc. Sportster 33600 Fax Internal'
isapnp: 1 Plug & Play card detected total
speakup: initialized device: /dev/synth, node (MAJOR 10, MINOR 25)
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
apm: BIOS version 1.2 Flags 0x0b (Driver version 1.16)
Starting kswapd
VFS: Diskquotas version dquot_6.5.0 initialized
Detected PS/2 Mouse Port.
pty: 512 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT SHARE_IRQ SERIAL_PCI ISAPNP enabled
ttyS0 at 0x03f8 (irq = 4) is a 16550A
ttyS1 at 0x02f8 (irq = 3) is a 16550A
ttyS2 at port 0x03e8 (irq = 5) is a 16550A
Real Time Clock Driver v1.10e
block: 480 slots per queue, batch=120
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ALI15X3: IDE controller on PCI bus 00 dev 78
PCI: No IRQ known for interrupt pin A of device 00:0f.0. Please try using pci=biosirq.
ALI15X3: chipset revision 193
ALI15X3: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:DMA, hdd:pio
hda: WDC WD400BB-00GFA0, ATA DISK drive
hdb: QUANTUM FIREBALL SE2.1A, ATA DISK drive
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
hdc: Maxtor 7540 AV, ATA DISK drive
hdd: CD-ROM CDU55E, ATAPI CD/DVD-ROM drive
ide2: ports already in use, skipping probe
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=4865/255/63, (U)DMA
hdb: 4124736 sectors (2112 MB) w/80KiB Cache, CHS=1023/64/63, (U)DMA
hdc: 1055020 sectors (540 MB) w/32KiB Cache, CHS=1046/16/63, DMA
ide-floppy driver 0.99.newide
Partition check:
hda: hda1
hdb: hdb1 hdb2 hdb3
hdc: [PTBL] [523/32/63] hdc1
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
NET4: Frame Diverter 0.46
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
ide-floppy driver 0.99.newide
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 32768)
Linux IP multicast router 0.06 plus PIM-SM
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 125k freed
VFS: Mounted root (ext2 filesystem).
Journalled Block Device driver loaded
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Freeing unused kernel memory: 200k freed
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
PCI: Found IRQ 12 for device 00:02.0
PCI: Setting latency timer of device 00:02.0 to 64
usb-ohci.c: USB OHCI at membase 0xd0844000, IRQ 12
usb-ohci.c: usb-00:02.0, Acer Laboratories Inc. [ALi] USB 1.1 Controller
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Found IRQ 10 for device 00:0b.0
usb-ohci.c: USB OHCI at membase 0xd0846000, IRQ 10
usb-ohci.c: usb-00:0b.0, OPTi Inc. 82C861
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
hid-core.c: USB HID support drivers
mice: PS/2 mouse device common for all mice
hub.c: USB new device connect on bus2/2, assigned device number 2
usb.c: USB device not accepting new address=2 (error=-110)
hub.c: USB new device connect on bus2/2, assigned device number 3
usb.c: USB device 3 (vend/prod 0x45e/0x6e) is not claimed by any active driver.
EXT3 FS 2.4-0.9.18, 14 May 2002 on ide0(3,66), internal journal
Adding Swap: 524152k swap-space (priority -1)
init_module: prism2_usb.o: 0.2.0 Loaded
init_module: dev_info is: prism2_usb
usb.c: registered new driver prism2_usb
divert: allocating divert_blk for wlan0
kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.18, 14 May 2002 on ide0(3,65), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
ip_tables: (C) 2000-2002 Netfilter core team
ide-floppy driver 0.99.newide
hdd: ATAPI 2X CD-ROM drive, 256kB Cache
Uniform CD-ROM driver Revision: 3.12
ident: nic h/w: id=0x8010 1.0.0
ident: pri f/w: id=0x15 1.1.2
ident: sta f/w: id=0x1f 1.5.1
MFI:SUP:role=0x00:id=0x01:var=0x01:b/t=1/1
CFI:SUP:role=0x00:id=0x02:var=0x02:b/t=1/1
PRI:SUP:role=0x00:id=0x03:var=0x01:b/t=1/4
STA:SUP:role=0x00:id=0x04:var=0x01:b/t=1/10
PRI-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1
STA-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1
STA-MFI:ACT:role=0x01:id=0x01:var=0x01:b/t=1/1
Prism2 card SN: \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
linkstatus=CONNECTED

iwlist wlano key is still:

wlan0 2 key sizes : 40, 104bits
4 keys available :
[1]: off
[2]: off
[3]: off
[4]: off
Current Transmit Key: [1]
Encryption mode:restricted

But I'm still unable to connect to anything -- I'm able to ping the router, and connect to the management tool (192.168.2.1), but all the websites time out.
 
Old 02-26-2004, 06:24 PM   #8
beyer42
Member
 
Registered: Dec 2003
Location: San Jose
Distribution: Redhat WS 3
Posts: 410

Rep: Reputation: 30
Try in ifcfg-wlan0

Remove settings for
IPADDR
RATE

Change NWID to ESSID

Also try using 40 bit key instead to see if you have better luck.
 
Old 02-26-2004, 08:49 PM   #9
NLawrence
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Original Poster
Rep: Reputation: 0
Removed the IPADDR and RATE, NWID just told ESSID what my name is --

Turns out, all I had to do was run /etc/init.d/wlan start & network start, then run dhclient. All's peachy, my only question now is how I extend the IP lease.

Thank you -very- much, btw.
 
Old 02-26-2004, 08:59 PM   #10
beyer42
Member
 
Registered: Dec 2003
Location: San Jose
Distribution: Redhat WS 3
Posts: 410

Rep: Reputation: 30
on my linksys wireless router you can set the minutes of a lease, default is zero which is one day.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rotating WEP keys. Jerrac Linux - Wireless Networking 2 08-16-2005 12:57 PM
can fedora handle ascii strings for wep keys? ehawk Linux - Wireless Networking 1 10-13-2004 06:34 PM
WEP configuration using iwconfig clue=0 Linux - Wireless Networking 1 08-28-2004 08:53 PM
Enabling arrow keys for history recall subu_s General 1 06-18-2004 07:30 AM
iwconfig and aironet350 and dhclient in RH8.0 sdwike Linux - Networking 0 02-14-2003 05:05 PM


All times are GMT -5. The time now is 05:31 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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration