Bug 530271

Summary: iwconfig can't set encryption for wlan0
Product: [Fedora] Fedora Reporter: Scott Doty <scott>
Component: wireless-toolsAssignee: Dan Williams <dcbw>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dcbw, linville
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-23 18:04:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Scott Doty 2009-10-22 05:33:43 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090909 Fedora/3.5.3-1.fc11 Firefox/3.5.3 GTB6

Oct 21 22:07:53 m5 kernel: wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK

_[/root]_(root@m5)_
# iwconfig wlan0 enc on key s:secret
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.

system-config-network reports:

Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.

Determining IP information for wlan0... failed; no link present.  Check cable?

This is ndiswrapper, wrapping bcmwl5 for this device:

03:00.0 Network controller: Broadcom Corporation BCM4328 802.11a/b/g/n (rev 03)

...which is built-in to this HP Pavilion tx 2000 laptop.



Reproducible: Always

Steps to Reproduce:
1.iwconfig wlan0 enc on key s:secret
or
2. try setting key with system-config-network > edit interface > wireless tab

Actual Results:  
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.

Expected Results:  
enabling encryption & setting the key


This seems like it could be incompatibilities between the tools & the api implemented by the driver.

# iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: 00:1E:58:F3:39:93
                    ESSID:"HeavensHalfAcre"
                    Protocol:IEEE 802.11g
                    Mode:Managed
                    Frequency:2.422 GHz (Channel 3)
                    Quality:56/100  Signal level:-60 dBm  Noise level:-96 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Extra:bcn_int=100
                    Extra:atim=0
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK

Comment 1 Dan Williams 2009-10-23 18:04:31 UTC
ndiswrapper is not supported:

http://fedoraproject.org/wiki/ForbiddenItems#Proprietary_Kernel_Drivers

you'll need to talk to the ndiswrapper folks to figure out why their driver is not accepting the arguments that iwconfig is passing; sounds like a failure of ndiswrapper to correctly handle valid WEXT parameters.

That said, if your WEP password is actually an *ASCII* passphrase (which is pretty rare these days) of 5 or 13 in length, then your usage of iwconfig is correct.  But if it's a hexadecimal WEP key (10 or 26 hex characters) then you don't want the 's:' in front.

If it's a WPA network, the you cannot use iwconfig, you need to use wpa_supplicant instead, because WPA requires a daemon to manage the connection.