View previous topic :: View next topic |
Author |
Message |
regnarts n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 23 Jun 2006 Posts: 34
|
Posted: Sat Nov 15, 2008 9:13 pm Post subject: Wacky WiFi Woes - b43legacy + wpa_supplicant [solved] |
|
|
After a lot of digging and a lot of trial and error, first trying with module wpa_supplicant and then finally succeeding with module iwconfig, I managed to connect wlan0 on my HP ze4430us laptop (with b43legacy loaded into the kernel as a module) to my D-Link WBR-1310 router. You can imagine my elation until I discovered a hiccup when I tried:
Code: | > /etc/init.d/net.wlan0 restart
* Caching service dependencies ... [ok]
* Unmounting network filesystems ... [ok]
* Stopping sshd ... [ok]
* Stopping wlan0
* Bringing down wlan0
* Stopping dhcpcd on wlan0 ...
* Shutting down wlan0 ...
* Starting wlan0
* Configuring wireless network for wlan0
* wlan0 connected to ESSID "dlink" at 00:15:E9:67:5D:9A
* in managed mode on channel 6 (WEP enabled)
* Bringing up wlan0
* dhcp
* Running dhcpcd ...
wlan0: dhcpcd 4.0.2 starting
wlan0: broadcasting for a lease
wlan0: offered 192.168.0.4 from 192.168.0.1
wlan0: checking 192.168.0.4 is available on attached networks
wlan0: timed out [!!]
* Trying fallback configuration
* 192.168.0.4 [ok]
* Mounting network filesystems ... [ok]
* Setting clock via the NTP client 'ntpdate' ...
* Failed to set clock [!!]
* Starting sshd ... [ok]
|
By the way, 192.168.0.4 is reserved on the router to the MAC of the 4306 on the ze4430us.
The problem:
Code: |
> route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo
> cat /etc/resolv.conf
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line
|
It should be:
Code: |
> route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 2000 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 2000 0 0 wlan0
> cat /etc/resolv.conf
# Generated by dhcpcd from wlan0
# /etc/resolv.conf.head can replace this line
search mydomain
nameserver 192.168.0.1
# /etc/resolv.conf.tail can replace this line
|
Sometimes cold booting works. Most of the time it doesn't help.
Of course, I can make it work again with:
Code: |
> route add default gw 192.168.0.1
> echo "search mydomain" >> /etc/resolv.conf
> echo "nameserver 192.168.0.1" >> /etc/resolv.conf
|
But that doesn't fix the problem.
Obviously, the issue with the default gateway routing and the nameserver must be in:
Code: |
> cat /etc/conf.d/net
config_eth0=("dhcp")
dns_domain="mydomain"
modules=("iwconfig")
key_dlink="[1] xx-xx-xx-xx-xx [1] enc open" # real WEP key here
config_dlink=("dhcp")
fallback_dlink=("192.168.0.4")
fallback_route_dlink=("default via 192.168.0.1")
dns_servers_dlink=("192.168.0.1")
|
Apparently, after fallback_dlink succeeds, fallback_route_dlink will be ignored? But why would dns_servers_dlink not add the nameserver to /etc/resolv.conf?
Also, from above:
wlan0: checking 192.168.0.4 is available on attached networks
wlan0: timed out [!!]
/var/log/messages seems to show that the lease on 192.168.0.4 is released when net.wlan0 is stopped or restarted. Why is it checking availability when dhcp on the router is offering the lease? Where is it checking for availability, and why is this timing out? Is zeroconf getting in the way here? (When I had difficulty getting dhcp on the router to offer an IP to wlan0, zeroconf would assign a strange IP to wlan0.)
I would much prefer to set this up with wpa_supplicant (WEP or WPA), but I can't deduce from available man pages and other documentation how to configure DHCP (per interface or per AP/ESSID) in conjunction with wpa_supplicant. Has anyone had any luck doing that?
And yes, I should switch from WEP to the more secure WPA, but I just haven't gone there yet.
Thanks in advance.
Last edited by regnarts on Sun Nov 16, 2008 3:28 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
regnarts n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 23 Jun 2006 Posts: 34
|
Posted: Sun Nov 16, 2008 3:28 am Post subject: |
|
|
I managed to solve the problem I had with wpa_supplicant. The hex keys in wpa_supplicant needs to be unquoted. And now I don't have the aforementioned issue with restarting wlan0. Everything works. For anyone trying to set up a BCM4306 Rev. 2, b43legacy kernel modules and wpa_supplicant might be the way to go. I was successful with the following configuration files:
Code: |
> cat /etc/conf.d/net
config_eth0=("dhcp")
config_wlan0=("dhcp")
dns_domain="mydomain"
modules_wlan0=("!iwconfig" "wpa_supplicant")
wpa_supplicant_wlan0="-D wext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf"
|
Code: |
> cat /etc/wpa_supplicant/wpa_supplicant.cnf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
network={
ssid="dlink"
key_mgmt=NONE
wep_key0=aabbccddee
wep_tx_keyidx=0
priority=5
}
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|