Freebsd 8.0 Wireless Issue: bwi, wep, wpa_supplicant

Hello everyone. I have been google searching for a couple of days, as well as searching on this forum, and now I am quite stumped :p. I have a pc with a Broadcom 4318 wireless card, I have enabled the drivers and the firmware. The green LED on my card blinks when I enter

"ifconfig wlan0 up"

However, I cannot connect to my router which has WEP encryption. ( below is are the contents of rc.conf, loader.conf, and wpa_supplicant. The question is continued below that)

contents of /etc/rc.conf
Code:
hostname="amitbsd.gateway.2wire.net"
ifconfig_wlan0="DHCP"
ifconfig_em0="DHCP"
ipv6_enable="YES"
dbus_enable="YES"
hald_enable="YES"
vaps_bwi0="wlan0"
wlans_bwi0="wlan0"
wpa_supplicant_enable="YES"
wpa_supplicant_conf_file=" /etc/wpa_supplicant.conf"
devfs_system_ruleset="localrules"
contents of /boot/loader.conf
Code:
snd_hda_load="YES"
nvidia_load="YES"
if_bwi_load="YES"
bwi_v3_ucode_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
if_vlan_load="YES"
contents of wpa_supplicant
Code:
network={
key_mgmt=NONE
ssid="2WIRE860"
wep_key3=mykey
wep_tx_keyidx=3
}
Whenever I enter the command
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf

it hangs at

Code:
CTRL-EVENT-SCAN-RESULTS 
Trying to associate with 00:14:95:c5:d3:81 (SSID='2WIRE860' freq=2422 MHz)
Associated with 00:14:95:c5:d3:81
CTRL-EVENT-CONNECTED - Connection to 00:14:95:c5:d3:81 completed (auth) [id=0 id_str=]

I hit ctrl+c and I get this

Code:
CTRL-EVENT-TERMINATING - signal 2 received
ioctl[SIOCS80211, op 20, len 7]: Can't assign requested address
ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
Failed to disable WPA in the driver.
ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
ELOOP: remaining socket: sock=4 eloop_data=0x28406140 user_data=0x2840d040 handler=0x8069f40
If I don't hit ctrl+c, ill open up another terminal and type "ifconfig" and the status for "wlan0" will be "associated" instead of "active"

I've tried combinations of things like ifconfig_wlan0="DHCP" to ifconfig_wlan0=" WPA DHCP". However nothing has worked. Also, the output of dmesg shows the following

Code:
bwi0: need multicast update callback.
I'm quite lost, and I don't really know where to go from here. If I need to post any additional information please let me know. Thanks in advance :)
 
avkhatri said:
Hello everyone. I have been google searching for a couple of days, as well as searching on this forum, and now I am quite stumped :p. I have a pc with a Broadcom 4318 wireless card, I have enabled the drivers and the firmware.

Let's eliminate all but the minimum you need. You've got a lot of other entries which are optional or defaults or overcomplicated.

/boot/loader.conf
Code:
bwi_v3_ucode_load="YES"
if_bwi_load="YES"

/etc/rc.conf
Code:
wlans_bwi0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"

wpa_supplicant will be run by the startup scripts when they detect that "WPA" in the ifconfig line, you don't need to enable it separately. The SYNCDHCP means it will wait until DHCP has gotten a lease before it goes on.

(Note: wpa_supplicant is supposed to work with WEP but I've never tried it, so can't speak to your wpa_supplicant.conf file.)

Those lines in the config files are the automated equivalent of these commands:

Code:
# kldload bwi_v3_ucode
# kldload if_bwi
# ifconfig wlan0 create wlandev bwi0
# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
# dhclient wlan0

Another note: older Broadcom devices work with bwi, and the newer ones work with bwn. There may be some overlap.
 
Wblock, thank you for your quick reply. :)

My card now enables itself during boot! However I am still having problems connecting. During the boot process I see

Code:
Starting wpa_supplicant 
bwi0 need multicast update callback 
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7 
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
(it continues to try different intervals and then gives up).

When I ifconfig after logging in, wlan0 still shows itself as "associated" instead of active.

ALSO, I noticed that near the beginning of the boot process i see

Code:
bwi0: invalid antenna gain in sprom
I don't know what that means, but could that have anything to do with it? (i might try unplugging and re-plugging the wireless card from my mobo, seeing as I have swapped it once before, maybe something isn't sitting in right?

You also mentioned how newer broadcom devices work with bwn. I bought this computer about 3 years ago, maybe bwn might work :p. How would I go about switching from bwi to bwn? Do i switch all of the arguments in the conf files to bwn instead of bwi?
 
OH, i'd like to add that this is a wireless card that is plugged into a pci slot, not a USB. I read something somewhere about bwn working for pci cards.
 
When associated with an access point, wlan0 should say status: associated.

bwn is about the same as bwi. You have to install a different port for the firmware and change the firmware name.

Both bwi and bwn have had some recent updates. If you're not running 8.1, it would be worthwhile to update to have the latest code.
 
Oh ok, even though it says "associated" I still can't get internet :(. I have a feeling I'm making a really small error somewhere (I tend to do that a lot haha). I'll look more into bwn or updating to 8.1, I'm all out of ideas :beer:
 
man wpa_cli? I used that while configuring a
usb device (having failed at ndisgen). Don't remember
if it helped, I tried others' wpa_supplicant.conf's
til one worked.
 
I had some free time this weekend, and did some reading. Looks like updating to freebsd 8.1 is the way to go.
According to this page

http://www.freebsd.org/releases/8.1R/relnotes-detailed.html#PROC

Under the section "Network Interface Support" it states that the bwn4 driver now supports the BCM43xx series (the series I have). I am following the instructions in the Freebsd manual to upgrade my system from 8.0 to 8.1. I will post back when I have more :).
 
I have similar issues with 8.1-RELEASE(i386) with new HP ProBook.

Code:
siba_bwn0: <Broadcom BCM4312 802.11b/g Wireless> mem 0xd8200000-0xd8203fff irq 17 at device 0.0 on pci3
bwn0 on siba_bwn0
bwn0: WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO (manuf 0x17f ver 0x2062 rev 2)
bwn0: DMA (64 bits)
bwn0: Using 1 MSI messages
bwn0: [FILTER]
bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)

Seems that broadcasting doesn't work. After successful association with WPA2 router, dhclient doesn't receive any address. If i configure the interface manually, everything works. When dhclient runs, i get these;

Code:
bwn0: need multicast update callback
 
Looks like 8.1 didn't do it for me. I am having the same problems stated in my original post and similar to Zare I am getting

Code:
 bwi0: need multicast update callback
.
 
avkhatri said:
Looks like 8.1 didn't do it for me. I am having the same problems stated in my original post and similar to Zare I am getting

Code:
 bwi0: need multicast update callback
.

Those show up even when it's working, or at least they have on the two different variations of Broadcom cards I've tested.

The quick cure is to replace the Broadcom card with an Atheros B/G card (not B/G/N, though).

The longer but more correct way is to submit a PR. It's possible to turn off DMA on the bwn variety, but I don't know if bwi has that sysctl.
 
Back
Top