Gentoo Archives: gentoo-user

From: Drew Tomlinson <drew@××××××××××××××.net>
To: Gentoo User <gentoo-user@l.g.o>
Subject: [gentoo-user] Trouble Getting Wireless Networking Configured
Date: Wed, 27 Jun 2007 01:44:47
Message-Id: 4681BFB0.7080607@mykitchentable.net
I have a Gateway 6454 laptop with 2.6.21-gentoo-r3 amd64 kernel running. 
I am trying to set up the wireless network.  I have never done this 
before so I started with the Handbook's Wireless Networking section.  I 
begin by attempting to figure out what network card I have. lspci 
reports the wireless network chip as:

05:00.0 Network controller: Broadcom Corporation BCM94311MCG wlan 
mini-PCI (rev 01)

Thus it seems the bcm43xx driver is what I need.  I selected it to 
compile as a module with DMA+PIO transfer mode selected.  Along with it, 
I compiled:

<M>   Generic IEEE 802.11 Networking Stack
---     IEEE 802.11 WEP encryption (802.1x)
<M>     IEEE 802.11i CCMP support
<M>     IEEE 802.11i TKIP encryption
<M>     Software MAC add-on to the IEEE 802.11 networking stack

I wasn't sure exactly what I needed so I compiled all as modules and 
loaded all.  My though was that once I had it working, I would remove 
modules to see what I really needed.

Googling revealed something about cutting firmware.  Thus I emerged 
bcm43xx-fwcutter and followed some tidbits I found on the web about how 
that worked.  First I grabbed the latest Windows driver and copied 
bcmwl564.sys (since I am using an amd64 kernel).  When running 
bcm43xx-fwcutter -i bcmwl564.sys, I got the following error/output:

*** WARNING ***
This file contains new version4
firmware. v4 firmware is _not_ supported by
the driver in mainline kernels. For v4 firmware
you need latest bcm43xx development version
(wireless-dev kernel tree). If you don't know what
this warning is about, use a 3.xx.xx.xx driver version
instead to extract the firmware.

Well I couldn't find a version 3 driver and I have no idea how to use 
the "wireless-dev kernel tree" even after Googling for another hour.  
However I did find a Linux driver for the BCM43xx named "wl_apsta.o" but 
I really don't know much about it.  Thus I extracted firmware from that 
and copied it to /libs/firmware.  An 'ifconfig eth1 up' and now I was 
able to get the wireless card recognized:

eth1      Link encap:Ethernet  HWaddr 00:14:A5:FC:3B:B2 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:29319 overruns:0 frame:0
          TX packets:91345 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:184 (184.0 b)  TX bytes:4141799 (3.9 Mb)
          Interrupt:17

Anyway, next I continued following the Gentoo Handbook on Wireless 
Networking 
(http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4), 
specifically the WPA Supplicant section.  Here's the contents of the 
files I created pursuant to that page:

tagalong ~ # cat  /etc/conf.d/net
# From http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4
# Prefer wpa_supplicant over wireless-tools
modules=( "wpa_supplicant" )

# It's important that we tell wpa_supplicant which driver we should
# be using as it's not very good at guessing yet
wpa_supplicant_eth1="-Dwext"

tagalong ~ # cat  /etc/wpa_supplicant/wpa_supplicant.conf
# The below line not be changed otherwise we refuse to work
ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration
ctrl_interface_group=0

# Let wpa_supplicant take care of scanning and AP selection
ap_scan=1

# This is a network block that connects to any unsecured access point.
# We give it a low priority so any defined blocks are preferred.
network={
       key_mgmt=NONE
       priority=-9999999
}

network={
  ssid="DrewNet"
  key_mgmt=NONE
  key_mgmt=NONE
  wep_key0="ffffffffff"   # not the real keys - but then it's WEP so
  wep_key1="ffffffffff"   # am I hiding them?  :)
  wep_key2="ffffffffff"
  wep_key3="ffffffffff"
  wep_tx_keyidx=0
  priority=5
}

Now when I fire up wpa_supplicant, it seems to associate:

wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -ieth1 -d
Initializing interface 'eth1' conf 
'/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' 
ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> 
'/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='0' (DEPRECATED)
ap_scan=1
Priority group 5
   id=0 ssid='DrewNet'
Initializing interface (2) 'eth1'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=18 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:14:a5:fc:3b:b2
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
ctrl_interface_group=0
Added interface eth1
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b06 len=12
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan 
to speed up initial association
Received 268 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 5
Try to find WPA-enabled AP
0: 00:0f:b5:17:d7:fc ssid='DrewNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
Try to find non-WPA AP
0: 00:0f:b5:17:d7:fc ssid='DrewNet' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   selected non-WPA AP 00:0f:b5:17:d7:fc ssid='DrewNet'
Trying to associate with 00:0f:b5:17:d7:fc (SSID='DrewNet' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: clearing own WPA/RSN IE
No keys have been configured - skip key clearing
wpa_driver_wext_set_key: alg=1 key_idx=0 set_tx=1 seq_len=0 key_len=10
wpa_driver_wext_set_key: alg=1 key_idx=1 set_tx=0 seq_len=0 key_len=10
wpa_driver_wext_set_key: alg=1 key_idx=2 set_tx=0 seq_len=0 key_len=10
wpa_driver_wext_set_key: alg=1 key_idx=3 set_tx=0 seq_len=0 key_len=10
wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_wext_associate
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b06 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b04 len=16
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b1a len=23
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b19 len=16

OK, so good.  Now I issue a DHCP request as so:

tagalong ~ # dhcpcd -dd eth1
Info, eth1: dhcpcd 3.0.17 starting
Info, eth1: hardware address = 00:14:a5:fc:3b:b2
Info, eth1: broadcasting for a lease
Debug, eth1: sending DHCP_DISCOVER with xid 0x500d3c30
Debug, eth1: waiting on select for 20 seconds
Debug, eth1: sending DHCP_DISCOVER with xid 0x500d3c30
Debug, eth1: sending DHCP_DISCOVER with xid 0x500d3c30
Debug, eth1: sending DHCP_DISCOVER with xid 0x500d3c30
Debug, eth1: sending DHCP_DISCOVER with xid 0x500d3c30
Debug, eth1: sending DHCP_DISCOVER with xid 0x500d3c30
Debug, eth1: sending DHCP_DISCOVER with xid 0x500d3c30
Error, eth1: timed out
Info, eth1: exiting

I ran tcpdump on eth1 and no packets are leaving the interface. Thus I 
assume that's why I'm not getting an address.  The DHCP server has no 
problems with other machines on my network.  The Wireless access point 
works with other devices too.  So I'm stumped.  Is this related to 
firmware?  Other ideas?

I appreciate you reading this far and will gladly accept any suggestions.

Thanks,

Drew

-- 
Be a Great Magician!
Visit The Alchemist's Warehouse

http://www.alchemistswarehouse.com


-- 
gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Trouble Getting Wireless Networking Configured Randy Barlow <randy@×××××××××××××××××.com>