# Broadcom WiFi



## lissyara (Feb 26, 2009)

hi!
Year or more ago, Sam Leffler porting bwi driver to FreeBSD.
But, it was not commited to source tree, because some errors appeared.
Now, we have work driver for old BroadCom WiFi devices. It work for i384/amd64, 8-CURRENT/7.x
http://paradox.lissyara.su/bwi.02c.tar.bz2 - soucre code
=======
I think, it would be good if code is commited to source tree.


----------



## lme@ (Feb 26, 2009)

Could you please send this as a PR and tell others about it on current@freebsd.org mailing list?

Thanks a lot for the driver, btw!


----------



## alie (Feb 26, 2009)

can i use it for Broadcom 4322AGN ?


----------



## lissyara (Feb 26, 2009)

You can test it with this card.
It work for me with BCM4306, and not work for me with BCM4312 =(
Summary: if adapter PCI-E - it not work, If PCI/PCMCI - work. (maybe =))
Some instructions - http://forum.lissyara.su/viewtopic.php?f=5&t=10250 (russian, but - listings and instructions in english)
In first post - link for 7.x driver
======
2 lme@
It modifying by paradox, not me. Thanks to him =)
I send pr, later, trough 5-6 hours.


----------



## lissyara (Feb 26, 2009)

In perforce is a working driver.
All that needs to be done to change one line in one file - bwimac.c

```
-/* MAC */static const uint8_t bwi_sup_macrev[] = { 2, 4, 5, 6, 7, 9, 10, 12 };
+/* MAC */static const uint8_t bwi_sup_macrev[] = { 2, 4, 5 };
```
This remove all the new revision of the processor cards.

For new revision cards need to write a completely new driver.


----------



## nikobordx (Mar 2, 2009)

Hi,
I've tried this driver, but when i load if_bwi.ko, i have this message:


```
bwi0: <Broadcom BCM4311 802.11 Wireless Lan> irq 18 at device 0.0 on pci6
bwi0: 0x4000 bytes of rid 0x10 res 3 failed (0, 0xffffffff).
bwi0: cannot map register space
device_attach: bwi0 attach returned 6
```

Some people know what is the problem ?
I'm under FreeBSD-8 Current of today.

Thanks in advance.
Niko.


----------



## paradox (Mar 2, 2009)

try boot without acpi support

it's problem of acpi allocator in freebsd


----------



## nikobordx (Mar 2, 2009)

Hi paradox,
Thanks for your response.

But when i boot with or without acpi, i have the same error !
Another idea to try ?

Niko.


----------



## paradox (Mar 2, 2009)

try check asl for errors and fixx it

my be some help you this link
http://www.freebsd.org/doc/en/books/handbook/acpi-debug.html

which hardware are you use?


----------



## nikobordx (Mar 2, 2009)

This my card:


```
none1@pci0:6:0:0:	class=0x028000 card=0x1364103c chip=0x431114e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'Dell Wireless 1390 WLAN Mini-PCI Card'
    class      = network
```

Acpi seem to be working fine, but i tried to check asl for error tomorrow.

Niko.


----------



## paradox (Mar 2, 2009)

show me your
pciconf -lvbc


----------



## nikobordx (Mar 2, 2009)

This is the pciconf -lvbc:


```
hostb0@pci0:0:0:0:	class=0x060000 card=0x30a5103c chip=0x27a08086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '955XM/945GM/PM/GMS/940GML Express Processor to DRAM Controller'
    class      = bridge
    subclass   = HOST-PCI
    cap 09[e0] = vendor (length 9) Intel cap 5 version 1
vgapci0@pci0:0:2:0:	class=0x030000 card=0x30a5103c chip=0x27a28086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Mobile 945GM/GU Express Integrated Graphics Controller'
    class      = display
    subclass   = VGA
    bar   [10] = type Memory, range 32, base 0xd0200000, size 524288, enabled
    bar   [14] = type I/O Port, range 32, base 0x1800, size  8, enabled
    bar   [18] = type Prefetchable Memory, range 32, base 0xc0000000, size 268435456, enabled
    bar   [1c] = type Memory, range 32, base 0xd0300000, size 262144, enabled
    cap 05[90] = MSI supports 1 message 
    cap 01[d0] = powerspec 2  supports D0 D3  current D0
vgapci1@pci0:0:2:1:	class=0x038000 card=0x30a5103c chip=0x27a68086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Mobile 945GM/GU Express Integrated Graphics Controller'
    class      = display
    bar   [10] = type Memory, range 32, base 0xd0280000, size 524288, enabled
    cap 01[d0] = powerspec 2  supports D0 D3  current D0
hdac0@pci0:0:27:0:	class=0x040300 card=0x30a5103c chip=0x27d88086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) High Definition Audio'
    class      = multimedia
    subclass   = HDA
    bar   [10] = type Memory, range 64, base 0xd0340000, size 16384, enabled
    cap 01[50] = powerspec 2  supports D0 D3  current D0
    cap 05[60] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[70] = PCI-Express 1 type 0
pcib1@pci0:0:28:0:	class=0x060400 card=0x30a5103c chip=0x27d08086 rev=0x01 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) PCIe Root Port'
    class      = bridge
    subclass   = PCI-PCI
    cap 10[40] = PCI-Express 1 root port
    cap 05[80] = MSI supports 1 message 
    cap 0d[90] = PCI Bridge card=0x30a5103c
    cap 01[a0] = powerspec 2  supports D0 D3  current D0
pcib2@pci0:0:28:2:	class=0x060400 card=0x30a5103c chip=0x27d48086 rev=0x01 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) PCIe Root Port'
    class      = bridge
    subclass   = PCI-PCI
    cap 10[40] = PCI-Express 1 root port
    cap 05[80] = MSI supports 1 message 
    cap 0d[90] = PCI Bridge card=0x30a5103c
    cap 01[a0] = powerspec 2  supports D0 D3  current D0
uhci0@pci0:0:29:0:	class=0x0c0300 card=0x30a5103c chip=0x27c88086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [20] = type I/O Port, range 32, base 0x1820, size 32, enabled
uhci1@pci0:0:29:1:	class=0x0c0300 card=0x30a5103c chip=0x27c98086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [20] = type I/O Port, range 32, base 0x1840, size 32, enabled
uhci2@pci0:0:29:2:	class=0x0c0300 card=0x30a5103c chip=0x27ca8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [20] = type I/O Port, range 32, base 0x1860, size 32, enabled
ehci0@pci0:0:29:7:	class=0x0c0320 card=0x30a5103c chip=0x27cc8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB 2.0 Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [10] = type Memory, range 32, base 0xd0544000, size 1024, enabled
    cap 01[50] = powerspec 2  supports D0 D3  current D0
    cap 0a[58] = EHCI Debug Port at offset 0xa0 in map 0x14
pcib3@pci0:0:30:0:	class=0x060401 card=0x30a5103c chip=0x24488086 rev=0xe1 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801BAM/CAM/DBM (ICH2-M/3-M/4-M) Hub Interface to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
    cap 0d[50] = PCI Bridge card=0x30a5103c
isab0@pci0:0:31:0:	class=0x060100 card=0x30a5103c chip=0x27b98086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801GBM (ICH7-M) LPC Interface Controller'
    class      = bridge
    subclass   = PCI-ISA
    cap 09[e0] = vendor (length 12) Intel cap 1 version 0
		 features: Quick Resume, SATA RAID-5, Mobile, 6 PCI-e x1 slots, SATA RAID-0/1/10
atapci0@pci0:0:31:1:	class=0x01018a card=0x30a5103c chip=0x27df8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) Ultra ATA Storage Controller'
    class      = mass storage
    subclass   = ATA
    bar   [10] = type I/O Port, range 32, base 0x1f0, size  8, enabled
    bar   [14] = type I/O Port, range 32, base 0x3f4, size  1, enabled
    bar   [18] = type I/O Port, range 32, base 0x170, size  8, enabled
    bar   [1c] = type I/O Port, range 32, base 0x374, size  1, enabled
    bar   [20] = type I/O Port, range 32, base 0x1810, size 16, enabled
atapci1@pci0:0:31:2:	class=0x010601 card=0x30a5103c chip=0x27c58086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801GB Mobile I/O Controller Hub SATA cc=AHCI'
    class      = mass storage
    subclass   = SATA
    bar   [10] = type I/O Port, range 32, base 0x18b0, size  8, enabled
    bar   [14] = type I/O Port, range 32, base 0x18a4, size  4, enabled
    bar   [18] = type I/O Port, range 32, base 0x18a8, size  8, enabled
    bar   [1c] = type I/O Port, range 32, base 0x18a0, size  4, enabled
    bar   [20] = type I/O Port, range 32, base 0x1890, size 16, enabled
    bar   [24] = type Memory, range 32, base 0xd0544400, size 1024, enabled
    cap 05[80] = MSI supports 1 message 
    cap 01[70] = powerspec 2  supports D0 D3  current D0
none0@pci0:0:31:3:	class=0x0c0500 card=0x30a5103c chip=0x27da8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) SMBus Controller'
    class      = serial bus
    subclass   = SMBus
    bar   [20] = type I/O Port, range 32, base 0x18c0, size 32, enabled
none1@pci0:6:0:0:	class=0x028000 card=0x1364103c chip=0x431114e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'Dell Wireless 1390 WLAN Mini-PCI Card'
    class      = network
    cap 01[40] = powerspec 2  supports D0 D1 D2 D3  current D0
    cap 05[58] = MSI supports 1 message 
    cap 10[d0] = PCI-Express 1 legacy endpoint
rl0@pci0:8:8:0:	class=0x020000 card=0x30a5103c chip=0x813910ec rev=0x10 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'RT8139 (A/B/C/810x/813x/C+) Fast Ethernet Adapter'
    class      = network
    subclass   = ethernet
    bar   [10] = type I/O Port, range 32, base 0x2000, size 256, enabled
    bar   [14] = type Memory, range 32, base 0xd0100000, size 256, enabled
    cap 01[50] = powerspec 2  supports D0 D1 D2 D3  current D0
```

Niko


----------



## Gusi (Mar 2, 2009)

Hi there,

a few time ago I tried bwi02.tar.bz2. I worked quite well, but from time to time I found it loosed link and had to reboot the laptop (restarting the wpa supplicant always freezed the machine). Don't know the source of the problem (no trace of the problem in /var/log/messages). My wireless is : 


```
none1@pci0:12:0:0:	class=0x028000 card=0x00071028 chip=0x431214e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM4310 broadcom wireless 1490 (dell)'
    class      = network
```


Also note that the version posted bwi02c.tar.bz2 doesn't compile on STABLE, looks like it is for CURRENT. It complains on net80211/ieee80211_phy.h, which can't be found on /usr/src/sys. So if I'm right, it should be noted if someone sends a pr. 

A presto


----------



## paradox (Mar 2, 2009)

```
none1@pci0:6:0:0: class=0x028000 card=0x1364103c chip=0x431114e4 rev=0x01 hdr=0x00
vendor = 'Broadcom Corporation'
device = 'Dell Wireless 1390 WLAN Mini-PCI Card'
class = network
cap 01[40] = powerspec 2 supports D0 D1 D2 D3 current D0
cap 05[58] = MSI supports 1 message 
cap 10[d0] = PCI-Express 1 legacy endpoint

bwi0: 0x4000 bytes of rid 0x10 res 3 failed (0, 0xffffffff).
```

seems like good
but res [10] it's PCI-E resource
my be the problem at this point
i thinking about it within few days
and you to check asl too


----------



## paradox (Mar 2, 2009)

>Gusi
show me your 
dmesg after kldload bwi.ko && ifconfig bwi0 up

some new BCM chip rev older then 5 need new a specification for driver
as new firmware, rewrite new bwi code, and so


----------



## Gusi (Mar 3, 2009)

Hi Paradox,

  did the following : 

     kldload /boot/kernel.old/bwi_v3.ko && kldload /boot/kernel.old/if_bwi.ko && ifconfig bwi0 up  

  Dmesg showded me got the following : 

********************

```
bwi0: <Broadcom BCM4312 802.11 Wireless Lan> mem 0xf1ffc000-0xf1ffffff irq 17 at device 0.0 on pci12
bwi0: [ITHREAD]
bwi0: regwin: chipcommon (0x800), rev 17, vendor 0x4243
bwi0: BBP: id 0x4311, rev 0x1, pkg 0
bwi0: nregwin 4, cap 0x0064000d
bwi0: regwin: 802.11 MAC (0x812), rev 10, vendor 0x4243
bwi0: MAC: rev 10
bwi0: regwin: usb 1.1 host (0x817), rev 3, vendor 0x4243
bwi0: regwin: pci express (0x820), rev 1, vendor 0x4243
bwi0: clksrc CS_OSC
bwi0: clkfreq min 990000, max 1010000
bwi0: power on delay 3
bwi0: bus rev 1
bwi0: pci express is enabled
bwi0: card flags 0x4a49
bwi0: 0th led, act 2, lowact 0
bwi0: 1th led, act 3, lowact 1
bwi0: 2th led, act 4, lowact 0
bwi0: 3th led, act 0, lowact 0
bwi0: 802.11 MAC was already disabled
bwi0: PHY is linked
bwi0: PHY: type 2, rev 8, ver 4
bwi0: PHY: 802.11G attach
bwi0: RF: manu 0x17f, type 0x2050, rev 2
bwi0: bus rev 1
bwi0: PHY is linked
bwi0: 32bit bus space
bwi0: max txpower from sprom: 74 dBm
bwi0: ant gain 8 dBm
bwi0: region/domain max txpower 76 dBm
bwi0: max txpower 74 dBm
bwi0: sprom idle tssi: 0x783e
bwi0: TSSI-TX power map:
83 83 82 82 82 82 81 81 
80 80 79 79 79 78 78 77 
77 76 75 75 74 74 73 73 
72 72 71 70 69 69 68 67 
66 65 64 64 62 61 60 59 
58 57 55 54 52 51 49 48 
46 45 42 41 38 36 33 31 
28 25 22 19 15 11 6 2 
bwi0: idle tssi0: 62
bwi0: bus rev 1
bwi0: locale: 0
bwi0: WARNING: using obsoleted if_watchdog interface
bwi0: Ethernet address: 00:1c:26:66:26:10
bwi0: bwi_init
bwi0: bwi_stop
bwi0: bbp atten: 0, rf atten: 3, ctrl1: 2, ctrl2: 65535
bwi0: bus rev 1
bwi0: 802.11 MAC is disabled
bwi0: 802.11 MAC was already disabled
bwi0: PHY is linked
bwi0: firmware rev 0x0127, patch level 0x000e
bwi0: IV count 317
bwi0: IV count 31
bwi0: lo gain: 13, rx gain: 48
bwi0: RF calibration value: 0x003e
bwi0: base tssi 50
bwi0: bwi_updateslot
bwi0: bwi_updateslot
bwi0: tssi0 19, tssi1 19, tssi2 18, tssi3 24
bwi0: tssi avg 22
bwi0: current txpower 64
bwi0: rf atten adjust -2, bbp atten adjust 3
bwi0: link state changed to UP
bwi0: no DS tssi
bwi0: tssi0 6, tssi1 6, tssi2 6, tssi3 6
bwi0: tssi avg 8
bwi0: current txpower 74
bwi0: no need to adjust RF/BBP attenuation
bwi0: no DS tssi
bwi0: no OFDM tssi
bwi0: no DS tssi
bwi0: no OFDM tssi
bwi0: no DS tssi
bwi0: no OFDM tssi
```
********************

  Got to insert the firmware first, otherwise it refuses to work. If you need something else, please let me know.

  Greets,

  Gus


----------



## paradox (Mar 3, 2009)

try this
paradox.lissyara.su/bwi.02.tar.bz2
i'am remove all mutex
my be its do some stability for driver

try
ifconfig bwi0 down && ifconfig bwi0 up 
for a reboot bwi core
if have some problem again

so, yr
>bwi0: MAC: rev 10
is not stability for bwi and v3 formware


----------



## Gusi (Mar 4, 2009)

Hi Again,



			
				paradox said:
			
		

> try
> ifconfig bwi0 down && ifconfig bwi0 up
> for a reboot bwi core
> if have some problem again



  Yesterday I tried what you suggested. I took me some time to associate to my AP which is a FreeBSD with hostapd+WPA2-TLS (in fact what took long was dhclient).  After a few time I started to see some : 

    Mar  3 21:12:32 gusiport dhclient[26984]: send_packet: No buffer space available

  Moreover I felt it a little bit slow. Maybe both problems are related ? Finally stopping wpa_supplicant didn't freeze or reboot the system anymore. If you need more information or do you want me to do something, let me know. 

   Greets and thanks,

   Gus


----------



## paradox (Mar 4, 2009)

>Mar 3 21:12:32 gusiport dhclient[26984]: send_packet: No buffer space available

try increase the buffer

loader.conf
kern.maxusers="512"
kern.ipc.nmbclusters="2048"


----------



## Gusi (Mar 4, 2009)

Hi,

  tried sysctl kern.ipc.nmbcluster and I discovered that it was greater than the value you suggested. Will try the values you gave, but I suspect they won't work better (maybe). I'll keep you informed anyway. 

  Do you want something else ? 

  Thanks again, 

  Gusi


----------



## paradox (Apr 4, 2009)

>Gusi
the small changes at bwi for phy_rev = 8
as example


> bwi0: PHY: type 2, rev *8*, ver 4


try test it
paradox.lissyara.su/bwi.03.tar.bz2


----------



## Gusi (Apr 26, 2009)

paradox said:
			
		

> >Gusi
> the small changes at bwi for phy_rev = 8
> as example
> 
> ...



 Sorry for the delay. I tried it in current (I left stable), but gave me errors in compile : 


```
if_bwi.c: In function 'bwi_attach':
if_bwi.c:400: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:401: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:402: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:403: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:406: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:418: error: too many arguments to function 'ieee80211_init_channels'
if_bwi.c:427: error: 'struct ieee80211com' has no member named 'ic_state'
if_bwi.c:432: error: too few arguments to function 'ieee80211_ifattach'
if_bwi.c:438: error: 'struct ieee80211com' has no member named 'ic_newstate'
if_bwi.c:439: error: 'struct ieee80211com' has no member named 'ic_newstate'
cc1: warnings being treated as errors
if_bwi.c:443: warning: assignment from incompatible pointer type
if_bwi.c:446: error: too many arguments to function 'ieee80211_media_init'
if_bwi.c:449: warning: passing argument 2 of 'ieee80211_amrr_init' from incompatible pointer type
if_bwi.c:449: error: too few arguments to function 'ieee80211_amrr_init'
if_bwi.c: In function 'bwi_init':
if_bwi.c:1100: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:1100: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:1103: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:1140: error: 'struct ieee80211com' has no member named 'ic_roaming'
if_bwi.c:1141: warning: passing argument 1 of 'ieee80211_new_state' from incompatible pointer type
if_bwi.c:1143: warning: passing argument 1 of 'ieee80211_new_state' from incompatible pointer type
if_bwi.c: In function 'bwi_ioctl':
if_bwi.c:1195: warning: passing argument 1 of 'ieee80211_ioctl' from incompatible pointer type
if_bwi.c: In function 'bwi_start':
if_bwi.c:1234: error: 'struct ieee80211com' has no member named 'ic_mgtq'
if_bwi.c:1234: error: 'struct ieee80211com' has no member named 'ic_mgtq'
if_bwi.c:1234: error: 'struct ieee80211com' has no member named 'ic_mgtq'
if_bwi.c:1234: error: 'struct ieee80211com' has no member named 'ic_mgtq'
if_bwi.c:1234: error: 'struct ieee80211com' has no member named 'ic_mgtq'
if_bwi.c:1234: error: 'struct ieee80211com' has no member named 'ic_mgtq'
if_bwi.c:1239: error: 'struct ieee80211com' has no member named 'ic_state'
if_bwi.c:1255: warning: passing argument 1 of 'ieee80211_find_txnode' from incompatible pointer type
if_bwi.c:1266: warning: passing argument 1 of 'ieee80211_encap' from incompatible pointer type
if_bwi.c:1266: warning: passing argument 2 of 'ieee80211_encap' from incompatible pointer type
if_bwi.c:1266: warning: passing argument 3 of 'ieee80211_encap' from incompatible pointer type
if_bwi.c:1274: error: 'struct ieee80211com' has no member named 'ic_rawbpf'
if_bwi.c:1275: error: 'struct ieee80211com' has no member named 'ic_rawbpf'
if_bwi.c:1279: warning: passing argument 1 of 'ieee80211_crypto_encap' from incompatible pointer type
if_bwi.c:1279: warning: passing argument 2 of 'ieee80211_crypto_encap' from incompatible pointer type
if_bwi.c:1279: error: too many arguments to function 'ieee80211_crypto_encap'
if_bwi.c: In function 'bwi_stop':
if_bwi.c:1345: warning: passing argument 1 of 'ieee80211_new_state' from incompatible pointer type
if_bwi.c: In function 'bwi_newstate':
if_bwi.c:1547: error: 'struct ieee80211com' has no member named 'ic_bss'
if_bwi.c:1549: error: 'struct ieee80211com' has no member named 'ic_bss'
if_bwi.c:1565: error: 'struct ieee80211com' has no member named 'ic_fixed_rate'
if_bwi.c: In function 'bwi_newassoc':
if_bwi.c:1601: error: too few arguments to function 'ieee80211_amrr_node_init'
if_bwi.c: In function 'bwi_iter_func':
if_bwi.c:1616: warning: passing argument 1 of 'ieee80211_amrr_choose' from incompatible pointer type
if_bwi.c:1616: warning: passing argument 2 of 'ieee80211_amrr_choose' from incompatible pointer type
if_bwi.c:1616: error: too many arguments to function 'ieee80211_amrr_choose'
if_bwi.c: In function 'bwi_amrr_timeout':
if_bwi.c:1627: error: 'struct ieee80211com' has no member named 'ic_bss'
if_bwi.c: In function 'bwi_media_change':
if_bwi.c:1640: warning: unused variable 'sc'
if_bwi.c:2522:45: error: macro "ieee80211_input" passed 6 arguments, but takes just 5
if_bwi.c: In function 'bwi_rxeof':
if_bwi.c:2521: error: 'ieee80211_input' undeclared (first use in this function)
if_bwi.c:2521: error: (Each undeclared identifier is reported only once
if_bwi.c:2521: error: for each function it appears in.)
if_bwi.c: In function 'bwi_encap':
if_bwi.c:2819: error: 'struct ieee80211com' has no member named 'ic_mcast_rate'
if_bwi.c:2820: error: 'struct ieee80211com' has no member named 'ic_fixed_rate'
if_bwi.c:2825: error: 'struct ieee80211com' has no member named 'ic_fixed_rate'
if_bwi.c: In function 'bwi_set_bssid':
if_bwi.c:3426: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c: In function 'bwi_calibrate':
if_bwi.c:3468: error: 'struct ieee80211com' has no member named 'ic_state'
if_bwi.c: At top level:
if_bwi.c:3650: error: conflicting types for 'ieee80211_plcp2rate'
@/net80211/ieee80211_phy.h:143: error: previous declaration of 'ieee80211_plcp2rate' was here
```

  Tried some of the variants (bwi.03[c-e]) but none of them worked. bwi.03c gave me errors in compile (I think the same problem I had with bwi.03). bwi.03d or bwi.03e freezed the system (can remember which one)

  Will try bwi.02c, some claimed it compiled in current.

  Greets,

  Gusi


----------



## Gusi (Apr 27, 2009)

Gusi said:
			
		

> Will try bwi.02c, some claimed it compiled in current.
> 
> Greets,
> 
> Gusi



  bwi.02c doesn't compile with i386/current (csuped today). Both problems are related, struct ieee80211com doesn't have a field called ic_myaddr. 


```
if_bwi.c:521: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:522: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:523: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:524: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:527: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:553: error: too few arguments to function 'ieee80211_ifattach'
if_bwi.c: In function 'bwi_init_statechg':
if_bwi.c:1303: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:1303: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c:1306: error: 'struct ieee80211com' has no member named 'ic_myaddr'
if_bwi.c: In function 'bwi_start_locked':
if_bwi.c:1446: warning: passing argument 1 of 'ieee80211_encap' from incompatible pointer type
if_bwi.c:1446: warning: passing argument 2 of 'ieee80211_encap' from incompatible pointer type
if_bwi.c:1446: error: too few arguments to function 'ieee80211_encap'
if_bwi.c: In function 'bwi_init_tx_ring64':
if_bwi.c:2543: warning: right shift count >= width of type
if_bwi.c:2544: warning: right shift count >= width of type
if_bwi.c: In function 'bwi_init_rxdesc_ring64':
if_bwi.c:2565: warning: right shift count >= width of type
if_bwi.c:2566: warning: right shift count >= width of type
if_bwi.c: In function 'bwi_set_bssid':
if_bwi.c:3975: error: 'struct ieee80211com' has no member named 'ic_myaddr'
```

  Greets,

  Gus


----------



## paradox (May 1, 2009)

at April 4th, 2009, 15:57  its works

but since the some moment Sam to change a macaddr struct ....
so i have new build with some the broadcom sources from wireless router as asus WL* or LinkSys *
but provide it only for private users


----------



## paradox (May 7, 2009)

bwi already at current
but have some misstake at source code
im fixx it
and make a patch paradox.lissyara.su/bwi.diff


----------



## rwatson@ (May 16, 2009)

FYI, this driver has now been merged to FreeBSD 8-CURRENT as of 3 May, 2009, so should appear in FreeBSD 8.0 later this year:

date: 2009/05/03 04:01:43;  author: imp;  state: Exp;
SVN rev 191762 on 2009-05-03 04:01:43Z by imp

Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for
Broadcom BCM43xx chipsets.  This driver uses the v3 firmware that
needs to be fetched separately.  A port will be committed to create
the bwi firmware module.

The driver matches the following chips: Broadcom BCM4301, BCM4307,
BCM4306, BCM4309, BCM4311, BCM4312, BCM4318, BCM4319

The driver works for 802.11b and 802.11g.

Limitations:
        This doesn't support the 802.11a or 802.11n portion of radios.
        Some BCM4306 and BCM4309 cards don't work with Channel 1, 2 or 3.
        Documenation for this firmware is reverse engineered from
http://bcm.sipsolutions.net/
        V4 of the firmware is needed for 11a or 11n support
http://bcm-v4.sipsolutions.net/
        Firmware needs to be fetched from a third party, port to be committed

# I've tested this with a BCM4319 mini-pci and a BCM4318 CardBus card, and
# not connected it to the build until the firmware port is committed.

Obtained from:  DragonFlyBSD, //depot/projects/vap
Reviewed by:    sam@, thompsa@


----------



## gnemmi (May 20, 2009)

Good to know that!!

Would it be too hard to port it to 7.x or at least get it into 7.3 for those of us who would rather wait a while before moving to 8.x when it comes out later this year?

I have a Broadcom BCM4312 802.11b/g (a.k.a Dell Wireless 1395 WLAN Mini-Card) and could really use the support for it =D

Regards


----------



## richardpl (May 20, 2009)

bwi(4) currently doesn't support your card.


----------



## gnemmi (May 20, 2009)

I thought that



> The driver matches the following chips: Broadcom BCM4301, BCM4307,
> BCM4306, BCM4309, BCM4311, BCM4312, BCM4318, BCM4319



meant it did :/


----------



## richardpl (May 20, 2009)

It hangs my machine randomly all the time.


----------



## gnemmi (May 20, 2009)

damn ... 

have you reported that?
can you point me to a list or message where I can take a look at what's going on?
drivers@ was _so_slow_ that I think I unsuscribed...

stupid Crapcom ...


----------



## richardpl (May 20, 2009)

Sure I did, but I would not comment about it here.
Also I'm not the only one who reported that, there is at least one such report on @current.


----------



## gnemmi (May 20, 2009)

roger that.
will take a look
thanks


----------



## paradox (May 21, 2009)

try this paradox.lissyara.su/bwi.03.tar.bz2 for freebsd 7.x

>gnemmi
give me yr pciconf -lvcb


----------



## gnemmi (May 21, 2009)

At your service 

Just in case: `# uname -a`


```
FreeBSD gargoyle.inferna.com.ar 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 08:49:13 UTC 2009     root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
```

Sorry but the forum doesn't allow me to post something that long, so I had to use pastebin.com: `# pciconf -lvcb`

Thanks for your interest paradox


----------



## DutchDaemon (May 21, 2009)

You can post attachments, like txt files. Just go to the Advanced Editor ('Go Advanced' button) when replying, and choose 'Manage Attachments'.


----------



## gnemmi (May 21, 2009)

Oh .. I see .. 

I wasn't attaching it .. I was just tagging with code and the forum said I couldn't post more than 1000 chars .. that's why I resorted to pastebin.com (which I use a lot btw ..).

Didn't know that I could attach though .. thanks for the heads up DutchDaemon, will be using that feature from now on 

Regards


----------



## paradox (May 21, 2009)

> none2@pci0:12:0:0:      class=0x028000 card=0x000b1028 chip=0x431514e4 rev=0x01 hdr=0x00
> vendor     = 'Broadcom Corporation'
> device     = 'BCM4310 USB Controller'
> class      = network
> ...



sorry
this wifi  chip=0x431514e4 
not supported
use only if_ndis & ndisgen


----------



## gnemmi (May 22, 2009)

Thaks for the heads up !


----------



## gnemmi (May 22, 2009)

@paradox: sorry for being so short on my reply .. it was just frustration 

After reading your previous post, I figured you are pretty much involved on the bwi and its firmware issues. 

I just wanted you to know that if there's something I can do to pitch in to solve this problem, you can count on me. I can test any and all patches you would like me to run or give you root access (ssh -> su-) to my machine or whatever it takes to help getting this card to work. Just ask for it and you'll get it.

Best Regards
Gonzalo


----------



## paradox (May 22, 2009)

> I just wanted you to know that if there's something I can do to pitch in to solve this problem, you can count on me. I can test any and all patches you would like me to run or give you root access (ssh -> su-) to my machine or whatever it takes to help getting this card to work. Just ask for it and you'll get it


good

but curently iam try to support the amd64 engine for the old card
my be the next step
it will be the support LP-PHY broadcom wifi aka 0x431514e4

ps
at next week iam waiting from ebay BCM4321 adapter with connector PCI-E<->miniPCI-E
becouse my nootebook not support miniPCI-E


----------



## paradox (May 23, 2009)

is any body use BCM4321 on current with ndis ?


----------



## gnemmi (May 23, 2009)

paradox said:
			
		

> good
> 
> but curently iam try to support the amd64 engine for the old card
> my be the next step
> it will be the support LP-PHY broadcom wifi aka 0x431514e4



Good to know your working on the amd64 support too !
Count on me to help as much as I can. Just drop a private message, an e-mail or whatever you prefer and I'll set up a user for you to do as you see it fits 

Best Regards and thank for your work !!

ps: sorry, no BCM4321 in here


----------



## paradox (May 23, 2009)

ooops  iam missed
i mean  s/amd64/dma64/ DMA engine for bwi

ps
iam developed the driver bwi only for current
early version for stable with the link 
iam posted above


----------



## gnemmi (May 25, 2009)

ok then, will install -CURRENT for you in here as soon as you ask me to so you can get bwi to support 0x431514e4 

Just send a PM or a mail so I can set up an account for you 

Regards


----------



## nccs (Jul 29, 2009)

*BCM4312 work with bwi driver*

I have a dell laptop model 1536 with a dell Wireless 1397 WLAN Mini card.  ven/dev code 14e4:4315 sub 000c1028.
I believe this is a BCM4312.  Does anyone know if there is any support for this chip other then ndis.  Boradcom web site provides a linux driver. Is there any work in progress to port this drive to freebsd or include more support with the bwi.

thanks 
Bill


----------



## paradox (Aug 1, 2009)

your device work with ndis
about any progress to support
iam waiting it from ebay


----------



## gnemmi (Aug 4, 2009)

will that support include 0x431514e4 too??

Edit: I just re read the post and realized itÂ´s the same chip :e


----------



## gnemmi (Aug 4, 2009)

This is interesting ... : http://forums.freebsd.org/showpost.php?p=34924&postcount=4

http://www.broadcom.com/support/802.11/linux_sta.php


----------



## paradox (Aug 4, 2009)

> will that support include 0x431514e4 too??


yes
and 4321/4322 (802.11n) too


----------



## gnemmi (Aug 4, 2009)

As I promised, please count on me to test any and all patches you would like me to run or give you root access (ssh -> su-) to my machine or whatever it takes to help getting this card to work. Just ask for it and you'll get it. 

Best Regards
Gonzalo


----------



## paradox (Aug 4, 2009)

I already have bcm4321 adapter
waiting Adapter PCI-E 

about 4315 I have not sure
is ordered this adapter or not for me my friends


----------



## paradox (Aug 11, 2009)

so
i already have

PCIE-mini wifi 0x4315 /* 4328 802.11g 2.4Ghz band id */
PCIE-mini wifi 0x4328 /* 4321 802.11n dualband id */
and PCIE<->PCIE-mini adapter for my desktop


----------



## rgrover (Aug 16, 2009)

I have BCM4321 on my Macbook3,1; and I'm running freeBSD7.2 on it. The following is the output from pciconf -lv.


```
none1@pci0:2:0:0:	class=0x028000 card=0x0088106b chip=0x432814e4 rev=0x03 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM94321KFBG Broadcom 4321AGN 802.11a/b/g/draft-n Wi-Fi Solution'
```

It seems to me that the bwi driver being talked about here doesn't support my card yet; and 8-CURRENT won't solve my problem either. Any ideas?


----------



## paradox (Aug 16, 2009)

> It seems to me that the bwi driver being talked about here doesn't support my card yet


yes



> and 8-CURRENT won't solve my problem either. Any ideas?


at now only through ndis 
in the future through bwi


----------



## rgrover (Aug 17, 2009)

paradox said:
			
		

> yes
> 
> 
> at now only through ndis
> in the future through bwi



Do we know how long it may be before FreeBSD's bwi driver supports the BCM4321? Is it being actively developed? Can I help contribute with the development or testing?

I've looked high and low for the XP driver which I can convert using ndiswrapper into a .ko. I've tried a few, but they either don't work with my card or crash the kernel. Can anyone please point me to a driver I can use?

Thanks.


----------



## paradox (Aug 17, 2009)

i am not sure but planed to finish 0x4315(4328) device in november(my be october)

starting develop the 0x4328(4321) device, will be after 0x4315 device

try to use the bcmwl5.sys vesion for i386 arch
or
bcmwl56.sys for amd64 arch


----------



## paradox (Aug 21, 2009)

owners of the adapter - would you have used this driver http://paradox.lissyara.su/bwi.04b.tar.bz2 (freebsd 8) to show me your identification radio chip
This driver is still not working 
but using it can be determined the radiochip

show me your dmesg
after compile and load if_bwi.ko


----------



## yanjchan (Aug 24, 2009)

*Dell 1395 (Broadcom 4310?) WLAN Driver*

Hello everyone! Could someone here please help me get my Dell 1395 WLAN card working? (BCM4310 USB Controller I think)

I've looked at some other threads, but can't quite make out what I'm supposed to do. I've successfully made this card work on Linux with ndiswrapper, but I'm not sure how to on BSD.

Thanks in advance,

Jonathan


----------



## paradox (Aug 24, 2009)

>yanjchan
show me your

```
uname -a
```
and

```
pciconf -lvcb
```


----------



## yanjchan (Aug 24, 2009)

>paradox

Here it goes:


```
hds1# uname -a
FreeBSD hds1.ca.comcast.net 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 08:49:13 UTC 2009     root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
hds1# pciconf -lvcb
hostb0@pci0:0:0:0:	class=0x060000 card=0x02731028 chip=0x2a008086 rev=0x0c hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Mobile PM965/GM965/GL960 Express Processor to DRAM Controller'
    class      = bridge
    subclass   = HOST-PCI
    cap 09[e0] = vendor (length 10) Intel cap 9 version 1
vgapci0@pci0:0:2:0:	class=0x030000 card=0x02731028 chip=0x2a028086 rev=0x0c hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Mobile 965 Express Integrated Graphics Controller'
    class      = display
    subclass   = VGA
    bar   [10] = type Memory, range 64, base 0xf8000000, size 1048576, enabled
    bar   [18] = type Prefetchable Memory, range 64, base 0xd0000000, size 268435456, enabled
    bar   [20] = type I/O Port, range 32, base 0x1800, size  8, enabled
    cap 05[90] = MSI supports 1 message 
    cap 01[d0] = powerspec 3  supports D0 D3  current D0
vgapci1@pci0:0:2:1:	class=0x038000 card=0x02731028 chip=0x2a038086 rev=0x0c hdr=0x00
```

I attempted to install the XP drivers using ndisulator... But I'm rather confuzzled.

Thanks in advance!


----------



## paradox (Aug 24, 2009)

plz full log from pciconf -lvcb


----------



## yanjchan (Aug 24, 2009)

Eh, having some .xinitrc problems currently:

Anyways, the relevant part as I saw it was:

Broadcom 4310 USB Controller, even though it wasn't USB>


----------



## paradox (Aug 24, 2009)

show it to me


----------



## yanjchan (Aug 24, 2009)

I'm sorry for the horrible delay, but due to problems with my FreeBSD install, I am going to reinstall it. WHich would be best for the wireless, 32bit or 64bit?


----------



## paradox (Aug 25, 2009)

depending from your pciconf


----------



## yanjchan (Aug 25, 2009)

The forum wouldn't let me paste the whole thing, so here's the (what I think is) relevant section and a bit around:


```
vendor     = 'Intel Corporation'                                            
    device     = '82801H (ICH8 Family) SMBus Controller'                        
    class      = serial bus                                                     
    subclass   = SMBus                                                          
    bar   [20] = type I/O Port, range 32, base 0x1c20, size 32, enabled         
none2@pci0:6:0:0:       class=0x028000 card=0x000b1028 chip=0x431514e4 rev=0x01 hdr=0x00                                                                        
    vendor     = 'Broadcom Corporation'                                         
    device     = 'BCM4310 USB Controller'                                       
    class      = network                                                        
    bar   [10] = type Memory, range 64, base 0xf4000000, size 16384, enabled    
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0                  
    cap 09[58] = vendor (length 120)                                            
    cap 05[e8] = MSI supports 1 message, 64 bit                                 
    cap 10[d0] = PCI-Express 1 endpoint                                         
re0@pci0:7:0:0: class=0x020000 card=0x02731028 chip=0x816810ec rev=0x02 hdr=0x00
    vendor     = 'Realtek Semiconductor'                                        
    device     = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC'                      
    class      = network                                                        
    subclass   = ethernet                                                       
    bar   [10] = type I/O Port, range 32, base 0x5000, size 256, enabled        
    bar   [18] = type Prefetchable Memory, range 64, base 0xf8610000, size 4096, enabled                                                                        
    bar   [20] = type Prefetchable Memory, range 64, base 0xf8600000, size 65536, enabled                                                                       
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0                  
    cap 05[50] = MSI supports 2 messages, 64 bit enabled with 1 message         
    cap 10[70] = PCI-Express 1 endpoint IRQ 0                                   
    cap 11[b0] = MSI-X supports 2 messages in map 0x20                          
    cap 03[d0] = VPD                                                            
fwohci0@pci0:8:5:0:     class=0x0c0010 card=0x02731028 chip=0x00f71217 rev=0x02hdr=0x00
    vendor     = 'O2 Micro Inc'
    device     = '0x00f71217 1394 Open Host Controller Interface'
    class      = serial bus
    subclass   = FireWire
    bar   [10] = type Memory, range 32, base 0xf8200000, size 4096, enabled
    bar   [14] = type Memory, range 32, base 0xf8202000, size 2048, enabled
    cap 01[60] = powerspec 2  supports D0 D1 D2 D3  current D0
none3@pci0:8:5:2:       class=0x080501 card=0x02731028 chip=0x71201217 rev=0x02hdr=0x00
```


----------



## paradox (Aug 25, 2009)

```
none2@pci0:6:0:0:       class=0x028000 card=0x000b1028 chip=0x431514e4 rev=0x01 hdr=0x00
```
*0x4315*
This adapter works only through the NDIS 
best choice would be i386 platform 
because under amd64 does not work stably


----------



## gnemmi (Aug 25, 2009)

I just did a fresh BETA3 install.
Installed devel/ccache and net/bwi-firmware-kmod, then downloaded bwi.04b.tar.bz2, untarred into my root dir then cd, make, make install, kldload if_bwi and got a bunch of text on my dmesg ..

My card is a 0x431514e4 too .. but in case you are interested, I can post my dmesg.

Best regards
Gonzalo


----------



## yanjchan (Aug 25, 2009)

Thanks for all the help paradox, I guess I'll just keep trying then. ;D


----------



## paradox (Aug 25, 2009)

>*qnemmi*



> My card is a 0x431514e4 too .. but in case you are interested, I can post my dmesg.


yes
show me


----------



## gnemmi (Aug 25, 2009)

pciconf -lvcb
dmesg after `# kldload if_bwi`

Hope that helps
If you need anything else, just ask 

Regards
Gonzalo


----------



## paradox (Aug 25, 2009)

thanx

```
bwi0: PHY: type 5, rev 1, ver 6
bwi0: RF: manu 0x17f, type 0x2062, rev 2
```
is all that I need at the moment


----------



## gnemmi (Aug 25, 2009)

you are welcome


----------



## paradox (Aug 25, 2009)

i have two version wifi
the same
0x4315

```
bwi0: PHY: type 5, rev 1, ver 6
bwi0: RF: manu 0x17f, type 0x2062, rev 2
```
and
0x4328

```
bwi0: PHY: type 4, rev 2, ver 5
bwi0: RF: manu 0x17f, type 0x2055, rev 4
```

so iam looking for for another PHY/RF radio
as example
type 0x2063
and
type 0x2056


----------



## gnemmi (Aug 25, 2009)

have you tried sending PM to those who posted on this thread in order to see if some of them can help?

Would you like me to start a thread on -current@ asking for help?


----------



## Eponasoft (Aug 25, 2009)

OK I've got a problem getting this bugger to work. I built and installed the bwi.03 driver (as this was the one noted for FreeBSD 7.2), and it appears to work, but I have no idea how to actually use it. 

All relevant data follows.


```
pceconf -lvcb

bwi0@pci0:3:0:0:        class=0x028000 card=0x04221468 chip=0x431114e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'Dell Wireless 1390 WLAN Mini-PCI Card'
    class      = network
    bar   [10] = type Memory, range 32, base 0xd0100000, size 16384, enabled
    cap 01[40] = powerspec 2  supports D0 D1 D2 D3  current D0
    cap 05[58] = MSI supports 1 message
    cap 10[d0] = PCI-Express 1 legacy endpoint
```


```
dmesg

bwi0: <Broadcom BCM4311 802.11 Wireless Lan> mem 0xd0100000-0xd0103fff irq 16 at device 0.0 on pci3
bwi0: [GIANT-LOCKED]
bwi0: [ITHREAD]
bwi0: regwin: chipcommon (0x800), rev 17, vendor 0x4243
bwi0: BBP: id 0x4311, rev 0x1, pkg 0
bwi0: nregwin 4, cap 0x0064000d
bwi0: regwin: 802.11 MAC (0x812), rev 10, vendor 0x4243
bwi0: MAC: rev 10
bwi0: regwin: usb 1.1 host (0x817), rev 3, vendor 0x4243
bwi0: regwin: pci express (0x820), rev 1, vendor 0x4243
bwi0: clksrc CS_OSC
bwi0: clkfreq min 990000, max 1010000
bwi0: power on delay 3
bwi0: bus rev 1
bwi0: pci express is enabled
bwi0: card flags 0x4a49
bwi0: 0th led, act 2, lowact 0
bwi0: 1th led, act 5, lowact 0
bwi0: 2th led, act 4, lowact 0
bwi0: 3th led, act 0, lowact 0
bwi0: 802.11 MAC was already disabled
bwi0: PHY is linked
bwi0: PHY: type 2, rev 8, ver 4
bwi0: PHY: 802.11G attach
bwi0: RF: manu 0x17f, type 0x2050, rev 2
bwi0: bus rev 1
bwi0: PHY is linked
bwi0: 32bit bus space
bwi0: max txpower from sprom: 74 dBm
bwi0: invalid antenna gain in sprom
bwi0: ant gain 8 dBm
bwi0: region/domain max txpower 76 dBm
bwi0: max txpower 74 dBm
bwi0: sprom idle tssi: 0xff3e
bwi0: TSSI-TX power map:
85 85 84 84 84 83 83 83
82 82 81 81 80 80 79 79
78 78 77 77 77 76 76 74
74 73 73 72 71 70 70 69
68 67 66 65 64 63 62 61
60 59 57 56 54 53 51 50
48 46 44 42 39 37 35 32
30 26 23 19 15 11 6 1
bwi0: idle tssi0: 62
bwi0: bus rev 1
bwi0: locale: 0
bwi0: WARNING: using obsoleted if_watchdog interface
bwi0: Ethernet address: 00:19:7e:5e:8c:a3
```

KDE3's "Network Tools" shows the device listed as "Wireless Interface (bwi0)" but gives its state as "inactive". So then...how do I activate it? I seem to be missing something here...


----------



## paradox (Aug 26, 2009)

show me 

```
ifconfig bwi0
```
and try read this article
http://www.freebsd.org/doc/en/books/handbook/network-wireless.html


----------



## Eponasoft (Aug 26, 2009)

```
ifconfig bwi0

bwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:19:7e:5e:8c:a3
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid "" channel 1 (2412 Mhz 11b)
        authmode OPEN privacy OFF bmiss 7 scanvalid 60 bintval 0
```

Hrm...that article is highly technical and most of it just flies over my head. Is there an idiot's version of it somewhere?


----------



## Gusi (Aug 28, 2009)

*Phy*

Hi,

  I've been testing the driver for a while, my system is :


> FreeBSD gusiport 8.0-BETA3 FreeBSD 8.0-BETA3 #9: Mon Aug 24 22:14:53 UTC 2009     gus@gusiport:/usr/obj/usr/src/sys/CUSTOM  i386



 and my card : 



> bwi0@pci0:12:0:0:       class=0x028000 card=0x00071028 chip=0x431214e4 rev=0x01 hdr=0x00
> vendor     = 'Broadcom Corporation'
> device     = 'BCM4310 UART (Wireless Ethernet Adapter)'
> class      = network
> ...



 and I found those errors while being quite near to my AP (which is a FBSD 7.2 machine with and Atheros card) : 



> bwi0: bwi_intr: intr PHY TX error
> bwi0: bwi_restart begin, help!
> bwi0: firmware rev 0x0127, patch level 0x000e



  The connection remains dead until an /etc/rc.d/netif restart is made. I seen this kind of errors quite frequently. If I try large transfer it happens. If I try no activity, it seems to remain stable. If I try web activity, it happens from time to time. 

  The error happens at if_bwi.c:1650. 

  With a pcmcia atheros card (not mine) I didn't saw those problems. Should it (the bwi card) be able to recover automagically ? 

  Greets,

  Gusi


----------



## everypot (Aug 31, 2009)

I did the same. But mine doesn't work...


```
# ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
        ether 00:23:5a:d1:70:84
        inet 192.168.1.107 netmask 0xffffff00 broadcast 192.168.1.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
```


```
pciconf -lvcb

bwi0@pci0:2:0:0:        class=0x028000 card=0x04b514e4 chip=0x431514e4 rev=0x01 hdr=0x00                                                                        
    vendor     = 'Broadcom Corporation'                                         
    device     = 'Broadcom Wireless b/g (BCM4315/BCM22062000)'                  
    class      = network                                                        
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 09[58] = vendor (length 120)
    cap 05[e8] = MSI supports 1 message, 64 bit
    cap 10[d0] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
re0@pci0:3:0:0: class=0x020000 card=0x389e17aa chip=0x813610ec rev=0x02 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'RTL8100E/RTL8101E/RTL8102E-GR (RTL8100-8101E-8102E-PCIEXPRESS)'
    class      = network
    subclass   = ethernet
    bar   [10] = type I/O Port, range 32, base 0x2000, size 256, enabled
    bar   [18] = type Prefetchable Memory, range 64, base 0x92010000, size 4096, enabled
    bar   [20] = type Prefetchable Memory, range 64, base 0x92000000, size 65536, enabled
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 05[50] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[70] = PCI-Express 2 endpoint IRQ 2 max data 128(256) link x1(x1)
    cap 11[ac] = MSI-X supports 2 messages in map 0x20
    cap 03[cc] = VPD
```


```
dmesg

bwi0: PHY: type 5, rev 1, ver 6
phy_att 4
phy_att 5
bwi0: RF: manu 0x17f, type 0x2062, rev 2
bwi0: unsupported 11LP PHY, rev 1
att fa 4
device_attach: bwi0 attach returned 6
re0: link state changed to DOWN
re0: link state changed to UP
```






			
				gnemmi said:
			
		

> I just did a fresh BETA3 install.
> Installed devel/ccache and net/bwi-firmware-kmod,...........
> 
> My card is a 0x431514e4 too .. but in case you are interested, I can post my dmesg.
> ...


----------



## paradox (Aug 31, 2009)

this log I need to determine which versions radiochip in the broadcom

as i see
only versions 0x2062 in model 0x4315
but i know there exist is 0x2063

I would like to know who has such

my be version 2063 inside asus-wl router


----------



## everypot (Sep 2, 2009)

My Lenovo s10-2 has BCM4315 ( Lenovo says it is a BCM4312. wtf.).  Cannot make it work on FreeBSD 8 beta 3. 

So BCM4315 is not supported on FreeBSD 8?


----------



## paradox (Sep 2, 2009)

not yet


----------



## everypot (Sep 2, 2009)

paradox said:
			
		

> not yet


Hi Paradox,

I tried to use ndisgen and/or NDIS to convert the windows driver. I got the .ko files successful:


```
# pwd
/usr/src/sys/modules/if_ndis
# ls
Makefile                if_ndis.ko              opt_usb.h
bcmwl5.inf              if_ndis.o               pccarddevs.h
bcmwl5.inf.ascii        if_ndis_pccard.o        pci_if.h
bcmwl5.sys              if_ndis_pci.o           usb_if.h
bcmwl5_sys.ko           if_ndis_usb.o           usbdevs.h
card_if.h               ndis_driver_data.h
if_ndis.kld             opt_bus.h

# kldload ndis
#kldload if_ndis
# kldload bcmwl5_sys.ko
[B]kldload: bcmwl5_sys.ko is not in the module path[/B]
# kldstat
Id Refs Address    Size     Name
 1   47 0xc0400000 d01484   kernel
 2    1 0xc1102000 a63c     if_re.ko
 3    1 0xc110d000 362e0    if_bwi.ko
 4    1 0xc637c000 9000     i915.ko
 5    1 0xc6385000 14000    drm.ko
 6    2 0xc7c66000 27000    linux.ko
 7    1 0xca070000 8000     linprocfs.ko
 8    1 0xcb0eb000 19000    snd_hda.ko
 9    1 0xcb104000 57000    sound.ko
10    1 0xcbae9000 d000     if_ndis.ko
11    1 0xcc0ee000 19000    ndis.ko
```

ifconfig shows no wireless card. I don't know what's wrong.

Followed instruction from: 
http://www.freebsd.org/doc/en/books/handbook/config-network-setup.html

and 

http://dannyman.toldme.com/2005/01/05/freebsd-howto-ndisulate-windows-drivers/


----------



## paradox (Sep 2, 2009)

> # kldload bcmwl5_sys.ko
> kldload: bcmwl5_sys.ko is not in the module


try to put .ko module in the dir /boot/modules/


----------



## richardpl (Sep 2, 2009)

Instead of ndiscvt you should really use ndisgen(8) instead, it is available for FreeBSD 6 and higher.


----------



## everypot (Sep 3, 2009)

paradox said:
			
		

> try to put .ko module in the dir /boot/modules/


---------------------------------------------------------

I put bcmwl5_sys.ko(by ndisgen), if_ndis.ko &  ndis.ko (by ndiscvt)into /boot/modules and rebooted the system. Now I get



```
ifconfig
ndis0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:21:00:f7:46:35
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: [color="Red"][B]no carrier[/B][/color]
```

# pciconf -lvcb 



```
kldstat
Id Refs Address    Size     Name
 1   49 0xc0400000 d01484   kernel
 2    1 0xc1102000 a63c     if_re.ko
 3    1 0xc110d000 1acb4    snd_hda.ko
 4    2 0xc1128000 62018    sound.ko
 5    1 0xc118b000 5a90     acpi_video.ko
 6    2 0xc1191000 f590     [B]if_ndis.ko[/B]
 7    3 0xc11a1000 1e030    [B]ndis.ko[/B]
 8    1 0xc11c0000 362e0    [B]if_bwi.ko[/B]
 9    1 0xc11f7000 1afc78   [B]bcmwl5_sys.ko[/B]
10    1 0xc6271000 27000    linux.ko
11    1 0xc643d000 9000     i915.ko
12    1 0xc6446000 14000    drm.ko
```
In rc.conf

```
ifconfig_bwi0="WPA DHCP"
ifconfig_ndis0="WPA DHCP"
```

loader.conf

```
if_ndis_load="YES"
if_bwi_load="YES"
if_re_load="YES"
snd_hda_load="YES"
bcmwl5_sys_load="YES"
acpi_video_load="YES"
```


----------



## paradox (Sep 3, 2009)

good
next step
http://www.freebsd.org/doc/en/books/handbook/network-wireless.html


----------



## everypot (Sep 4, 2009)

paradox said:
			
		

> good
> next step
> http://www.freebsd.org/doc/en/books/handbook/network-wireless.html


Thanks a lot.

I haven't got it work yet. But I'm trying. Hopefully it will be active soon.


----------



## everypot (Sep 8, 2009)

I tried
	
	



```
wpa_supplicant -B -c /etc/wpa_supplicant.conf -i ndis0
ioctl[SIOCG80211, op 98, len 32]: Invalid argument        
Failed to initialize driver interface
ELOOP: remaining socket: sock=4 eloop_data=0x28406140 user_data=0x2840d040 handler=0x8069f40
```


```
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel  
#eapol_version=1            
#ap_scan=1                  
network={                   
        scan_ssid=1         
        ssid="myid"      
        proto=WPA           
        key_mgmt=WPA-PSK    
        pairwise=CCMP TKIP  
        psk="mypassword"  
        priority=2      
}
```


----------



## paradox (Sep 8, 2009)

```
wpa_supplicant -Dndis -c /etc/wpa_supplicant.conf -i ndis0
```


```
paradox@hosting[10:44:02]~> wpa_supplicant

usage:
  wpa_supplicant [-BddhKLqqstuvwW] [-P<pid file>] [-g<global ctrl>] \
        -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-p<driver_param>] \
        [-b<br_ifname>] [-f<debug file>] \
        [-N -i<ifname> -c<conf> [-C<ctrl>] [-D<driver>] \
        [-p<driver_param>] [-b<br_ifname>] ...]

drivers:
  bsd = BSD 802.11 support (Atheros, etc.)
  ndis = Windows NDIS driver
  wired = wpa_supplicant wired Ethernet driver
options:
  -b = optional bridge interface name
  -B = run daemon in the background
  -c = Configuration file
  -C = ctrl_interface parameter (only used if -c is not)
  -i = interface name
  -d = increase debugging verbosity (-dd even more)
  -D = driver name
  -g = global ctrl_interface
  -K = include keys (passwords, etc.) in debug output
  -t = include timestamp in debug messages
  -h = show this help text
  -L = show license (GPL and BSD)
  -p = driver parameters
  -P = PID file
  -q = decrease debugging verbosity (-qq even less)
  -s = log output to syslog instead of stdout
  -v = show version
  -w = wait for interface to be added, if needed
  -W = wait for a control interface monitor before starting
  -N = start describing new interface
example:
  wpa_supplicant -Dbsd -iwlan0 -c/etc/wpa_supplicant.conf
```


----------



## everypot (Sep 9, 2009)

paradox said:
			
		

> ```
> wpa_supplicant -Dndis -c /etc/wpa_supplicant.conf -i ndis0
> ```



I rebooted and looks like it's closer to success.Not yet, cannot ping http://www.google.com (but later, I got it work! see the end of this post~~):


```
ifconfig                                                                    
[B]ndis0[/B]: 
flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>metric 0 mtu 2290     
ether   00:21:00:f7:46:35                    
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g    
status: [B]associated[/B]
[B]wlan0[/B]: 
flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:21:00:f7:46:35
media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
status: associated
ssid myid channel 6 (2437 Mhz 11g) bssid 00:18:e7:30:72:5c
country US authmode WPA privacy OFF txpower 0 bmiss 7 mcastrate 6
mgmtrate 6 scanvalid 60 protmode CTS roaming MANUAL bintval 0
```

Cannot bring ndis0 up:

```
# ifconfig ndis0 up scan              
ifconfig: unable to get scan results
```

wlan0 can:

```
#ifconfig wlan0 up scan
SSID/MESH ID    BSSID            CHAN RATE   S:N     INT CAPS
07FX10069425    00:12:0e:71:0f:9a    6   54M -83:-96  100 EP
myid            00:18:e7:30:72:5c    6   54M -46:-96  100 EPS
Mikeys WiFi...  00:18:f8:a7:06:1f    6   54M -55:-96  100 EPS
........
```

My /etc/rc.conf:


```
ifconfig_bwi0="WPA DHCP"
ifconfig_ndis0="WPA DHCP"
ifconfig_wlan0="WPA DHCP"
wpa_supplicant_enable="YES"
wlans_ndis0="wlan0"
```
all are required to get ndis0 and wlan0 "status: associate".

At this point, I cannot ping http://www.google.com.
Then I did something magic

```
# dhclient wlan0
```

After that, I'm writing this post by wireless!!!  
One last question: anyone know how to run dhclient wlan0 at boot time?


----------



## grocha (Sep 9, 2009)

everypot said:
			
		

> One last question: anyone know how to run dhclient wlan0 at boot time?


As I understand this line 
	
	



```
ifconfig_wlan0="WPA DHCP"
```
 in /etc/rc.conf shoul'd do that. At least it does for me


----------



## paradox (Sep 9, 2009)

> At this point, I cannot ping http://www.google.com.
> Then I did something magic
> 
> # dhclient wlan0


try to look at 
	
	



```
ps ax|grep dhclient
```
 before run from console 

```
# dhclient wlan0
```


----------



## everypot (Sep 9, 2009)

paradox said:
			
		

> try to look at
> 
> 
> 
> ...




```
ps ax|grep dhclient
 1383   0  S+     0:00.01 grep dhclient
```


----------



## everypot (Sep 9, 2009)

grocha said:
			
		

> As I understand this line
> 
> 
> 
> ...



If I comment that off, I will get (_ifconfig_) "_status: no carrier_" for both ndis0 and wlan0. And wouldn't be able to get the network working. And _dhclient wlan0/ndis0_ will give "no link... give up". Also, I notice that at boot time there are messages like "_failed to start wpa_supplicant:... Op 98.. invalid argument..._". 

Enable "ifconfig_wlan0="WPA DHCP" solved the problem, only takes longer to boot:"waiting 30s for the default route interface.....ndis0:link state change to UP ................"


----------



## paradox (Sep 9, 2009)

```
wpa_supplicant_enable="YES"
wlans_ndis0="wlan0"
ifconfig_wlan0="WPA DHCP"
```
should be enough

remove another unused line


----------



## everypot (Sep 9, 2009)

paradox said:
			
		

> ```
> wpa_supplicant_enable="YES"
> wlans_ndis0="wlan0"
> ifconfig_wlan0="WPA DHCP"
> ...



Yes. You are right. I just tested it. Still need to use "dhclient wlan0" to bring the network up. But the error message at boot time"waiting 30s for the default route interface.....ndis0:link state change to UP ................" *disappeared*! 

Great. Thank you for all the help! And hope the information can be useful to other people.


----------



## Seeker (Sep 13, 2009)

So..., what is a current status / solution for

```
BCM94321KFBG Broadcom 4321AGN 802.11a/b/g/draft-n Wi-Fi Solution
```
I *really* need that driver for FreeBSD 7.2


----------



## paradox (Sep 14, 2009)

ndis supported it ;-)


----------



## Seeker (Sep 14, 2009)

That I know!


----------



## arksu (Oct 13, 2009)

FreeBSD 8.0 RC1
pciconf:

```
none2@pci0:5:0:0:	class=0x028000 card=0xe003105b chip=0x431514e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'Broadcom Wireless b/g (BCM4315/BCM22062000)'
    class      = network
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 09[58] = vendor (length 120)
    cap 05[e8] = MSI supports 1 message, 64 bit 
    cap 10[d0] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
```

im try make ndis kernel module from windows xp drivers than 100% work on native windows xp on this hardware

after run
[cmd=]kldload bcmwl5_sys.ko[/cmd]

have this:

```
Oct 13 11:51:28  kernel: ndis0: <Broadcom 802.11g Network Adapter> irq 17 at device 0.0 on pci5
Oct 13 11:51:28  kernel: ndis0: [ITHREAD]
Oct 13 11:51:28  kernel: ndis0: NDIS API version: 5.1
Oct 13 11:51:28  kernel: ndis0: NDIS ERROR: c000138d (unknown error)
Oct 13 11:51:28  kernel: ndis0: init handler failed
Oct 13 11:51:28  kernel: device_attach: ndis0 attach returned 6
```

also part of dmesg:

```
pci2: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> irq 16 at device 28.1 on pci0
pci5: <ACPI PCI bus> on pcib2
pci5: <network> at device 0.0 (no driver attached)
```

can anybody help me?


----------



## mix_room (Oct 13, 2009)

I just got FreeBSD 8.0 installed on my HP 2140. Most things (seem) to be working. However the wireless networking is not working at all. 

I tried installing if_bwi (the one included in src), but that didn't do anything. Dmesg didn't change one bit. 

I then installed http://paradox.lissyara.su/bwi.04b.tar.bz2. 

Now dmesg is much more interesting

```
bwi0: <Broadcom BCM432B 802.11 Wireless Lan> mem 0xe8000000-0xe8003fff irq 16 at device 0.0 on pci8
pci timeout fixx!
bwi0: [GIANT-LOCKED]
bwi0: [ITHREAD]
_sb_coresba: current core is 0x18001000
_sb_scan: scan bus 0x18000000 assume 1 cores
_sb_scan: there are 7 cores in the chip(0x4322)
_sb_scan: found 7 cores on bus 0x18000000
sprom_read_pci:
[000]2801,[001]0000,[002]1380,[003]103c,[004]0078,[005]6dbe,[006]0000,[007]2bc4,
[008]2a64,[009]2964,[010]2c64,[011]3ce7,[012]46ff,[013]47ff,[014]0c00,[015]0820,
[016]0040,[017]1002,[018]0000,[019]ffff,[020]ffff,[021]ffff,[022]ffff,[023]ffff,
[024]ffff,[025]ffff,[026]ffff,[027]ffff,[028]ffff,[029]ffff,[030]ffff,[031]ffff,
[032]ffff,[033]ffff,[034]ffff,[035]ffff,[036]ffff,[037]ffff,[038]ffff,[039]ffff,
[040]ffff,[041]ffff,[042]1010,[043]0005,[044]ffff,[045]ffff,[046]ffff,[047]ffff,
[048]432b,[049]8000,[050]0002,[051]0000,[052]1800,[053]1800,[054]0000,[055]0000,
[056]ffff,[057]ffff,[058]ffff,[059]ffff,[060]ffff,[061]ffff,[062]ffff,[063]ffff,

sprom_read_pci:
[000]2801,[001]0000,[002]1380,[003]103c,[004]0078,[005]6dbe,[006]0000,[007]2bc4,
[008]2a64,[009]2964,[010]2c64,[011]3ce7,[012]46ff,[013]47ff,[014]0c00,[015]0820,
[016]0040,[017]1002,[018]0000,[019]ffff,[020]ffff,[021]ffff,[022]ffff,[023]ffff,
[024]ffff,[025]ffff,[026]ffff,[027]ffff,[028]ffff,[029]ffff,[030]ffff,[031]ffff,
[032]ffff,[033]ffff,[034]ffff,[035]ffff,[036]ffff,[037]ffff,[038]ffff,[039]ffff,
[040]ffff,[041]ffff,[042]1010,[043]0005,[044]ffff,[045]ffff,[046]ffff,[047]ffff,
[048]432b,[049]8000,[050]0002,[051]0000,[052]1800,[053]1800,[054]0000,[055]0000,
[056]ffff,[057]ffff,[058]ffff,[059]ffff,[060]ffff,[061]ffff,[062]ffff,[063]ffff,
[064]5372,[065]2400,[066]0a00,[067]0000,[068]0001,[069]0000,[070]0021,[071]00c9,
[072]6095,[073]4445,[074]0002,[075]83ff,[076]ffff,[077]ffff,[078]0303,[079]0202,
[080]ffff,[081]0033,[082]ffff,[083]ffff,[084]ffff,[085]ffff,[086]ffff,[087]1301,
[088]1301,[089]ffff,[090]ffff,[091]ffff,[092]ffff,[093]ffff,[094]ffff,[095]ffff,
[096]2048,[097]fe82,[098]1633,[099]fa92,[100]3e40,[101]403c,[102]fe9b,[103]15a8,
[104]fabc,[105]fe87,[106]1637,[107]fa8e,[108]feab,[109]163a,[110]faaf,[111]0000,
[112]2048,[113]fe89,[114]1665,[115]fa92,[116]3e40,[117]403c,[118]fe92,[119]153f,
[120]fac6,[121]fe9a,[122]1591,[123]fabc,[124]fea1,[125]15b0,[126]fab4,[127]0000,
[128]ffff,[129]ffff,[130]ffff,[131]ffff,[132]ffff,[133]ffff,[134]ffff,[135]ffff,
[136]ffff,[137]ffff,[138]ffff,[139]ffff,[140]ffff,[141]ffff,[142]ffff,[143]ffff,
[144]ffff,[145]ffff,[146]ffff,[147]ffff,[148]ffff,[149]ffff,[150]ffff,[151]ffff,
[152]ffff,[153]ffff,[154]ffff,[155]ffff,[156]ffff,[157]ffff,[158]ffff,[159]ffff,
[160]0000,[161]0000,[162]0000,[163]0000,[164]0000,[165]0000,[166]0000,[167]0000,
[168]0000,[169]0000,[170]0000,[171]0000,[172]0000,[173]0000,[174]0000,[175]0000,
[176]0000,[177]0000,[178]0000,[179]0000,[180]0000,[181]0000,[182]0000,[183]0000,
[184]0000,[185]0000,[186]0000,[187]0000,[188]0000,[189]0000,[190]0000,[191]0000,
[192]0000,[193]0000,[194]0000,[195]0000,[196]0000,[197]0000,[198]0000,[199]0000,
[200]0000,[201]0000,[202]0000,[203]0000,[204]0000,[205]ffff,[206]ffff,[207]ffff,
[208]ffff,[209]ffff,[210]ffff,[211]ffff,[212]ffff,[213]ffff,[214]ffff,[215]ffff,
[216]ffff,[217]ffff,[218]ffff,[219]9808,
initvars_srom_pci: sromrev 0x0008
initvars_srom_pci: boardrev 0x2400
initvars_srom_pci: boardflags 0x00000a00
initvars_srom_pci: boardflags2 0x00000001
initvars_srom_pci: boardtype 0x1380
initvars_srom_pci: boardnum 0x6095
initvars_srom_pci: cc 0x0000
initvars_srom_pci: regrev 0x02
initvars_srom_pci: ledbh[] 0xff,0x83,0xff,0x03
initvars_srom_pci: pa0b[] 0xfe82,0x1633,0xfa92
initvars_srom_pci: pa0itssit 0x20
initvars_srom_pci: pa0maxpwr 0x48
initvars_srom_pci: opo 0x00
initvars_srom_pci: aa2g 0x03
initvars_srom_pci: aa5g 0x03
initvars_srom_pci: ag[] 0x02
initvars_srom_pci: pa1b[] 0xfe9b,0x15a8,0xfabc
initvars_srom_pci: pa1lob[] 0xfe87,0x1637,0xfa8e
initvars_srom_pci: pa1hib[] 0xfeab,0x163a,0xfaaf
initvars_srom_pci: pa1itssit 0x3e
initvars_srom_pci: pa1maxpwr 0x40
initvars_srom_pci: pa1lomaxpwr 0x40
initvars_srom_pci: pa1himaxpwr 0x3c
initvars_srom_pci: rssismf2g 0x0f
initvars_srom_pci: rssismc2g 0x0f
initvars_srom_pci: rssisav2g 0x07
initvars_srom_pci: tri2g 0xff
initvars_srom_pci: bxa2g 0x03
initvars_srom_pci: rxpo2g 0xff
initvars_srom_pci: rssismf5g 0x0f
initvars_srom_pci: rssismc5g 0x0f
initvars_srom_pci: rssisav5g 0x07
initvars_srom_pci: tri5gl 0xff
initvars_srom_pci: tri5g 0xff
initvars_srom_pci: tri5gh 0xff
initvars_srom_pci: bxa5g 0x03
initvars_srom_pci: rxpo5g 0xff
initvars_srom_pci: txchain 0x03
initvars_srom_pci: rxchain 0x03
initvars_srom_pci: antswitch 0x00
initvars_srom_pci: ccode DE
initvars_srom_pci: macaddr 00:21:00:c9:60:95
initvars_srom_pci: il0macaddr 00:00:00:00:00:00
initvars_srom_pci: et1macaddr 00:00:00:00:00:00
initvars_srom_pci: leddc ffff
have PMU
need leddc
need check pcie BFL2_PCIEWAR_OVR
corerev 16
card flags 0x0000
att 1
0th led, act 2, lowact 0
1th led, act 0, lowact 0
2th led, act 0, lowact 0
3th led, act 0, lowact 0
att 2
att 3
64bit bus space
att 4
late 1
phy_att 1
sbflags 100c0001
phy_att 2
phy_att 3
bwi0: PHY: type 4, rev 4, ver 8
phy_att 4
phy_att 5
bwi0: RF: manu 0x17f, type 0x2056, rev 3
bwi0: unsupported 11N PHY, rev 4
att fa 4
device_attach: bwi0 attach returned 6
```

and [cmd=]pciconf -lvcb[/cmd]

```
bwi0@pci0:8:0:0:        class=0x028000 card=0x1380103c chip=0x432b14e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    class      = network
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 09[58] = vendor (length 120)
    cap 05[e8] = MSI supports 1 message, 64 bit
    cap 10[d0] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
```

However it does not show up in the output of [cmd=]ifconfig[/cmd]. 

[cmd=]kldstat[/cmd]

```
1   14 0xc0400000 b75f04   kernel
 2    1 0xc48c7000 9000     i915.ko
 3    1 0xc48d0000 14000    drm.ko
 4    1 0xc4fc2000 1a000    bwi_v3_ucode.ko
 5    1 0xc4fdc000 32000    if_bwi.ko
```

Have I forgotten to do something? It is usually something simple, but I have no idea what it would be this time.


----------



## blstuart (Oct 13, 2009)

The chip=432b14e4 identifies the chipset as the 4322.  The current bwi driver doesn't support his chip.  (If I'm mistaken, I'd love to know.)  However, I have gotten the Windows driver to work with ndisgen.  In particular I used the bcmwl5 driver.  That was also on an HP laptop, btw.


----------



## mix_room (Oct 13, 2009)

blstuart said:
			
		

> The chip=432b14e4 identifies the chipset as the 4322.  The current bwi driver doesn't support his chip.  (If I'm mistaken, I'd love to know.)  However, I have gotten the Windows driver to work with ndisgen.  In particular I used the bcmwl5 driver.  That was also on an HP laptop, btw.



I downloaded the bcmwl5 driver from the HP site. Seems to work. I see the interface now 


```
ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:21:00:c9:60:95
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
```

But I cannot get it to scan for networks. I know there is one here in the office, but I cannot remember the SSID. Would like to scan. But only get the reply 


```
hp2140# ifconfig ndis0 scan
ifconfig: unable to get scan results
```

Suggestions?


----------



## blstuart (Oct 13, 2009)

Things are a little different now.  First you need to create a clone device:


```
ifconfig wlan0 create wlandev ndis0
```

Then bring wlan0 up:


```
ifconfig wlan0 up
```

And I've had to manually give it a channel, though the scan will see APs on any channel.  However, if I don't manually give it a channel, it will stay on channel 1 and not be able to scan.


```
ifconfig wlan0 chanlist 11
```

Then scan:


```
ifconfig wlan0 list scan
```

This will list the currently known APs.  You can force it to look for new ones with:


```
ifconfig wlan0 scan
```

but this will disassociate you from your currently associated AP.

One last tip, when assigning a WEP key, do so with:


```
ifconfig wlan0 nwkey ...
```

That will do all the steps that are needed to bring up WEP.  On the other hand, if you're using WPA, then never mind...


----------



## richardpl (Oct 14, 2009)

In wpa case, there is wpa_supplicant, just use *-D ndis* driver flag (and not bsd one)


----------



## mix_room (Oct 20, 2009)

Thanks to your help I have managed to get my wireless up and running. At least at work, but that is using only a simple un-encrypted connection with landing-page for authentication. 

Im not trying to set it up at home. Doesn't work as well unfortunately. 

wpa_supplicant starts fine with the [cmd=]-D ndis[/cmd] switch. 

BUT, when I never seem to be able to get a stable connection. Keep seeing the following:

```
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
```
Not quite sure why they arise, I cannot reliably regenerate the errors. After several attemps I was able to get a DHCP lease, but there is still no connection to the remainder of the network. 

(Perhaps this post is in the wrong location, but I rather continue this thread which already contains most of the information regarind the Broadcom WiFi stuff)


----------



## mix_room (Oct 30, 2009)

I realise that bumping threads might not be appropriate, and appologize for doing so. 

I would like some form of answer. Either that this is a common error, and that I have to wait for hell to freeze over, or that no one has ever seen it before, and that I should post a bug-report somewhere.


----------



## lockdoc (Nov 2, 2009)

Unfortunately I cannot get the  http://paradox.lissyara.su/bwi.04b.tar.bz2 to compile
When doing "make" it shows me

```
Warning: Object directory not changed from original /data/bwi.04b @ -> /usr/src/sys
ln: @: Operation not supported
*** Error Code 1
```

Im Using FreebSD 8 RC1 with a Dell Wireless 1390 Wlan Mini PCI Card (On Dell Latitude D420) With a BCM4311 Chip.


----------



## Judge (Nov 29, 2009)

Paradox, 

Thanks for your work in getting a BWI driver; I found your thread in a google search, grabbed the bwi.03 source, compiled and installed and it works like a charm on my friend's Dell Latitude D600 (using the BCM4309 chipset).  

Only one slight problem which I hope has been resolved someplace and I am merely missing it. 

After several minutes of regular web browsing, but nearly immediately while trying to download large files, the network simply refuses to connect.   The wireless device still shows associated with the AP but pings result in DNS lookup failures.  

There's agreat deal of activity in the messages log; 

```
bwi0: no need to adjust RF/BBP attentuation
bwi0: current tx power 61
bwi0: tssi avg 22
bwi0: no DS tssi
bwi0: no OFDM tssi
bwi0: tssi0 20, tssi1 21, tssi3 21
```

There repeat often. 

Running FBSD 7.x BTW.  
Hopeing you can provide me a clue here.  Thanks.


----------



## Ironman (Nov 29, 2009)

Can someone help me to set up Broadcom 4315 under Freebsd 8.0?


```
FreeBSD  8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sun Nov 29 17:16:50 UTC 2009     root@:/usr/obj/usr/src/sys/newkern  amd64
```


```
pciconf -lvbc
none3@pci0:2:0:0:	class=0x028000 card=0x1508103c chip=0x431514e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'Broadcom Wireless b/g (BCM4315/BCM22062000)'
    class      = network
    bar   [10] = type Memory, range 64, base 0xd6000000, size 16384, enabled
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 09[58] = vendor (length 120)
    cap 05[e8] = MSI supports 1 message, 64 bit 
    cap 10[d0] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
```

It seems, that ndis doesn't work with windows7 drivers, because I got kernel panic, after I've tried to load module.
Is there any other solution?


----------



## mix_room (Nov 30, 2009)

Ironman said:
			
		

> It seems, that ndis doesn't work with windows7 drivers, because I got kernel panic, after I've tried to load module.
> Is there any other solution?



Have you tried the drivers for other windows versions (XP or Vista)?


----------



## richardpl (Nov 30, 2009)

You need to use 64bit drivers for amd64


----------



## Ironman (Nov 30, 2009)

I can't find XPx64 drivers. Can anybody help?


----------



## blstuart (Nov 30, 2009)

Ironman said:
			
		

> I can't find XPx64 drivers. Can anybody help?



The copy of the bcmwl5 XP driver package I found (a .exe from HP's site, IIRC) had both a bcmwl5.sys and bcmwl564.sys.  I'm pretty sure the latter is the 64-bit driver.  However, I've only used the 32-bit one, so I can't say how well ndisgen plays with the 64-bit one.


----------



## Purple_Q (Nov 30, 2009)

*Broadcom; which method?*

I'm one of the lucky dogs to have that dreaded Broadcom wireless card installed in my laptop.
I've seen that to get this working (supposedly), there are two methods; installing the bwi port, or finding MS drivers and using ndis.

Anyone got either of these working for them? Any insights as to which way would be best to go about this?

  --Q


----------



## gnemmi (Nov 30, 2009)

Purple_Q said:
			
		

> Anyone got either of these working for them? Any insights as to which way would be best to go about this?
> 
> --Q



Get rid of it .. thatÂ´s the best way to go about it.
I did .. it was either that or wait for someone to get it to work .. and that ainÂ´t gonna happen anytime soon .. so I got up and bought myself an intel 3945ABG. No more problem0


----------



## Judge (Dec 1, 2009)

Purple_Q said:
			
		

> I'm one of the lucky dogs to have that dreaded Broadcom wireless card installed in my laptop.
> I've seen that to get this working (supposedly), there are two methods; installing the bwi port, or finding MS drivers and using ndis.
> 
> Anyone got either of these working for them? Any insights as to which way would be best to go about this?
> ...



I'm a fairly stubborn person, so while the prospect of simply purchasing a new and supported card was tempting, I opted instead to press on. 

NDIS did not work for me at all.  I found the precise driver set, extracted the .inf and .sys... ran ndisgen successfully and when I attempted to kldload the driver ko file... the system hung.   

My only other option were the unsupported bwi drivers.  As mentioned previously, I downloaded paradox's bwi.03 driver set; compiled and installed.   It works, to a degree.   If I d/l something it just ceases to function, however after getting everything d/l via wired just brwsing the web or grabbing pdf's at random doesn't seem to make it happen.    When it does I am forced to restart netif to clear the problem.    Still hoping Paradox will respond to my above post.  

I understand it's been fixed in FBSD 8, which I see announced yesterday as being stable I think.


----------



## blstuart (Dec 1, 2009)

gnemmi said:
			
		

> Get rid of it .. thatÂ´s the best way to go about it.
> I did .. it was either that or wait for someone to get it to work .. and that ainÂ´t gonna happen anytime soon .. so I got up and bought myself an intel 3945ABG. No more problem0



I looked into doing exactly that.  But I ran across reports of HP having a [_unspeakable in polite company_] whitelist in the BIOS that would refuse to do anything if the wireless card was unrecognized.  Had I known this ahead of time, I would have bought from a manufacturer who doesn't engage in this detestable practice.  But I was stuck and did manage to get the NDIS drivers to work.  It was a little hit and miss, though.  When I built it under 8.0-RC2, it didn't work, but did under 8.0-STABLE.  No idea if something actually changed or there was operator error, but it seems to be working now.


----------



## rgrover (Dec 10, 2009)

Thanks for your continued work on the Broadcom drivers. Any estimate on when there might be a driver for BCM4321?



			
				rgrover said:
			
		

> I have BCM4321 on my Macbook3,1; and I'm running freeBSD7.2 on it. The following is the output from pciconf -lv.
> 
> 
> ```
> ...


----------



## amorphousone (Jan 4, 2010)

following the dialog between paradox and everypot i've picked up a few clues.
i too created ndis0 for bcm4315 following the handbook verbatim, but when i try to boot, process hangs once ndis is loaded, forcing me to power off, reboot into "escape to loader prompt" mode, unload, autoboot, and comment out the driver in loader.conf. reboot works as expected. then a

```
# kldload bcmwl5_sys
# dhclient ndis0
```

gets me online. any ideas? following are pertinent details to what causes boot to hang.


```
/boot/loader.conf
bcmwl5_sys_load="YES"
wlan_tkip_load="YES"
wlan_ccmp_load="YES"
```


```
/etc/rc.conf
wpa_supplicant_enable="YES"
wlans_ndis0="wlan0"
ifconfig_wlan0="WPA DHCP"
wpa_supplicant_conf_file="/etc/wpa_supplicant.conf"
```


```
/etc/wpa_supplicant.conf
network={
ssid="my_network"
psk="my_password"
}
```


```
# ls /boot/modules/
bcmwl5_sys.ko
```

granted, it is only a minor inconvenience to have to 

```
# kldload bcmwl5_sys
# dhclient ndis0
```

but if i didn't mind compromising i wouldn't be using bsd in the first place 
any help would be MUCH appreciated!


----------



## amorphousone (Jan 4, 2010)

sorry, the 2 bits of code in my post above were to read "dhclient wlan0", NOT "dhclient ndis0",
and i seem to be incapable of applying an edit to my own post.


----------



## richardpl (Jan 4, 2010)

amorphousone said:
			
		

> following the dialog between paradox and everypot i've picked up a few clues.
> i too created ndis0 for bcm4315 following the handbook verbatim, but when i try to boot, process hangs once ndis is loaded, forcing me to power off, reboot into "escape to loader prompt" mode, unload, autoboot, and comment out the driver in loader.conf. reboot works as expected. then a
> 
> ```
> ...



This is known issue, already reported in another thread.


----------



## amorphousone (Jan 5, 2010)

@ richarpl
i searched the forum before posting to this thread. could you kindly paste a link so i can track the progress?
thank you


----------



## richardpl (Jan 5, 2010)

http://forums.freebsd.org/showthread.php?t=9204

BTW: There is bwn(4) in development, search freebsd mailing lists.


----------



## everypot (Jan 6, 2010)

richardpl said:
			
		

> http://forums.freebsd.org/showthread.php?t=9204
> 
> BTW: There is bwn(4) in development, search freebsd mailing lists.



http://lists.freebsd.org/pipermail/freebsd-current/2009-December/014477.html

Only for 
  - Broadcom BCM4306 802.11b/g Wireless
  - Broadcom BCM4318 802.11b/g Wireless
?


----------



## richardpl (Jan 6, 2010)

bwn(4) compared to bwi(4) use newer firmware so it theoretically should work on many cards, but 64bit stuff is still missing.


----------



## everypot (Jan 6, 2010)

richardpl said:
			
		

> bwn(4) compared to bwi(4) use newer firmware so it theoretically should work on many cards, but 64bit stuff is still missing.



OK. I will try bwn when it's official, to replace bwi.


----------



## Seeker (Jan 6, 2010)

Hey _richardpl_!
Will it also be useful for me??


----------



## richardpl (Jan 6, 2010)

I dunno, best that you test it yourself.


----------



## paradox (Jan 6, 2010)

richardpl said:
			
		

> bwn(4) compared to bwi(4) use newer firmware so it theoretically should work on many cards, but 64bit stuff is still missing.


what you mean?
on amd64 with DMA64 adapters works fine


----------



## richardpl (Jan 7, 2010)

Then I replaced it with something else .... anyway driver is  still missing some usefull features and is full of debug messages ....


----------



## cucu007 (Feb 4, 2010)

I just got myself a lenovo G550 and its coming with a BCM4315, i noticed that there is a current development in getting drivers to work with this type of chip. I am presently testing PCBSD 7.x, any idea when development for this drive be completed?


----------



## everypot (Feb 5, 2010)

cucu007 said:
			
		

> I just got myself a lenovo G550 and its coming with a BCM4315, i noticed that there is a current development in getting drivers to work with this type of chip. I am presently testing PCBSD 7.x, any idea when development for this drive be completed?



BCM4315 is special. Even the new bwn driver in develpment won't support it. You can buy an Atheros mini wifi card, which is well supported by FreeBSD, to replace it (replacing/upgrading components is very easy for most Lenovo Laptops).


----------



## SaveTheRbtz (Feb 28, 2010)

everypot said:
			
		

> BCM4315 is special. Even the new bwn driver in develpment won't support it. You can buy an Atheros mini wifi card, which is well supported by FreeBSD, to replace it (replacing/upgrading components is very easy for most Lenovo Laptops).


Hhmm... so you mean BCM4315 won't be supported by bwn ever?


----------



## everypot (Feb 28, 2010)

SaveTheRbtz said:
			
		

> Hhmm... so you mean BCM4315 won't be supported by bwn ever?



I don't know. maybe you can ask Weongyo Jeong: 

http://nwvd.org/unix/freebsd-current/2009/4Qtr/msg03544.html


----------



## SaveTheRbtz (Mar 23, 2010)

Wow, it seems my BCM4315 is finnaly working under FreeBSD. 
Now it's kinda buggy, but still better than nothing. Big thanx to developers for their work.


----------



## everypot (Mar 25, 2010)

SaveTheRbtz said:
			
		

> Wow, it seems my BCM4315 is finnaly working under FreeBSD.
> Now it's kinda buggy, but still better than nothing. Big thanx to developers for their work.


sounds great.
Could you post the relevant sections in rc.conf and loader.conf?


----------



## everypot (Apr 6, 2010)

Finally, it works. I'm using freebsd-8 stable + bcm4312 card.  
Get(svn) the new bwn(and siba) driver and make install. Then install the firmware from ports. load if_bwn.ko and bwn_v4_lp_ucode.ko (or bwn_v4_ucode.ko, depending on your card; should not load both). Done.

Many thanks to Weongyo Jeong for writing this driver.


----------



## chunky_monkey (Apr 16, 2010)

*Dell D630 with 432AGN wi-fi*

Hi,

I've installed 8.0 on a dell d630 and i'm trying to setup wireless using wpi. 

pciconf shows:

```
none1@pci0:12:0:0:	class=0x028000 card=0x000a1028 chip=0x432814e4 rev=0x03 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'Broadcom 432AGN 802.11a/b/g/draft-n Wi-Fi Solution (BCM4321KFBG)'
    class      = network
```
yet there is no wireless network interface displayed even though wpi is loaded via kldload.
ifconfig:

```
bge0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
	ether 00:1c:23:20:a8:0f
	inet 192.168.1.109 netmask 0xffffff00 broadcast 192.168.1.255
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 46:4f:c0:be:09:a1
	ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	lladdr 46.4f.c0.0.17.be.9.a1.a.2.ff.fe.0.0.0.0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=3<RXCSUM,TXCSUM>
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 
	inet6 ::1 prefixlen 128 
	inet 127.0.0.1 netmask 0xff000000
```

a couple things i've tried and noticed
 - compiling /usr/src/sys/modules/firmware and installing/loading displays:

```
kldload: can't load /boot/kernel/firmware.ko: Exec format error
```
 - the same also occurs for the wlan modules

any ideas on how to compile the firmware.ko, wlan*.ko modules?

i think that may help in loading the wpi modules.

thanks in advance


----------



## DutchDaemon (Apr 16, 2010)

What makes you think it's a wpi(4)? BCM43xx should be covered by bwi(4).


```
DESCRIPTION
     The bwi driver provides support for [B]Broadcom BCM43xx[/B] based PCI/CardBus
     network adapters.
```

The fact that you have


```
[B]none[/B]1@pci0:12:0:0:
```

shows that no current driver has attached itself.


----------



## chunky_monkey (Apr 16, 2010)

Thanks for the info, I was at a loss at that point in trying drivers so my last try was the wpi. 

So I loaded the bwi driver in boot/loader.conf

if_bwi_load="YES"

and installed the ports/net/bwi-firmware-kmod as the bwi man page mentions.

unfortunately, still no luck.


```
none1@pci0:12:0:0:      class=0x028000 card=0x000a1028 chip=0x432814e4 rev=0x03 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'Broadcom 432AGN 802.11a/b/g/draft-n Wi-Fi Solution (BCM4321KFBG)'
    class      = network
```

The man page mentions the following devices are compatbile:

```
Card 		    Chip       Bus	   Standard
	   Apple Airport Extreme    BCM4306    PCI	   b/g
	   Apple Airport Extreme    BCM4318    PCI	   b/g
	   ASUS WL-138g 	    BCM4318    PCI	   b/g
	   Buffalo WLI-CB-G54S	    BCM4318    CardBus	   b/g
	   Buffalo WLI-PCI-G54S     BCM4306    PCI	   b/g
	   Compaq R4035 onboard     BCM4306    PCI	   b/g
	   Dell Wireless 1470	    BCM4318    Mini PCI    b/g
	   Dell Truemobile 1400     BCM4309    Mini PCI    b/g
	   HP nx6125		    BCM4319    PCI	   b/g
	   Linksys WPC54G Ver 3     BCM4318    CardBus	   b/g
	   Linksys WPC54GS Ver 2    BCM4318    CardBus	   b/g
	   TRENDnet TEW-401PCplus   BCM4306    CardBus	   b/g
	   US Robotics 5411	    BCM4318    CardBus	   b/g
```

The laptop I'm using has a BCM4321KFBG device. 

Is there anything else I can try (aside from grabbing a usb wireless network adapter)? or is this hardware simply not supported and I have to resort to buying a usb wireless adapter?


----------



## chunky_monkey (Apr 16, 2010)

... one other item... i just noticed:


```
[root@lucious ~]# kldload /boot/kernel/wlan.ko
kldload: can't load /boot/kernel/wlan.ko: Exec format error
 modules using kldload
```

do i have to recompile wlan.ko?


```
[root@lucious ~]# uname -a
FreeBSD lucious.waffle.com 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009     [email]root@mason.cse.buffalo.edu[/email]:
/usr/obj/usr/src/sys/GENERIC  amd64
```


----------



## DutchDaemon (Apr 17, 2010)

Your card / chipset may be unsupported right now. Have a look through the Broadcom WiFi thread -- in fact, I merged your posts with that thread so you're now in it .

(and please use proper posting tags on this forum)


----------



## blstuart (Apr 17, 2010)

As far as I know, the BCM432x chips are not supported by current drivers.  I have been able to use my 4322 with the NDIS driver using ndisgen, however.  It's not an ideal way to go, but it's worked well enough that I haven't gone the USB route.


----------



## chunky_monkey (Apr 21, 2010)

great thanks for the tip. i've loaded the bcmwl564_sys.ko module successfully. 

ifconfig now displays:

```
ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:1d:d9:45:5e:3a
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
```

Following the directions in the handbook I tried loading the wlan modules but I'm seeing the following:


```
[root@lucious ~]# kldload /boot/kernel/wlan.ko
kldload: can't load /boot/kernel/wlan.ko: Exec format error
 modules using kldload
```

I've tried recompiling "make clean install" the wlan module in /usr/src/sys/modules/wlan and still the above error. Any suggestions?


----------



## richardpl (Apr 21, 2010)

Is is not possible to load bcmwl564_sys.ko without wlan.ko (and bunch of others already being in kernel) so there is no need to do any extra work in your case.

Are you using amd64 version of FreeBSD?


----------



## chunky_monkey (Apr 21, 2010)

I am able to load bcmwl564_sys.ko
kldstat:

```
1   52 0xffffffff80100000 d17dc0   kernel
 3    1 0xffffffff80e1f000 23ed0    snd_hda.ko
 4    2 0xffffffff80e43000 75708    sound.ko
 7    1 0xffffffff80efb000 52d0     atapicam.ko
 8    1 0xffffffff81022000 3a28     linprocfs.ko
 9    1 0xffffffff81026000 1c53f    linux.ko
10    2 0xffffffff81043000 264e     vboxnetflt.ko
11    2 0xffffffff81046000 23254    vboxdrv.ko
12    2 0xffffffff8106a000 8d44     netgraph.ko
13    1 0xffffffff81073000 13be     ng_ether.ko
14    1 0xffffffff81075000 d2c      vboxnetadp.ko
15    1 0xffffffff81076000 a8ca     fuse.ko
16    1 0xffffff80008c7000 103000   bcm43xx64.cat.ko
17    1 0xffffffff81081000 116294   bcmwl564_sys.ko
18    1 0xffffffff81198000 7eb0     if_ndis.ko
19    2 0xffffffff811a0000 13930    ndis.ko
```

yet "ifconfig scan" produces no results

```
[root@lucious /usr/src/sys/modules/wlan]# ifconfig ndis0 scan
ifconfig: unable to get scan results
```

is there something other than wlan that it supposed to be configured to be able to list the available access points?


----------



## richardpl (Apr 21, 2010)

Read the handbook dude, that should be your first move anyway.

On 8.0 you need to create wlanX first and use wlanX instead of ndisX.


----------



## gnemmi (Apr 21, 2010)

You should probably read: rc.conf(5), wlan(4), wpa_supplicant(8) & wpa_supplicant.conf(5) .. or section 31.3 of the FreeBSD Handbook


----------



## unsobill (Apr 22, 2010)

*help*

help! i'm battling with my brodcom 4315 and ndis bcmwl5_sys driver - it's not going well- i'm unable to run wpa_supplicant freezes, kernel panics if i put module in boot/loader.conf

is there ANYONE with 4315 that can give me a hand? thanks.


----------



## richardpl (Apr 22, 2010)

Never put module in loader.conf before you test it via kldload(8).


----------



## unsobill (Apr 22, 2010)

strangeness enough kldload loads bcmwl5_sys.ko without issues - however when i add same module to /boot/loader.conf i get kernel panic... 

also i'm not sure if my issue in the driver itself or wpa_supplicant... as any time i try to use wpa_supplicant iÐµ freeze and give me errors such as


```
ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
Failed to disable WPA in the driver.
ELOOP: remaining socket: Ð¸ Ñ‚Ð°Ðº Ð´Ð°Ð»ÐµÐµ
```

here is my wpa_supplicant.conf 


```
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="Ð¼y AP"
key_mgmt=WPA-PSK
psk="topsecretpassword created from running wpa_passphrase"
}
```

here is how i run it
	
	



```
sudo wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf
```


----------



## richardpl (Apr 22, 2010)

Regarding panic during boot, problem is already reported, second time in this thread.

For second issue you must use -Dndis switch, I stopped to count this one.

More info you will get using forum search feature.


----------



## unsobill (Apr 22, 2010)

help please? i got ndis driver bcmwl5_sys.ko - device is broadcom 4315.
when i run wpa_supplicant i get kernel panic


```
$ sudo /usr/sbin/wpa_supplicant -Dndis -iwlan0 -c/etc/wpa_supplicant.conf
CTRL-EVENT-SCAN-RESULTS
Trying to associate with 00:1f:f3:c2:48:e5 (SSID='my ssid' freq=2412 MHz)

WPA: Could not verify EAPOL-Key MIC - dropping packet
Associated with 00:1f:f3:c2:48:e5

Write failed: Software caused connection abort
```


----------



## unsobill (Apr 23, 2010)

Can i use different working module/driver for Broadcom 4315 while hopefully current ndis driver being fixed ???


----------



## richardpl (Apr 23, 2010)

Where is panic output, I don't see it.

Post `# pciconf -lv` for that card, and I will see what I can do.


----------



## unsobill (Apr 23, 2010)

```
class      = network
    subclass   = ethernet
none2@pci0:2:0:0:       class=0x028000 card=0x1507103c chip=0x431514e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'Broadcom Wireless b/g (BCM4315/BCM22062000)'
    class      = network
```


here is output when i load ndis bcwm5_sys

```
no match for ZwQueryInformationFile
no match for ZwReadFile
no match for ZwCreateFile
no match for ExFreePoolWithTag
no match for IoUnregisterPlugPlayNotification
ndis0: <Broadcom 802.11b/g WLAN> mem 0x56000000-0x56003fff irq 17 at device 0.0 on pci2
ndis0: [ITHREAD]
ndis0: NDIS API version: 5.1
```

here is detailed code of wpa_supplicant

```
$ sudo wpa_supplicant -Dndis -iwlan0 -dd -c/etc/wpa_supplicant.conf
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'ndis' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
Line: 2 - start of a new network block
ssid - hexdump_ascii(len=8):
     75 6e 73 6f 62 69 6c 6c                           unsobill
proto: 0x1
key_mgmt: 0x2
pairwise: 0x18
group: 0x1e
PSK - hexdump(len=32): [REMOVED]
priority=2 (0x2)
Priority group 2
   id=0 ssid='unsobill'
Initializing interface (2) 'wlan0'
NDIS: Packet.dll version: FreeBSD WinPcap compatibility shim v1.0
NDIS: 1 adapter names found
NDIS: 1 adapter descriptions found
NDIS: 0 - wlan0 - wlan0
NDIS: Adapter description prefix 'wlan0'
OID_802_11_CAPABILITY - hexdump(len=128): 80 00 00 00 02 00 00 00 10 00 00 00 0e 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 
00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 03 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 05 00 00 00 04 00 00 00 06 00 00 00 04 00 00 00 
07 00 00 00 04 00 00 00 03 00 00 00 06 00 00 00 04 00 00 00 06 00 00 00 05 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 07 00 00 00 06 00 00 
00 
NDIS: Driver supports OID_802_11_CAPABILITY - NoOfPMKIDs 16 NoOfAuthEncrPairs 14
NDIS: 0 - auth 0 encr 1
NDIS: 1 - auth 0 encr 0
NDIS: 2 - auth 1 encr 1
NDIS: 3 - auth 1 encr 0
NDIS: 4 - auth 3 encr 4
NDIS: 5 - auth 4 encr 4
NDIS: 6 - auth 5 encr 4
NDIS: 7 - auth 6 encr 4
NDIS: 8 - auth 7 encr 4
NDIS: 9 - auth 3 encr 6
NDIS: 10 - auth 4 encr 6
NDIS: 11 - auth 5 encr 6
NDIS: 12 - auth 6 encr 6
NDIS: 13 - auth 7 encr 6
NDIS: driver capabilities: key_mgmt 0x1f enc 0xf auth 0x3
NDIS: Set OID 0d010118 - hexdump(len=4): [REMOVED]
NDIS: OID_802_11_PMKID (flush) - hexdump(len=8): 08 00 00 00 00 00 00 00
NDIS: Set OID 0d010123 - hexdump(len=8): [REMOVED]
NDIS: Set OID 0d010118 - hexdump(len=4): [REMOVED]
NDIS: Set OID 0d010102 - hexdump(len=36): [REMOVED]
NDIS: Set OID 0d010108 - hexdump(len=4): [REMOVED]
Own MAC address: c4:17:fe:bf:1b:bd
wpa_driver_ndis_set_wpa: enabled=1
ndis_get_oid: oid=0xd010101 len (6) failed
NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
ndis_get_oid: oid=0xd010101 len (6) failed
NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
ndis_get_oid: oid=0xd010101 len (6) failed
NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
ndis_get_oid: oid=0xd010101 len (6) failed
NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
RSN: flushing PMKID list in the driver
NDIS: Set OID 0d010118 - hexdump(len=4): [REMOVED]
NDIS: OID_802_11_PMKID (flush) - hexdump(len=8): 08 00 00 00 00 00 00 00
NDIS: Set OID 0d010123 - hexdump(len=8): [REMOVED]
NDIS: Set OID 0d010118 - hexdump(len=4): [REMOVED]
Setting scan request: 0 sec 100000 usec
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
Added interface wlan0
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
Cached scan results are empty - not posting
Selecting BSS from priority group 2
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
NDIS: Set OID 0d01011a - hexdump(len=4): [REMOVED]
ndis_get_oid: oid=0xd010101 len (6) failed
EAPOL: disable timer tick
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
Scan timeout - try to get results
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 2
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 5 sec 0 usec
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
Starting AP scan (broadcast SSID)
NDIS: Set OID 0d01011a - hexdump(len=4): [REMOVED]
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
Scan timeout - try to get results
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 2
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 5 sec 0 usec
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
^CCTRL-EVENT-TERMINATING - signal 2 received
Removing interface wlan0
State: SCANNING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_ndis_set_wpa: enabled=0
No keys have been configured - skip key clearing
Cancelling scan request
Cancelling authentication timeout
NDIS: Set OID 0d010118 - hexdump(len=4): [REMOVED]
NDIS: OID_802_11_PMKID (flush) - hexdump(len=8): 08 00 00 00 00 00 00 00
NDIS: Set OID 0d010123 - hexdump(len=8): [REMOVED]
NDIS: Set OID 0d010118 - hexdump(len=4): [REMOVED]
NDIS: Set OID 0d010102 - hexdump(len=36): [REMOVED]
NDIS: Set OID 0d010115 - hexdump(len=4): [REMOVED]
```

strangely enough i get no kernel panics anymore since i ran update to stable at night


----------



## richardpl (Apr 23, 2010)

Perhaps you need to use ap_scan in wpa_supplicant.conf because scanning may be tricky with some drivers.

8.0 RELEASE have bug with scanning(net80211 related, reproducible via ifconfig only), it is resolved in 8.0 STABLE and in CURRENT.


----------



## unsobill (Apr 23, 2010)

here is my wpa_supplicant.conf - perhaps something is missing here?

```
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=1
network={
        ssid="mynetwork"
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        group=CCMP TKIP WEP104 WEP40
        psk=********************************
        priority=2
        }
```


----------



## unsobill (Apr 23, 2010)

also 
	
	



```
FreeBSD  8.0-STABLE FreeBSD 8.0-STABLE #1: Mon Apr 19 21:29:36 UTC 2010
```


----------



## unsobill (Apr 23, 2010)

if i to remove 

```
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
```

`$ sudo wpa_supplicant -Dndis -iwlan0 -c/etc/wpa_supplicant.conf`


```
CTRL-EVENT-SCAN-RESULTS
Trying to associate with xx:xx:xx:xx:xx:xx (SSID='myssid' freq=2412 MHz)
Associated with xx:xx:xx:xx:xx:xx
Write failed: Software caused connection abort
```
-at this point ssh connection drops to server and kernel panic on dmesg...


----------



## richardpl (Apr 23, 2010)

What is panic message? Please post full backtrace.


----------



## unsobill (Apr 23, 2010)

hard to get panic message if keyboard/mouse down and reboot kicks in almost immediately. 
similar to this image of kernel - but that's not my picture - i will come back from work and update with exact picture of kernel


----------



## unsobill (Apr 24, 2010)

Sorry for the wait, just got back from work - here is kernel panic that i get... Thank you much !!!

```
Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address	= 0x4
fault code		= supervisor read, page not present
instruction pointer	= 0x20:0xc4e30868
stack pointer		= 0x28:0xe6723c04
frame pointer		= 0x28:0xe6723c18
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 1518 (Windows Workitem 3)
trap number		= 12
panic: page fault
cpuid = 0
Uptime: 6h8m10s
Cannot dump. Device not defined or unavailable.
Automatic reboot in 15 seconds - press a key on the console to abort
```


----------



## richardpl (Apr 24, 2010)

There is no backtrace, please define your dump device.


----------



## unsobill (Apr 25, 2010)

how can i do that?


----------



## richardpl (Apr 25, 2010)

Look in /etc/defaults/rc.conf, make your swap to be dump device.


----------



## hermes (Apr 27, 2010)

FYI, bwn(4) has been MFCâ€™d to 8-STABLE (and is working nicely with WPA2 over here  ). No more need for NDIS.


----------



## richardpl (Apr 27, 2010)

It is far from stable for me.


----------



## chunky_monkey (Apr 30, 2010)

This sounds promising. While I was able to load the ndis modules bcm43xx54.cat.ko, bcmwl564_sys.ko and set up and interface and association, my system would freeze on dhclient wlan0.

So I thought I'd try compiling the bwn modules... until I hit:


```
[root@machine /home/bwn/net/bwn-firmware-kmod]# kldload if_bwn
kldload: can't load if_bwn: Exec format error
```

Any ideas on how to fix this?


----------



## unsobill (May 1, 2010)

to get ur card working follow this...

1) Install the siba driver
go to:

http://svn.freebsd.org/base/head/sys/dev/siba/

pick the the files there and put them in /usr/src/sys/dev/siba <- must create
it !

then go to:
http://svn.freebsd.org/base/head/sys/modules/siba_bwn/
pick the Makefile and put in /usr/src/sys/modules/siba_bwn <- must create too.

then:

```
cd /usr/src/sys/modules/siba_bwn
make && make install
```

2) Install the bwn driver
Similar to 1), go to:

http://svn.freebsd.org/base/head/sys/dev/bwn/

pick the three files there and put them in /usr/src/sys/dev/bwn <- must create
it !

then go to:
http://svn.freebsd.org/base/head/sys/modules/bwn/

pick the Makefile and put in /usr/src/sys/modules/bwn <- must create too

then:

```
cd /usr/src/sys/modules/bwn
make && make install
```

3) Install bwn firmware:

```
cd /usr/ports/net/bwn-firmware-kmod && make install clean
```

4)Add the following to /etc/rc.conf:

```
network_interfaces="AUTO"
wpa_supplicant_enable="YES"
wlans_bwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
```

5)and /boot/loader.conf:

```
if_bwn_load="YES"
bwn_v4_lp_ucode_load="YES"
```
Note that, depending on your card, you may have to use the non-lp module bwn_v4_ucode_load="YES", but not both.

Now reboot and you should be online.


----------



## hermes (May 1, 2010)

@unsobill: Umm, nope. Thatâ€™s actually no longer the way to do it. Instead, just csup a recent 8-STABLE and recompile kernel and world.


----------



## chunky_monkey (May 4, 2010)

I tried the steps above and was looking hopeful until:


```
lucious# kldload if_bwn
kldload: can't load if_bwn: Exec format error
```

Still the same error. Any ideas?

```
lucious# uname -a
FreeBSD lucious.waffle.com 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
```


----------



## ckt1g3r (May 4, 2010)

hi , do this , `cd /usr/src/sys/modules/bwi/ && make install`


----------



## chunky_monkey (May 4, 2010)

ok I updated the src files and now I'm seeing this 


```
[root@lucious /usr/src/sys/modules/bwn]# make 
Warning: Object directory not changed from original /usr/src/sys/modules/bwn
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-
unit-growth=100 --param large-function-growth=1000 -fno-common -g -O0 -DKTR -DINVARIANTS -fno-omit-frame-pointer -mcmodel=kernel 
-mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding 
-fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/bwn/../../dev/bwn/if_bwn.c
In file included from /usr/src/sys/modules/bwn/../../dev/bwn/if_bwn.c:71:
@/net80211/ieee80211_ratectl.h: In function 'ieee80211_ratectl_init':
@/net80211/ieee80211_ratectl.h:66: error: 'struct ieee80211vap' has no member named 'iv_rate'
@/net80211/ieee80211_ratectl.h: In function 'ieee80211_ratectl_deinit':
@/net80211/ieee80211_ratectl.h:72: error: 'struct ieee80211vap' has no member named 'iv_rate'
@/net80211/ieee80211_ratectl.h: In function 'ieee80211_ratectl_node_init':
@/net80211/ieee80211_ratectl.h:80: error: 'const struct ieee80211vap' has no member named 'iv_rate'
@/net80211/ieee80211_ratectl.h: In function 'ieee80211_ratectl_node_deinit':
@/net80211/ieee80211_ratectl.h:88: error: 'struct ieee80211_node' has no member named 'ni_rctls'
@/net80211/ieee80211_ratectl.h:90: error: 'const struct ieee80211vap' has no member named 'iv_rate'
@/net80211/ieee80211_ratectl.h: In function 'ieee80211_ratectl_rate':
@/net80211/ieee80211_ratectl.h:98: error: 'struct ieee80211_node' has no member named 'ni_rctls'
@/net80211/ieee80211_ratectl.h:100: error: 'const struct ieee80211vap' has no member named 'iv_rate'
cc1: warnings being treated as errors
@/net80211/ieee80211_ratectl.h:101: warning: control reaches end of non-void function
@/net80211/ieee80211_ratectl.h: In function 'ieee80211_ratectl_tx_complete':
@/net80211/ieee80211_ratectl.h:107: error: 'const struct ieee80211_node' has no member named 'ni_rctls'
@/net80211/ieee80211_ratectl.h:109: error: 'const struct ieee80211vap' has no member named 'iv_rate'
@/net80211/ieee80211_ratectl.h: In function 'ieee80211_ratectl_tx_update':
@/net80211/ieee80211_ratectl.h:116: error: 'const struct ieee80211vap' has no member named 'iv_rate'
@/net80211/ieee80211_ratectl.h:118: error: 'const struct ieee80211_node' has no member named 'ni_rctls'
@/net80211/ieee80211_ratectl.h:120: error: 'const struct ieee80211vap' has no member named 'iv_rate'
@/net80211/ieee80211_ratectl.h: In function 'ieee80211_ratectl_setinterval':
@/net80211/ieee80211_ratectl.h:126: error: 'const struct ieee80211vap' has no member named 'iv_rate'
@/net80211/ieee80211_ratectl.h:128: error: 'const struct ieee80211vap' has no member named 'iv_rate'
*** Error code 1

Stop in /usr/src/sys/modules/bwn.
```

do I need to update the net80211 src tree as well? recompile the kernel?

Thanks for all the help so far, wouldn't even be close without this forum.


----------



## hermes (May 4, 2010)

Update the whole source tree to 8-STABLE and recompile kernel _and_ world. Itâ€™s important to keep these in sync.


----------



## everypot (May 4, 2010)

kldload if_bwn.ko



			
				chunky_monkey said:
			
		

> I tried the steps above and was looking hopeful until:
> 
> 
> ```
> ...


----------



## datsun280zx (May 7, 2010)

Ive been hacking away at trying to get my BCM4315 working on Release 8 #0 for about 6 days. Ive been reading various forums, personal websites, reinstalled freebsd about 3 times, used about 5 different drivers. Im lost.
Im trying to install it on my dell laptop a vostro 1500. Screen shots n such are hard for me to paste here.
Basically I boot up, su in, run dmesg | grep BCM and I only see my lan connection, the Broadcom 4401.
ifconfig shows me the broadcom ethernet 10/100, two firewire ethernet adapters and the loop back adapter.
I can access the internet, specifically ftp, to get drivers via the 10/100 adapter.
`pciconf -lv | grep BCM` shows me my wireless adapter

```
device = 'Broadcom Wireless B/G (BCM4315/BCM22062000)'
```
The drivers Ive tried so far are:

b44win.inf
bcm4sbxp.sys
bcmwl5.inf
bcmwl5.sys
bcmwl6.inf
bcmwl6.sys

I have installed /usr/ports/net/bwi-firmware-kmod
Loaded ndis and if_ndis
I use ndisgen to create the sys.ko files
I use kldload to load the files into the kernel
kldstat says

```
kernel
bcmwl5.sys
ndis.ko
if_ndis.ko
bwi_v3.ko
if_bwi.ko
```

I've added entries into my /boot/loader.conf file after each attempt ie

```
bcmwl5_sys_load="YES"
if_bwi_load="YES"
```
right on down the line of drivers
I made a wpa_supplicant.conf file with me network stuff in it

```
ssid="NETGEAR"
proto=DHCP
key_mgmt=NONE
priority=2
scan_ssid=1
```

Not much has been done in the rc.conf file as I dont have anything to configure
There is probably more Ive done over past 6 days. My brain is turning into tapioca. Does anyone have any suggestions?

These are some of the resources Ive been reading up on:

http://forums.freebsd.org/archive/index.php/t-8375.html
http://forums.freebsd.org/showthread.php?t=2477
http://forums.freebsd.org/showthread.php?t=2477&page=4
http://www.freebsd.org/doc/en/books/handbook/config-network-setup.html
http://dannyman.toldme.com/2005/01/05/freebsd-howto-ndisulate-windows-drivers/
http://www.freebsd.org/doc/en/books/handbook/network-wireless.html
http://www.freebsd.org/cgi/man.cgi?...ion=4&manpath=FreeBSD+8.0-RELEASE&format=html
http://forums.freebsd.org/showthread.php?t=8375&highlight=bcm4315


----------



## johnhollon (May 11, 2010)

*NEW-TO-FREEBSD&UNIX: About My Broadcom Wireless BCM4315*

NEW TO FREEBSD:'BROADCOM BCM4315 DRIVER' ASK FOR HELP

First of all, as a Chinese and do not learn enough, my English is very poor. 

And I must learn how to use FreeBsd for some reason. This is my first time to take a post here, if you have any bad feeling of my writing, please be patient.......

After installed, everything of the machine looks like perfect except Broadcom Wireless BCM4315. To install the BCM4315 dirver, in 4 days, I tried every way shown in the forum and other website through google, But I just got nothing to work.

With ngis - I've tried almost every version  including official and third drivers from 2004 to 2010, with bcmwl5.inf and bcmwl564.sys, sometimes .ko did nothing, sometimes cause fatal error, and every bcmwl6.inf and bcmwl664 cause fatal error.

With bwi in the ports, it seems did nothing. pciconf always shows none...

With bwi of "http://paradox.lissyara.su/bwi.02c.tar.bz2", cause a fatal error, some infomation is "has 4 cores......"

With bwn(4), can not kldload if_bwn, after kldload ssb, the BCM4315 shows none1 to ssb0, but can not work anymore, and sometiems, after kldload ssb, cause a fatal error.

I'm sure I have kldload every thing for ngis in the ngis way, and kldload firmware for bwi in the bwi way, and firmware bwn in the bwn way.

after all above, I called HP's technology support phone, and the answer is THERE IS NO SIGNED OR CERTIFIED BROADCOM DRIVER FOR UNIX, so they can not give any support to me.

DOES ANYBODY CAN TELL ME HOW TO INSTALL THIS DRIVER?

Though I can get the net through my LAN card, but it is very bad idea, as my work evn is wireless.

My computer is HP 4416s 171. FREEBSD is 8.0 REALESE

My pciconf info are below.

pciconf

```
none3@pci0:6:0:0:	class=0x028000 card=0x1508103c chip=xx431514e4 rev=0x01 hdr=0x00
	vender='Broadcom Corporation'
	device='Broadcom Wireless b/g (BCM4315/BCM22062000)'
	class=network
	bar[10]=type Memory, range 64, base 0x92000000, size 16384, enabled
	cap 01[40]=powerspec 3 supports D0 D1 D2 D3 current D0
	cap 09[58]=vendor (length 120)
	cap 05[e8]=MSI supports 1 message, 64bit
	cap 10[d0]=PCI-Express 1 endpoint max data 128(128) link x1(x1)
```


----------



## kpedersen (May 11, 2010)

I have the same wifi chip on my Dell Mini 9,

I did get it running flawlessly using ndisgen and the windows xp 32-bit drivers.

I just kept trying the Dell Wireless drivers found here

http://sourceforge.net/apps/mediawiki/ndiswrapper/index.php?title=Category:WORKS

IIRC at least one of them worked.

Its a right pain though, I wish I exported the driver from my preinstalled windows before i obliterated it.

I think my exact one was...
http://ftp.us.dell.com/network/R197390.EXE


----------



## johnhollon (May 13, 2010)

*Has no way to fix it...*

I can not install BCM4315 driver in my hp 4416s 171...

I think there is no way to fix the problem except using ndis. And after tried every windows driver, I just got faild...

Will anybody share the *_SYS.ko file, fit AMD64 Freebsd 8.0-release?

Thanks a lot!


----------



## unsobill (May 14, 2010)

guys follow instuctions from my post 174 on page 7 - it should work with 4315 and i386
its basically simple bcmwl5_sys.ko driver that loads on the startup - i get lots of trash in my tty1 so i have to switch to tty2 to work but at least wireless works !!! keep pounding it - you will find solution - i spent whole week to get it working, i know how u feel


p.s

by the way 7.2 works without any issues with ndis and 4315 driver


----------



## selven (May 21, 2010)

any idea if development for this driver is still going on and if there's any repository where i could get some source and manage to have try at this?


----------



## foo_daemon (Jun 2, 2010)

Using 9-current: the bwi0 driver loaded properly for my BCM4311 (dell 1390 wlan card), but was frequently causing kernel panics in the 'taskq' function when I did an AP scan or tried to join a specific ssid.  NDIS-derived driver is stable and works: how long has AP scanning been working on NDIS? I am very pleased with this =)


----------



## bluetick (Jun 7, 2010)

I have a Dell netbook 1012 with the BCM4315, I've got the card working, but after a few hours it will hang/crash. Unloading/reloading the kernel driver does not work. The computer must be turned off, not rebooted, to reset the card. 
The ndis driver will work, but must be loaded after the system is running, loading at boot time will cause a panic. This is with 8.1-prerelease.


----------



## SaveTheRbtz (Jun 16, 2010)

bluetick said:
			
		

> I have a Dell netbook 1012 with the BCM4315, I've got the card working, but after a few hours it will hang/crash. Unloading/reloading the kernel driver does not work. The computer must be turned off, not rebooted, to reset the card.
> The ndis driver will work, but must be loaded after the system is running, loading at boot time will cause a panic. This is with 8.1-prerelease.



You can try turning off DMA:


```
hw.bwn.usedma=0
```

in `#  loader.conf`


----------



## lebanon (Aug 30, 2010)

bluetick said:
			
		

> I have a Dell netbook 1012 with the BCM4315, I've got the card working, but after a few hours it will hang/crash. Unloading/reloading the kernel driver does not work. The computer must be turned off, not rebooted, to reset the card.
> The ndis driver will work, but must be loaded after the system is running, loading at boot time will cause a panic. This is with 8.1-prerelease.


I have a *HP ProBook 4510s*.
Using ndis driver results panic on load system.
Sent a request to Mailing list "freebsd-stable" - *Broadcom 4315 not working*.
Help run WiFi BCM4315.


----------



## wblock@ (Aug 30, 2010)

My 4312/4315 wants DMA disabled in /boot/loader.conf

```
hw.bwn.usedma=0
```


----------



## lebanon (Aug 30, 2010)

wblock said:
			
		

> My 4312/4315 wants DMA disabled in /boot/loader.conf
> 
> ```
> hw.bwn.usedma=0
> ```



OK.

`cat /boot/loader.conf`

```
if_bwn_load="YES"
hw.bwn.usedma=0
```

`reboot`
`kldload bwn_v4_lp_ucode.ko`
`ifconfig wlan0 create wlandev bwn0`
`ifconfig wlan0 up`

`cat /var/log/messages`


```
Aug 30 18:25:10 kernel: bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)
Aug 30 18:25:10 kernel: wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
Aug 30 18:25:16 kernel: bwn0: status of RF switch is changed to OFF
Aug 30 18:25:16 kernel: bwn0: please turns on the RF switch
Aug 30 18:25:17 kernel: bwn0: status of RF switch is changed to ON
Aug 30 18:25:18 kernel: bwn0: status of RF switch is changed to OFF
Aug 30 18:25:18 kernel: bwn0: please turns on the RF switch
Aug 30 18:25:19 kernel: bwn0: status of RF switch is changed to ON
Aug 30 18:25:28 kernel: bwn0: status of RF switch is changed to OFF
Aug 30 18:25:28 kernel: bwn0: please turns on the RF switch
Aug 30 18:25:30 kernel: bwn0: status of RF switch is changed to ON
Aug 30 18:25:31 kernel: bwn0: status of RF switch is changed to OFF
Aug 30 18:25:31 kernel: bwn0: please turns on the RF switch
Aug 30 18:25:33 kernel: bwn0: status of RF switch is changed to ON
```


----------



## wblock@ (Aug 30, 2010)

That "wireless switch" message only shows on mine when I turn the wireless switch off.  Maybe the switch is stuck?


----------



## lebanon (Aug 30, 2010)

I can click on the switch
be printed to the console, for example, "switch ON"
After this, it is automatically transferred to OFF, and so on

The lamp on the switch is always burning


----------



## DutchDaemon (Aug 30, 2010)

lebanon, use the proper formatting tags. Stay away from fonts, indent, etc.
http://forums.freebsd.org/showthread.php?t=8816


----------



## Deuce (Aug 31, 2010)

Trying to get ndis working with my Dell 1505 (BCM4321) card in my D820 laptop using WEP on FreeBSD 8.1-RELEASE #0 GENERIC i386.


```
> pciconf -v
-snip-
ndis0@pci0:12:0:0:      class=0x028000 card=0x000a1028 chip=0x432814e4 rev=0x03 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'Broadcom 432AGN 802.11a/b/g/draft-n Wi-Fi Solution (BCM4321KFBG)'
    class      = network
-snip-
```

I have no problems generating the module and loading it appears to "work":

```
ndis0: <Dell Wireless 1505 Draft 802.11n WLAN Mini-Card> mem 0xecffc000-0xecffffff,0xe0000000-0xe00fffff irq 17 at device 0.0 on pci12
ndis0: [ITHREAD]
ndis0: NDIS API version: 5.1
```

I configure my wlan device with: `ifconfig wlan0 create wlandev ndis0 ssid XXXX wepmode on weptxkey 1 wepkey 0xXXXXXXXXXX` which leaves ifconfig output having:\

```
ndis0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:19:7e:5b:d8:06
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:19:7e:5b:d8:06
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid Hurd channel 1 (2412 MHz 11b)
        country US authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit
        txpower 0 bmiss 7 scanvalid 60 bintval 0
```

I bring it up and it becomes:

```
ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:19:7e:5b:d8:06
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
        status: associated
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:19:7e:5b:d8:06
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid Hurd channel 1 (2412 MHz 11g)
        country US authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit
        txpower 0 bmiss 7 mcastrate 6 mgmtrate 6 scanvalid 60 protmode CTS
        bintval 0
```

With ndis0 associated but wlan0 with "no carrier".  I thought that the radio may be off, but `sysctl dev.ndis.0` shows:

```
dev.ndis.0.%desc: Dell Wireless 1505 Draft 802.11n WLAN Mini-Card
dev.ndis.0.%driver: ndis
dev.ndis.0.%location: slot=0 function=0 handle=\_SB_.PCI0.RP02.PXS2
dev.ndis.0.%pnpinfo: vendor=0x14e4 device=0x4328 subvendor=0x1028 subdevice=0x000a class=0x028000
dev.ndis.0.%parent: pci12
dev.ndis.0.RoamDelta: 1
dev.ndis.0.MPC: 1
dev.ndis.0.PowerSaveMode: 2
dev.ndis.0.PLCPHeader: 0
dev.ndis.0.frag: 2346
dev.ndis.0.rts: 2347
dev.ndis.0.NetworkAddress:
dev.ndis.0.antdiv: -1
dev.ndis.0.FrameBursting: 0
dev.ndis.0.Afterburner: 0
dev.ndis.0.ledbh0: -1
dev.ndis.0.ledbh1: -1
dev.ndis.0.ledbh2: -1
dev.ndis.0.ledbh3: -1
dev.ndis.0.leddc: 0xa0000
dev.ndis.0.Interference_Mode: -1
dev.ndis.0.ccx_rm: 1
dev.ndis.0.ccx_rm_limit: 300
dev.ndis.0.EFCEnable: 0
dev.ndis.0.Country: BE
dev.ndis.0.Chanspec: 11
dev.ndis.0.WME: -1
dev.ndis.0.LOM: 0
dev.ndis.0.IBSSAllowed: 1
dev.ndis.0.ssid_auto_promote: 0
dev.ndis.0.RadioState: 0
dev.ndis.0.WZCCoexist: 0
dev.ndis.0.Managed: 1
dev.ndis.0.vlan_mode: 0
dev.ndis.0.BTCoexist: 1
dev.ndis.0.abcap: 1
dev.ndis.0.AssocRoamPref: 1
dev.ndis.0.RoamTrigger: 0
dev.ndis.0.11HNetworks: 1
dev.ndis.0.IBSSMode: 0
dev.ndis.0.IBSSGProtection: 2
dev.ndis.0.LegacyMode: 2
dev.ndis.0.band: 0
dev.ndis.0.BandPref: 0
dev.ndis.0.RateA: 0
dev.ndis.0.Rate: 0
dev.ndis.0.ApCompatMode: 0
dev.ndis.0.BandwidthCap: 2
dev.ndis.0.1028000A: Dell Wireless 1505 Draft 802.11n WLAN Mini-Card
dev.ndis.0.Environment: 1
dev.ndis.0.NdisVersion: 0x00050001
dev.ndis.0.BusType: 5
dev.ndis.0.InterruptNumber: 17
dev.ndis.0.ForcePIO: UNSET
dev.ndis.0.AdapterDesc: UNSET
dev.ndis.0.DriverDesc: UNSET
dev.ndis.0.Brand: UNSET
dev.ndis.0.WPA: UNSET
dev.ndis.0.featureflag: UNSET
dev.ndis.0.LegacyProbe: UNSET
dev.ndis.0.ledblinkslow: UNSET
dev.ndis.0.ledblinkmed: UNSET
dev.ndis.0.ledblinkfast: UNSET
dev.ndis.0.WME_qosinfo: UNSET
dev.ndis.0.IBSSLink: UNSET
dev.ndis.0.PwrOut: UNSET
dev.ndis.0.BadFramePreempt: UNSET
dev.ndis.0.scan_channel_time: UNSET
dev.ndis.0.scan_unassoc_time: UNSET
dev.ndis.0.scan_home_time: UNSET
dev.ndis.0.scan_passive_time: UNSET
dev.ndis.0.scan_passes: UNSET
dev.ndis.0.EnableAutoConnect: UNSET
```

Which, since the inf file says a RadioState of zero is enabled suggests to me that the radio is on.  I've also tried fiddling with the wireless which, but that just seems to attach/detach the bluetooth and there is no affect on the wireless.

At no point does the WiFi light illuminate.

Any suggestions?


----------



## lebanon (Sep 4, 2010)

*Deuce*,
Click on switch WiFi On/Off
`# ifconfig wlan0 down`
`# ifconfig wlan0 up`

If status: no carrier, then again:
click on switch WiFi On/Off
`# ifconfig wlan0 down`
`# ifconfig wlan0 up`


----------



## everypot (Sep 9, 2010)

*Broadcom open sources wireless drivers!!*

It could have saved so much effort if they did it earlier. 

http://thread.gmane.org/gmane.linux.kernel.wireless.general/55418



> Broadcom would like to announce the initial release of a fully-open
> Linux driver for it's latest generation of 11n chipsets.  The driver,
> while still a work in progress, is released as full source and uses the
> native mac80211 stack.   It supports multiple current chips (BCM4313,
> ...


----------



## hermes (Sep 10, 2010)

Iâ€™m not yet sure if this is good or bad news. I mean â€“ what do we gain? A Linux driver, no free documentation. Broadcom will sit back and see no requirement for any further action. After all, we got a Linux driver! 

I donâ€™t think this will have any impact on Broadcom WLAN support in OSes other than Linux. Maybe the developers can extract *some* information out of the source code, but thatâ€™s about it.


----------



## wblock@ (Sep 10, 2010)

> I donâ€™t think this will have any impact on Broadcom WLAN support in OSes other than Linux. Maybe the developers can extract *some* information out of the source code, but thatâ€™s about it.



Being able to see how a vendor's code makes their hardware work is extremely useful to developers, and developers are the ones who create and maintain FreeBSD drivers.


----------



## nekoexmachina (Sep 17, 2010)

bwn driver now works with bcm4315 (BCM4315/BCM22062000, class=0x028000 card=0x317d103c chip=0x431514e4 rev=0x01 hdr=0x00) on my hp 530 laptop.

Everything is okay (running for ~20mins, installing needed ports).
Speed is awesome, too.


edit: trouble -- scan is not working. 
`ifconfig wlan0 scan` just hangs for unlimited time.


----------



## NIX87 (Nov 1, 2010)

nekoexmachina said:
			
		

> bwn driver now works with bcm4315 (BCM4315/BCM22062000, class=0x028000 card=0x317d103c chip=0x431514e4 rev=0x01 hdr=0x00) on my hp 530 laptop.
> 
> Everything is okay (running for ~20mins, installing needed ports).
> Speed is awesome, too.
> ...



scan is working try `wlan0 up list scan`


----------



## skmpz (Nov 2, 2010)

```
device = 'Broadcom Wireless B/G (BCM4315/BCM22062000)'
```

Anyone managed to get it working? I tried but nothing..

```
bsd# cat /var/log/messages | grep bwn
Nov  2 21:04:14 bsd kernel: siba_bwn0: <Broadcom BCM4312 802.11b/g Wireless> mem 0xf69fc000-0xf69fffff irq 17 at device 0.0 on pci12
Nov  2 21:04:14 bsd kernel: bwn0 on siba_bwn0
Nov  2 21:04:14 bsd kernel: bwn0: WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO (manuf 0x17f ver 0x2062 rev 2)
Nov  2 21:04:14 bsd kernel: bwn0: PIO
Nov  2 21:04:14 bsd kernel: bwn0: Using 1 MSI messages
Nov  2 21:04:14 bsd kernel: bwn0: [FILTER]
Nov  2 21:05:39 bsd kernel: bwn_v4_lp_ucode15: could not load firmware image, error 2
Nov  2 21:05:39 bsd kernel: bwn0: the fw file(bwn_v4_lp_ucode15) not found
Nov  2 21:05:39 bsd kernel: bwn-open_v4_lp_ucode15: could not load firmware image, error 2
Nov  2 21:05:39 bsd kernel: bwn0: the fw file(bwn-open_v4_lp_ucode15) not found
Nov  2 21:09:37 bsd kernel: bwn_v4_lp_ucode15: could not load firmware image, error 2
Nov  2 21:09:37 bsd kernel: bwn0: the fw file(bwn_v4_lp_ucode15) not found
Nov  2 21:09:37 bsd kernel: bwn-open_v4_lp_ucode15: could not load firmware image, error 2
Nov  2 21:09:37 bsd kernel: bwn0: the fw file(bwn-open_v4_lp_ucode15) not found
```


----------



## NIX87 (Nov 3, 2010)

```
bsd# cat /var/log/messages | grep bwn
Nov  2 21:04:14 bsd kernel: siba_bwn0: <Broadcom BCM4312 802.11b/g Wireless> mem 0xf69fc000-0xf69fffff irq 17 at device 0.0 on pci12
Nov  2 21:04:14 bsd kernel: bwn0 on siba_bwn0
Nov  2 21:04:14 bsd kernel: bwn0: WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO (manuf 0x17f ver 0x2062 rev 2)
Nov  2 21:04:14 bsd kernel: bwn0: PIO
Nov  2 21:04:14 bsd kernel: bwn0: Using 1 MSI messages
Nov  2 21:04:14 bsd kernel: bwn0: [FILTER]
Nov  2 21:05:39 bsd kernel: bwn_v4_lp_ucode15: could not load firmware image, error 2
Nov  2 21:05:39 bsd kernel: bwn0: the fw file(bwn_v4_lp_ucode15) not found
Nov  2 21:05:39 bsd kernel: bwn-open_v4_lp_ucode15: could not load firmware image, error 2
Nov  2 21:05:39 bsd kernel: bwn0: the fw file(bwn-open_v4_lp_ucode15) not found
Nov  2 21:09:37 bsd kernel: bwn_v4_lp_ucode15: could not load firmware image, error 2
Nov  2 21:09:37 bsd kernel: bwn0: the fw file(bwn_v4_lp_ucode15) not found
Nov  2 21:09:37 bsd kernel: bwn-open_v4_lp_ucode15: could not load firmware image, error 2
Nov  2 21:09:37 bsd kernel: bwn0: the fw file(bwn-open_v4_lp_ucode15) not found
```

driver tell you can't find the modules  
modules is installed ?  
if yes load them on kldload.
modules are in /boot/modules
& driver works without hw.bwn.usedma=0

The driver tells you it can't find the modules. Are the modules installed? If yes, load them with kldload(8). The modules are in /boot/modules, and the driver works without hw.bwn.usedma=0.


----------



## skmpz (Nov 3, 2010)

Everything is installed.. I'm trying to connect to an open network and so my wpa_complicant.conf is

```
network={
ssid="the network i'm trying"
}
```
I've installed bwn and modules and loaded..
Then I do `/etc/rc.d/netif start` and:
The bwn0 status is associated and the wlan0 has the ssid of the network and locks on the correct channel but status: no carrier

Sorry for not pasting everything but I'm on another system right now..


----------



## NIX87 (Nov 3, 2010)

If X11 (KDE Gnome or etc) is installed use the wifimgr 

`cd /usr/ports/net-mgmt/wifimgr && make && make install`

and this in /etc/rc.conf 


```
network_interfaces="AUTO"
wpa_supplicant_enable="YES"
wlans_bwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
```

and in /boot/defaults/loader.conf [ *NO!* see below - Mod. ]

```
bwn_v4_lp_ucode_load="YES"
```

Then reboot and logon in X11 and run wifimgr

All is working


----------



## NIX87 (Nov 3, 2010)

Forgot ... in /boot/default/loader.conf [ *NO!* see below - Mod. ]

```
if_bwn_load="YES"
```


----------



## skmpz (Nov 3, 2010)

I had all these things except wifimgr... I installed it and everything worked.. Thanx


----------



## DutchDaemon (Nov 3, 2010)

*DO NOT EDIT /boot/defaults/loader.conf !* Override /boot/defaults/loader.conf using /boot/loader.conf, or your changes will be wiped out on the next install/upgrade.

And please write proper posts instead of this unformatted mess. Thanks.


----------



## kpedersen (Nov 3, 2010)

bwn(4) requires a firmware to be loaded.

/boot/loader.conf

```
if_bwn_load="YES"
bwn_v4_ucode_load="YES"
```

You get the firmware from the net/bwn-firmware port (I think).


----------



## DutchDaemon (Nov 4, 2010)

There's net/bwn-firmware-kmod, if that's what you mean.


----------



## Radek (Nov 6, 2010)

I hope it's ok I'm writing here.

I have also this WiFi card in my notebook:


```
siba_bwn0@pci0:3:0:0:   class=0x028000 card=0x1371103c chip=0x431214e4 rev=0x02 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM4310 UART (Wireless Ethernet Adapter)'
    class      = network
```

I tried to use the bwi-firmware-kmod driver but it didn't worked at all. Then I found this post and compiled the bwn-firmware-kmod instead.
I also added 

```
if_bwn_load="YES"
```
 to the /boot/loader.conf. Now it seems to work and the card is being detected but I cannot see any networks. 

I executes: 
	
	



```
ifconfig wlan0 scan
```
 but it doesn't return any results. Also the network manager in KDE cannot see anything. 
What can I try to do to connect to my network. By the way, I also tried to add my WLAN manually in KDE but still no results.

Regards,
Radek


----------



## richardpl (Nov 6, 2010)

If you ever bothered to search forum you would find this command:

`# ifconfig wlan0 list scan`

This one is being asked all the time but it appears people don't want to read ifconfig(8) manual page.

Also make sure that radio is turned on.


----------



## Radek (Nov 6, 2010)

richardpl said:
			
		

> If you ever bothered to search forum you would find this command:
> 
> `# ifconfig wlan0 list scan`
> 
> ...



Sorry but this one I have already found too (forget to mention). Radio is also on.


----------



## richardpl (Nov 6, 2010)

Anything displayed in console?


----------



## Radek (Nov 7, 2010)

No, as I wrote before, no output at all.


----------



## richardpl (Nov 8, 2010)

Did you mentioned that bwn(4) firmware is loaded?
Show output of kldstat(8).
And output of:
`$ dmesg |grep -C15 bwn`


----------



## Radek (Nov 8, 2010)

richardpl said:
			
		

> Did you mentioned that bwn(4) firmware is loaded?



I followed these instruction from bwn(4) and added 
	
	



```
if_bwn_load="YES"
```
 to the /boot/loader.conf so I suppose it should be.

Unfortunately I don't know how to do this:



> To compile this driver into the kernel, place the following lines in your
> kernel configuration file:
> 
> device siba_bwn
> ...



So I choose the alternative way.



			
				richardpl said:
			
		

> Did you mentioned that bwn(4) firmware is loaded?
> Show output of kldstat(8).




```
Id Refs Address            Size     Name
 1  127 0xffffffff80100000 dc1600   kernel
 2    1 0xffffffff80ec2000 1bb0     splash_pcx.ko
 3    1 0xffffffff80ec4000 71a0     vesa.ko
 4    2 0xffffffff80ed4000 ee88     ntfs.ko
 5    1 0xffffffff80ee3000 19eee0   zfs.ko
 6    2 0xffffffff81082000 3790     opensolaris.ko
 7    1 0xffffffff81086000 194c8    geom_eli.ko
 8    2 0xffffffff810a0000 2a248    crypto.ko
 9    3 0xffffffff810cb000 dc40     zlib.ko
10    1 0xffffffff810d9000 1e650    geom_journal.ko
11    1 0xffffffff810f8000 21068    geom_mirror.ko
12    1 0xffffffff8111a000 3208     geom_uzip.ko
13    1 0xffffffff8111e000 41398    if_bwn.ko
14    2 0xffffffff81160000 ca80     siba_bwn.ko
15    1 0xffffffff8116d000 e710     if_ipw.ko
16    1 0xffffffff8117c000 130b8    if_iwi.ko
17    1 0xffffffff81190000 12258    if_wpi.ko
18    4 0xffffffff811a3000 751d0    sound.ko
19    1 0xffffffff81219000 13eb0    snd_uaudio.ko
20    1 0xffffffff8122d000 1dfa8    if_iwn.ko
21    1 0xffffffff8124b000 5638     cuse4bsd.ko
22    1 0xffffffff81251000 12970    pwc.ko
23    1 0xffffffff81264000 adc8     mmc.ko
24    1 0xffffffff8126f000 4048     mmcsd.ko
25    1 0xffffffff81274000 fdc0     ahci.ko
26    1 0xffffffff81284000 a468     siis.ko
27    1 0xffffffff8128f000 8130     sdhci.ko
28    1 0xffffffff81298000 5218     scd.ko
29    5 0xffffffff8129e000 6be0     libiconv.ko
30    1 0xffffffff812a5000 1fd8     libmchain.ko
31    1 0xffffffff812a7000 1008     cd9660_iconv.ko
32    1 0xffffffff812a9000 1028     msdosfs_iconv.ko
33    1 0xffffffff812ab000 fd8      ntfs_iconv.ko
34    2 0xffffffff812ac000 98c0     udf.ko
35    1 0xffffffff812b6000 fc0      udf_iconv.ko
36    1 0xffffffff812b7000 b150     tmpfs.ko
37    1 0xffffffff812c3000 dc2e60   nvidia.ko
38    3 0xffffffff82086000 40e60    linux.ko
39    1 0xffffffff82222000 39d0     linprocfs.ko
40    1 0xffffffff82226000 4ab8     if_lagg.ko
41    1 0xffffffff8222b000 141c6    snd_hda.ko
42    1 0xffffffff82240000 1fbe     nullfs.ko
```



			
				richardpl said:
			
		

> And output of:
> `$ dmesg |grep -C15 bwn`




```
ahci0: <NVIDIA MCP65 AHCI SATA controller> port 0x30f8-0x30ff,0x30ec-0x30ef,0x30f0-0x30f7,0x30e8-0x30eb,0x30d0-0x30df mem 0xf2484000-0xf2485fff irq 23 at device 10.0 on pci0
ahci0: [ITHREAD]
ahci0: AHCI v1.10 with 4 3Gbps ports, Port Multiplier supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich0: [ITHREAD]
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich1: [ITHREAD]
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich2: [ITHREAD]
ahcich3: <AHCI channel> at channel 3 on ahci0
ahcich3: [ITHREAD]
pcib2: <ACPI PCI-PCI bridge> at device 11.0 on pci0
pci1: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> at device 12.0 on pci0
pci3: <ACPI PCI bus> on pcib3
siba_bwn0: <Broadcom BCM4312 802.11a/b/g Wireless> mem 0xf2000000-0xf2003fff irq 16 at device 0.0 on pci3
siba_bwn0: unsupported coreid (USB 1.1 Host)
bwn0 on siba_bwn0
bwn0: WLAN (chipid 0x4311 rev 13) PHY (analog 4 type 2 rev 9) RADIO (manuf 0x17f ver 0x2050 rev 2)
bwn0: DMA (64 bits)
bwn0: Using 1 MSI messages
bwn0: [FILTER]
pcib4: <ACPI PCI-PCI bridge> at device 13.0 on pci0
pci5: <ACPI PCI bus> on pcib4
vgapci0: <VGA-compatible display> port 0x4000-0x407f mem 0xce000000-0xceffffff,0xd0000000-0xdfffffff,0xcc000000-0xcdffffff irq 19 at device 0.0 on pci5
nvidia0: <GeForce 8400M GS> on vgapci0
vgapci0: child nvidia0 requested pci_enable_busmaster
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
nvidia0: [ITHREAD]
pcib5: <ACPI PCI-PCI bridge> at device 14.0 on pci0
pci9: <ACPI PCI bus> on pcib5
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz0: _CRT value is absurd, ignored (-273.2C)
atrtc0: <AT realtime clock> port 0x70-0x71 on acpi0
--
uhub1: 10 ports with 10 removable, self powered
(probe0:ata0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
(probe0:ata0:0:0:0): CAM status: SCSI Status Error
(probe0:ata0:0:0:0): SCSI status: Check Condition
(probe0:ata0:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed)
cd0 at ata0 bus 0 scbus4 target 0 lun 0
cd0: <Slimtype DVD A  DS8A1H WH66> Removable CD-ROM SCSI-0 device 
cd0: 16.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
ugen1.2: <SuYin> at usbus1
Trying to mount root from ufs:/dev/label/rootfs0
WARNING: / was not properly dismounted
WARNING: /var was not properly dismounted
WARNING: /usr was not properly dismounted
WARNING: TMPFS is considered to be a highly experimental feature in FreeBSD.
bwn_v4_ucode13: could not load firmware image, error 2
bwn0: the fw file(bwn_v4_ucode13) not found
bwn-open_v4_ucode13: could not load firmware image, error 2
bwn0: the fw file(bwn-open_v4_ucode13) not found
wlan0: Ethernet address: 00:1b:24:bf:02:88
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn_v4_ucode13: could not load firmware image, error 2
bwn0: the fw file(bwn_v4_ucode13) not found
bwn-open_v4_ucode13: could not load firmware image, error 2
bwn0: the fw file(bwn-open_v4_ucode13) not found
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
hdac0: <NVidia MCP65 High Definition Audio Controller> mem 0xf2480000-0xf2483fff irq 21 at device 7.0 on pci0
hdac0: HDA Driver Revision: 20100226_0142
hdac0: [ITHREAD]
hdac0: HDA Codec #0: Conexant CX20549 (Venice)
fwohci0: <1394 Open Host Controller Interface> mem 0xbff60000-0xbff607ff irq 9 at device 5.0 on pci7
fwohci0: [ITHREAD]
fwohci0: OHCI version 0.0 (ROM=0)
fwohci0: invalid OHCI version
fwohci0: fwohci_init failed with err=6
device_attach: fwohci0 attach returned 5
pcm0: <HDA Conexant CX20549 (Venice) PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm1: <HDA Conexant CX20549 (Venice) PCM #1 Digital> at cad 0 nid 1 on hdac0
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback
```


----------



## richardpl (Nov 8, 2010)

You do not care what is written in console. Does those ring a bell?


```
bwn_v4_ucode13: could not load firmware image, error 2
bwn0: the fw file(bwn_v4_ucode13) not found
bwn-open_v4_ucode13: could not load firmware image, error 2
bwn0: the fw file(bwn-open_v4_ucode13) not found
bwn_v4_ucode13: could not load firmware image, error 2
bwn0: the fw file(bwn_v4_ucode13) not found
bwn-open_v4_ucode13: could not load firmware image, error 2
bwn0: the fw file(bwn-open_v4_ucode13) not found
```

You did not read manual page bwn(4) (carefully). Does this ring a bell?

```
[b]This driver requires firmware to be loaded before it will work[/b].  The
     ports/net/bwn-firmware-kmod port needs to be installed before ifconfig(8)
     will work.  Most cases you need to use bwn_v4_ucode module but if you are
     a LP (low power) PHY user please uses bwn_v4_lp_ucode module.
```

Output of kldstat(8) does not show firmware for bwn(4) loaded.


----------



## Radek (Nov 8, 2010)

Is there any reason you are so impolite to me? !



			
				richardpl said:
			
		

> You did not read manual page bwn(4) (carefully). Does this ring a bell?
> 
> ```
> [b]This driver requires firmware to be loaded before it will work[/b].  The
> ...




I *have read the man page* for bwn (and if you would read what I wrote before you would know that) and *I compiled the firmware* as stated in the manual *and I configured everything* as stated in the manual and didn't get any error message so I didn't supposed that it didn't work.



			
				richardpl said:
			
		

> ```
> bwn_v4_ucode13: could not load firmware image, error 2
> bwn0: the fw file(bwn_v4_ucode13) not found
> ```



Sorry didn't saw that. But even if, instead playing a big hero/guru here and telling me what *everything I did wrong*, maybe it would be much more polite and helpful for me and probably lot of other user if you could explain me *what should I do or how do it right*?


----------



## Radek (Nov 8, 2010)

Ok, I loaded these module manually and restarted network. It works then but what can I do to load it automatically with the system start?


----------



## richardpl (Nov 8, 2010)

Read loader.conf(5).

If I'm lazy like you are, I would never take look at this thread (or forum in general).

Nothing personal.


----------



## Radek (Nov 8, 2010)

richardpl said:
			
		

> Read loader.conf(5).
> 
> If I'm lazy like you are, I would never take look at this thread (or forum in general).
> 
> Nothing personal.



You are so arrogant that it almost unbelievable. 

Nothing personal


----------



## DutchDaemon (Nov 8, 2010)

You're both going to stop this now. Or it will get personal.


----------



## Radek (Nov 8, 2010)

DutchDaemon said:
			
		

> You're both going to stop this now. Or it will get personal.



Of course we do. No matter how, but he helped me a lot so I said "thank you" and it solved fro me.


----------



## Nollo (Nov 11, 2010)

My card is not supported by bwi/bwn, do you know if someone is working on new driver based on http://www.broadcom.com/support/802.11/linux_sta.php ?

Here is my pciconf


```
hostb0@pci0:0:0:0:	class=0x060000 card=0x04411028 chip=0x00448086 rev=0x18 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:1:0:	class=0x060400 card=0x04411028 chip=0x00458086 rev=0x18 hdr=0x01
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-PCI
none0@pci0:0:22:0:	class=0x078000 card=0x04411028 chip=0x3b648086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = simple comms
ehci0@pci0:0:26:0:	class=0x0c0320 card=0x04411028 chip=0x3b3c8086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = serial bus
    subclass   = USB
none1@pci0:0:27:0:	class=0x040300 card=0x04411028 chip=0x3b568086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = multimedia
    subclass   = HDA
pcib2@pci0:0:28:0:	class=0x060400 card=0x04411028 chip=0x3b428086 rev=0x06 hdr=0x01
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:28:1:	class=0x060400 card=0x04411028 chip=0x3b448086 rev=0x06 hdr=0x01
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:28:2:	class=0x060400 card=0x04411028 chip=0x3b468086 rev=0x06 hdr=0x01
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-PCI
pcib5@pci0:0:28:4:	class=0x060400 card=0x04411028 chip=0x3b4a8086 rev=0x06 hdr=0x01
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-PCI
ehci1@pci0:0:29:0:	class=0x0c0320 card=0x04411028 chip=0x3b348086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = serial bus
    subclass   = USB
pcib6@pci0:0:30:0:	class=0x060401 card=0x04411028 chip=0x24488086 rev=0xa6 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801 Family (ICH2/3/4/5/6/7/8/9-M) Hub Interface to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:	class=0x060100 card=0x04411028 chip=0x3b0b8086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-ISA
atapci0@pci0:0:31:2:	class=0x010601 card=0x04411028 chip=0x3b2f8086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'IBEX AHCI Controller(6Port)'
    class      = mass storage
    subclass   = SATA
none2@pci0:0:31:3:	class=0x0c0500 card=0x04411028 chip=0x3b308086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = serial bus
    subclass   = SMBus
none3@pci0:0:31:6:	class=0x118000 card=0x04411028 chip=0x3b328086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = dasp
vgapci0@pci0:1:0:0:	class=0x030000 card=0x04411028 chip=0x0a7510de rev=0xa2 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    class      = display
    subclass   = VGA
none4@pci0:1:0:1:	class=0x040300 card=0x04411028 chip=0x0be310de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    class      = multimedia
    subclass   = HDA
none5@pci0:18:0:0:	class=0x028000 card=0x00101028 chip=0x472714e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    class      = network
re0@pci0:19:0:0:	class=0x020000 card=0x04411028 chip=0x816810ec rev=0x03 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet
```


----------



## singing_sky (Dec 7, 2010)

I've got my BCM4312 worked finally!!
This is my dmesg message..


```
firmware_register: cannot register image bwn_v4_lp_b0g0initvals5, firmware table full!
module_register_init: MOD_LOAD (bwn_v4_lp_ucode_fw, 0xc1181e70, 0) error 6
siba_bwn0: <Broadcom BCM4312 802.11b/g Wireless> mem 0x9b000000-0x9b003fff irq 18 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]
bwn_v4_lp_ucode15: could not load firmware image, error 2
bwn0: the fw file(bwn_v4_lp_ucode15) not found
bwn-open_v4_lp_ucode15: could not load firmware image, error 2
bwn0: the fw file(bwn-open_v4_lp_ucode15) not found
```

and notice such one line:
	
	



```
firmware_register: cannot register image bwn_v4_lp_b0g0initvals5, firmware table full!
module_register_init: MOD_LOAD (bwn_v4_lp_ucode_fw, 0xc1181e70, 0) error 6
```

and then i enlager the firmware table size by modifying /sys/kern/subr_firmware.c

```
#define	FIRMWARE_MAX	30
```
increase the number 30 to a higer value. i changed it to 60
and then rebuild the kernel.
then it work!!!


----------



## Seeker (Dec 7, 2010)

I'm using:

```
FreeBSD 8.2-PRERELEASE #0
```
My chip is *BCM4321*
I get:

```
siba_bwn0: <Unknown> mem 0xf1ffc000-0xf1ffffff,0xf0000000-0xf00fffff irq 17 at device 0.0 on pci12
siba_bwn0: warn: multiple PCI(E) cores
siba_bwn0: unsupported coreid (USB 1.1 Host)
```


----------



## richardpl (Dec 7, 2010)

If if_bwn is loaded and bwn0 doesn't appear, bwn(4) does not support your card (yet).


----------



## Seeker (Dec 7, 2010)

That is a case with me. 
I guess I'll have to wait with ndisulator.


----------



## richardpl (Dec 7, 2010)

NDISulator on 8.2 have already got important changes: usable amd64 support being one of them.

Because you use wpa_supplicant, having scan result from ifconfig is not important right now.


----------



## Seeker (Dec 7, 2010)

Yes, I did found commit of LAST stable_ndis5 (just before merge) and am currently using it.
Thou, out in caffe, where WPA isn't needed as WiFi is open for guests.
Works also at home with my encrypted WPA AP.


----------



## cahimira (Dec 14, 2010)

Hi!,

I have problems with my Broadcom card.

My installation is:
** OS: FreeBSD 8.1-RELEASE
* Wifi card: BCM4309
* CPU: PowerPC (POWERBOOK G4)*

_NOTE: the wifi card work fine in the same machine (powerbook g4) with UBUNTU and MACOS X (but I am a FreeBSD fan).
_
Here is info about my card:


```
# pciconf -lvcb

none0@pci1:0:18:0:	class=0x028000 card=0x004e106b chip=0x432014e4 rev=0x02 hdr=0x00
	vendor = 'Broadcom Corporation'
	device = '802.11b/g Wireless LAN Controller (BCM4309)'
	class = network
	bar [10] = type Memory, range 32, base 0x80084000, size 8192, enabled
	cap 01[40] = powerspec 2 supports D0 D1 D2 D3 current D0
```

*[TEST #1: GENERIC kernel]*


```
# kldload bwn_v4_lp_ucode

firmware_register: cannot register image bwn_v4_lp_lp0initvals15, firmware table full!
module_register_init: MOD_LOAD (bwn_v4_lp_ucode_fw, 0xd1be040c, 0) error 6

Same results with: bwn_v4_ucode and bwi_v3_ucode
```

*[TEST #2: CUSTOM KERNEL BWI]*

1- I edit "/sys/kern/subr_firmware.c" and change constant "FIRMWARE_MAX" from 30 to 60.

2- Then I boot with the custom kernel.

3- Load modules


```
# kldload bwi_v3_ucode

# kldload if_bwi
bwi0: <Broadcom BCM4306 802.11b/g Wireless Lan> mem 0x80084000-0x80085fff irq 52 at device 18.0 on pci1
bwi0: [ITHREAD]
bwi0: BBP: id 0x4306, rev 0x2, pkg 0
bwi0: MAC: rev 4
bwi0: PHY: type 2, rev 1, ver 1
bwi0: RF: manu 0x17f, type 0x2050, rev 2
bwi0: invalid antenna gain in sprom
bwi0: WARNING: using obsoleted if_watchdog interface

# kldstat
Id	Refs	Address		Size		Name
1	13		0x100000	843180	kernel
2	1		0xd1bdf000	29000		bwi_v3_ucode.ko
3	1		0xd1c08000	33000		if_bwi.ko
4	2		0xd1c3b000	61000		wlan.ko

# pciconf -lvcb

bwi0@pci1:0:18:0:	class=0x028000 card=0x004e106b chip=0x432014e4 rev=0x02 hdr=0x00
	vendor = 'Broadcom Corporation'
	device = '802.11b/g Wireless LAN Controller (BCM4309)'
	class = network
	bar [10] = type Memory, range 32, base 0x80084000, size 8192, enabled
	cap 01[40] = powerspec 2 supports D0 D1 D2 D3 current D0

# ifconfig bwi0
bwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:0a:95:f1:ed:65
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
```

_Interface created and linked to driver, fine!_

4- Create wlandev interface


```
# ifconfig wlan0 create wlandev bwi0
wlan0: Ethernet address: 00:0a:95:f1:ed:65

# ifconfig wlan0
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:0a:95:f1:ed:65
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
	ssid "" channel 1 (2412 Mhz 11b)
	country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
	bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 1
	bintval 0
```

_All working fine!_

5- UP wlandev interface


```
# ifconfig wlan0 up
bwi0: firmware rev 0x0127, patch level 0x000e
```

*RESULT: my notebook halt/crash , without show any messages...*

*[TEST #3: CUSTOM KERNEL BWN]*

1- Same of TEST #2

2- Same of TEST #2

3- Load modules


```
# kldload bwn_v4_lp_ucode
# kldload if_bwn
siba_bwi0: <Broadcom BCM4306 802.11b/g Wireless Lan> mem 0x80084000-0x80085fff irq 52 at device 18.0 on pci1
siba_bwi0: warn: multiple 802.11 core
```

*RESULT: interface not created :-( (same result with bwn_v4_ucode)*

NOTE: if I try to load "if_bwi.ko" or "if_bwn.ko" in boot time (/boot/loader.conf) , I get a "KLD file XXXXX is missing dependencies" boot message.


----------



## richardpl (Dec 14, 2010)

Then your only solution currrently is ndis(4)


----------



## cahimira (Dec 15, 2010)

ndis is not supported in POWERPC :-(


----------



## tingo (Jan 16, 2011)

*BCM4309 doesn't work with if_bwn*

Hi, just confirming that the BCM4309 doesn't work with *if_bwn* and current net/bwn-firmware-kmod from ports. Details: the machine is a Mac PowerBook G4, currently running FreeBSD 8.1-release:

```
root@powerbook-g4# uname -a
FreeBSD powerbook-g4.kg4.no 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Jul 18 11:09:21 UTC 2010
root@xserve.lan.xcllnt.net:/usr/obj/usr/src/sys/GENERIC  powerpc
```
hardware:

```
root@powerbook-g4# pciconf -lv | grep -A 3 bwn
siba_bwn0@pci1:0:18:0:	class=0x028000 card=0x004e106b chip=0x432014e4 rev=0x03 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = '802.11b/g Wireless LAN Controller (BCM4309)'
    class      = network
```
relevant ports:

```
root@powerbook-g4# pkg_info | grep b[4w][3n]
b43-fwcutter-012    Extracts firmware for Broadcom Wireless adapters
bwn-firmware-kmod-0.1.0 Broadcom AirForce IEEE 802.11 Firmware Kernel Module
```
Loading the modules work, but when I do `# ifconfig wlan up`
 I get this in /var/log/messages:

```
Jan 16 19:42:45 powerbook-g4 kernel: bwn_v4_ucode5: could not load firmware image, error 2
Jan 16 19:42:45 powerbook-g4 kernel: bwn0: the fw file(bwn_v4_ucode5) not found
Jan 16 19:42:45 powerbook-g4 kernel: bwn-open_v4_ucode5: could not load firmware image, error 2
Jan 16 19:42:45 powerbook-g4 kernel: bwn0: the fw file(bwn-open_v4_ucode5) not found
```
If anyone is working on a port which includes that firmware, I will be happy to test the port.


----------



## wblock@ (Jan 17, 2011)

tingo said:
			
		

> Hi, just confirming that the BCM4309 doesn't work with *if_bwn* and current net/bwn-firmware-kmod from ports. Details: the machine is a Mac PowerBook G4, currently running FreeBSD 8.1-release:



Back in June, Weongyo Jeong was nice enough to help me with a Dell Truemobile 1300, which pciconf said was a 4309:

```
siba_bwn0@pci0:2:3:0:   class=0x028000 card=0x00011028 chip=0x432014e4 rev=0x02 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = '802.11b/g Wireless LAN Controller (BCM4309)'
    class      = network
```

That card only worked with a patched version of bwi(4) and net/bwi-firmware-kmod.  I don't know if the patches have been committed to 8-stable or even -current, and unfortunately no longer have the card or a mini-PCI slot in which to try it.


----------



## emc2 (May 27, 2011)

Is anyone interested in/already working on getting these drivers to work with BCM 4322 chipsets (the kind that come with MacBooks)?  I'm potentially interested in taking this on as a side-project, but I'm not familiar with these drivers.


----------



## Seeker (May 27, 2011)

I have BCM 4321 and will gladly test your code.


----------



## adrian@ (May 30, 2011)

.. if you guys have wireless stack related questions and wish to work on fixing up this driver, don't forget to ask the freebsd-wireless developers.


----------



## emc2 (Jun 10, 2011)

I've never done any work with FreeBSD wireless drivers, so I was testing the waters to see if someone with more experience might be interested.

In any case, I know there's a Linux driver, which seems to be C code that calls into a closed-source .o file.  Disassembling closed-source drivers to figure things out *is* something I've done before.


----------



## KNOStic (Jun 15, 2011)

@emc2:

This would be fantastic if you can take up the gauntlet. I'd been hoping Weongyo would have been able to do so, but the PHYS-N nature of those radios seemed insurmountable. I looked at the Linux drivers published by Broadcom but ended up lost in all that penguin stuff.


----------



## Seeker (Jun 15, 2011)

Ideally, person doing this, would be one from linux world, that already wrote drivers for linux, at least once and now has transferred to BSD and is prepared to write drivers for FreeBSD.


----------



## emc2 (Jun 16, 2011)

I've been out of FreeBSD for a while, and I haven't done any work on wireless drivers since 2006.  However, I did help out a group with porting a driver to linux on a handheld device by disassembling the windows drivers and figuring out how they worked.

I don't have alot of free time, but I could try to do the same here.  I have both the broadcom linux driver, and at least from what I've seen so far, it looks promising (ie, every single function and global variable has a name).  It would be best if I could get in contact with someone to get more information on the ins and outs of the drivers.


----------



## emc2 (Jun 27, 2011)

I've been looking more at the Linux driver.  The closed source .o file only has a handful of undefined symbols in it, about half of which are basic C functions (memcpy, strlen, etc.).  My plan was/is to to reverse-compile the .o to get information which could be used to extend the bwn driver.  But I wonder how hard it would be to write a wrapper around the .o that could plug into the FreeBSD kernel, as a way to get functionality in the mean time (and maybe to get some info about how the driver works via DDB)?


----------



## Seeker (Jun 27, 2011)

Don't forget to pester rice eater_!_


----------



## richardpl (Jun 27, 2011)

emc2 said:
			
		

> I've been looking more at the Linux driver.  The closed source .o file only has a handful of undefined symbols in it, about half of which are basic C functions (memcpy, strlen, etc.).  My plan was/is to to reverse-compile the .o to get information which could be used to extend the bwn driver.  But I wonder how hard it would be to write a wrapper around the .o that could plug into the FreeBSD kernel, as a way to get functionality in the mean time (and maybe to get some info about how the driver works via DDB)?



Didn't Linux guys do it already? Why not just use Linux code? It is already available.


----------



## emc2 (Jun 28, 2011)

richardpl said:
			
		

> Didn't Linux guys do it already? Why not just use Linux code? It is already available.



Can the FreeBSD kernel support Linux network driver interfaces and kernel APIs directly? (I'd be rather surprised if it can)


----------



## DutchDaemon (Jun 28, 2011)

No, there's only Linux emulation.


----------



## richardpl (Jun 28, 2011)

I mean make use of, e.g. and not use linux code directly.


----------



## pkubaj (Jul 10, 2011)

Is it possible to enable the Broadcom WiFi card (BCM43225, works with Linux only using the new drivers) using Windows drivers with NDIS?


----------



## emc2 (Jul 12, 2011)

Theoretically yes.  However, ndisgen seems to have trouble with the drivers I'm using (the Apple Bootcamp drivers for windows).  When I looked at disassembled output, the device probe function seems to always returns an error code.  Sure enough, it won't attach when I load the .ko.  I'm guessing ndisgen isn't finding something it needs in the windows driver.


----------



## richardpl (Jul 19, 2011)

This usually means that inf file is invalid/empty.

Found bug, want to improve software, then report it, on link bellow is website when you can do it and even post links to drivers you are using.


----------



## KNOStic (Jul 21, 2011)

emc2 said:
			
		

> Can the FreeBSD kernel support Linux network driver interfaces and kernel APIs directly? (I'd be rather surprised if it can)


Sorry to say, no. Linux exposes a lot of things in their kernel that BSD is smart enough not to, the system calls are radically different and of course as Jeung said a long time ago, PHY-N isn't really there either to support the Broadcom stuff and that's why he piped off that ship.

It would take a lot of work on the kernel side to make any of those wl library calls work. Sure would love to see it happen though - there's an awful lot of Broadcom stuff out there and BSD just doesn't support it. And as much as NDISGEN is nice and all, having to do all that tweaking for each and every different radio is just not practical if you want BSD to just start, pick up the radio and go.


----------



## emc2 (Jul 21, 2011)

From what I've seen of the Broadcom linux driver, it seems possible to reverse-engineer something.  All the driver's logic seems to be contained in the closed-source object file.  Its interface with the kernel seems to be some kind of custom OS-independent layer built by the broadcom developers.  They don't seem to do anything inside the closed source object file that's specific to any OS.  They do pass in some linux-specific data structures to some of the functions in the object file, but they pass them in as void pointers, which would suggest they're treated as opaque values (ie, handles).  My suspicion is they have an OS interface layer, and a common core driver logic, and they shipped the core logic as an object file, along with the linux version of the OS layer's source code.

I'm working on reverse-compiling the object file to see if that suspicion is correct.  If it turns out to be, then it shouldn't be too hard to adapt the driver to work with FreeBSD, and possibly to use the knowledge gained in the other Broadcom drivers (bwn and bwi)


----------



## Seeker (Sep 23, 2011)

So? What?
You are all dead or what?
Is driver ready? Where can I get it, to test it for a _little_ bit?


----------



## shokry (Sep 25, 2011)

Ok then, I was just holding the installation CD in my hand to install FreeBSD on my laptop, but I have the bcm4313 card :/ , that's what's gonna stop me from installing as I rely on wireless connection almost completely.
So sad.


----------



## nirnr00t (Oct 12, 2011)

shokry said:
			
		

> Ok then, I was just holding the installation CD in my hand to install FreeBSD on my laptop, but I have the bcm4313 card :/ , that's what's gonna stop me from installing as I rely on wireless connection almost completely.
> So sad.



+1. Have asus eee pc 1215N with broadcom 4313.


----------



## pkubaj (Oct 12, 2011)

Buy some USB WiFi card.


----------



## KNOStic (Oct 16, 2011)

emc2 said:
			
		

> I'm working on reverse-compiling the object file to see if that suspicion is correct.  If it turns out to be, then it shouldn't be too hard to adapt the driver to work with FreeBSD, and possibly to use the knowledge gained in the other Broadcom drivers (bwn and bwi)



I'm also holding out hope that this can somehow be done. With so many machines out there *requiring* broadcom support, it's becoming a major showstopper that BSD doesn't. Any word on progress? Want to collaborate? BSD *really* needs to get this done one way or another.


----------



## emc2 (Oct 16, 2011)

I'm in a semester-of-death right now.  I will get back to all this when it blows over.


----------



## KNOStic (Oct 16, 2011)

emc2 said:
			
		

> I'm in a semester-of-death right now.  I will get back to all this when it blows over.


Page me when it's over ... somebody's GOTTA do this. I'm not the world's best 'nix coder, but maybe with a few more keystrokes at your back, we can get this done somehow. This is one important task that'll make a lot of people happy ...


----------



## avilla@ (Oct 16, 2011)

People, may I suggest you all to talk about this on freebsd-wireless@? That's a better place for trying to coordinate efforts on this.


----------



## KNOStic (Oct 16, 2011)

avilla@ said:
			
		

> People, may I suggest you all to talk about this on freebsd-wireless@? That's a better place for trying to coordinate efforts on this.


I'll be willing to do so if there's some contribution I can offer along with emc. At this time, I'd rather not noise up the list over there since there's a new maintainer for bwn and bwi seems to be chugging along. Currently I'm all tied up with 9beta and cups madness since I'm a one man band over here and am already doubleshifting my days as it is.

My interest in chiding in over here is merely to see if we can light a fire under getting the Linux code ported over and I'm certainly not up to speed to be a lead. I know Weongyo Jeong threw up his hands a while ago and haven't seen much on the bwn front, thus my act of encouragement here if there's anyone willing to take it up. Promise that I'll mosey over there once I see that I can be useful but am also cautious about making promises I'm not in a condition to keep at this time. Are you aware of any plans/movement/etc on the wl stuff?


----------



## emc2 (Oct 18, 2011)

I'm a little confused as to just what drivers exist on the linux side.  The closed-source Broadcom driver is apparently called wl.  In addition there's a completely open-source driver called b43, and an older one called bw.  It seems that b43 has N-PHY support (the newer cards, like the 4322), but it's not clear to me what the differences between b43 and wl are.

My plan was (and still is) to analyze wl as follows: disassemble -> reconstruct CFG's, offsets, and others -> parse C headers to get type info -> type inference.  Hopefully, this should result in C code that will yield some insight into how the thing works.  However, if all the code we need is in b43, then there's little sense in going through all this.

Also, there has been some discussion on wireless, but they seem more concerned with other things at the moment, namely getting things in order for 9-RELEASE.


----------



## gurki (Oct 19, 2011)

nirnr00t said:
			
		

> +1. Have asus eee pc 1215N with broadcom 4313.



Hey

Just wanted to let you know I got wireless working on my asus 1215N with ndis.
I downloaded Windows XP drivers for the broadcom chipsets and then ndis was working fine.

On another note by using the work being done here http://wiki.freebsd.org/Intel_GPU and the new acpi_call module found here http://forums.freebsd.org/showthread.php?t=27010 I got full acceleration using the Intel card and good battery time by turning off the nvidia adapter.

Hope this can help you to get FreeBSD running on your asus 1215n


----------



## redw0lfx (Oct 20, 2011)

gurki said:
			
		

> Hey
> 
> Just wanted to let you know I got wireless working on my asus 1215N with ndis.
> I downloaded Windows XP drivers for the broadcom chipsets and then ndis was working fine.



Do you have a Broadcom 4313 chip on your asus 1215N?  I have been looking for XP drivers for that chip, but only found Windows 7 drivers.  If you wouldn't mind, could you provide a link to where I can find them, or upload them somewhere for me?

Thanks.


----------



## gurki (Oct 20, 2011)

redw0lfx said:
			
		

> Do you have a Broadcom 4313 chip on your asus 1215N?  I have been looking for XP drivers for that chip, but only found Windows 7 drivers.  If you wouldn't mind, could you provide a link to where I can find them, or upload them somewhere for me?
> 
> Thanks.



Here is the link

http://wikidrivers.com/wiki/Broadcom_BCM43xx_5.100.235.19

Please consider that I do not think this is a reliable website to download them from but it was the only one I could find.
If someone could find the same drivers from some manufacturers website it would be alot better choice.


----------



## nirnr00t (Oct 20, 2011)

gurki said:
			
		

> Hey
> 
> Just wanted to let you know I got wireless working on my asus 1215N with ndis.
> I downloaded Windows XP drivers for the broadcom chipsets and then ndis was working fine.
> ...



Probably you use http://forums.freebsd.org/showpost.php?p=150712&postcount=5 ?  Thanks for winxp drivers, but, as i now, ndis works only on -RELEASE, but develop of many desktop features (probably GEM) doing on -CURRENT. Its sad.


----------



## gurki (Oct 20, 2011)

nirnr00t said:
			
		

> Probably you use http://forums.freebsd.org/showpost.php?p=150712&postcount=5 ?  Thanks for winxp drivers, but, as i now, ndis works only on -RELEASE, but develop of many desktop features (probably GEM) doing on -CURRENT. Its sad.



Yes I'm using that, I execute it in /etc/rc.local on boot, thanks for that post btw .

I'm running on FreeBSD 9-RC1, the kms/intel patch applied fine to that release.


----------



## wblock@ (Oct 20, 2011)

nirnr00t said:
			
		

> Thanks for winxp drivers, but, as i now, ndis works only on -RELEASE



What makes you think that?


----------



## nirnr00t (Nov 12, 2011)

wblock@ said:
			
		

> What makes you think that?



It was mistake. I confirm that broadcom wifi xp driver described above works fine (with bcw 4313). 


```
kldload ndis & kldload /path/to/generated/driver/module
ifconfig wlan0 create wlandev ndis0
ifconfig wlan0 up scan
wpa_supplicant -D ndis -i wlan0 -c /etc/wpa_supplicant.conf
```


----------



## paulfrottawa (Mar 20, 2012)

Working

```
bwi0@pci0:5:2:0:	class=0x028000 card=0x1355103c chip=0x431814e4 rev=0x02 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller'
    class      = network
```

/boot/loader.conf:


```
if_bwi_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
```

rc.conf:

```
wlans_bwi0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
```

Added port
[cmd=]cd /usr/ports/net/bwi-firmware-kmod && make install clean[/cmd]



```
FreeBSD freea 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     
[email]root@obrian.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC  i386
```


----------



## emc2 (Mar 27, 2012)

Just letting anyone who was discussing bcm4322 support before, I am starting to have more free time now.  I'm currently writing another driver, but that shouldn't take too long.  I should be able to pick up where I left off.


----------



## azizi (Mar 29, 2012)

I have BCM4322, and freebsd FreeBSD 9.0, *I* can help to test driver, if any.


----------



## Seeker (Mar 31, 2012)

emc2 said:
			
		

> Just letting anyone who was discussing bcm4322 support before, I am starting to have more free time now.  I'm currently writing another driver, but that shouldn't take too long.  I should be able to pick up where I left off.


Don't forget Broadcom BCM4321 too. I'm ready to help testing too.
Actually, I have 1 additional laptop, with Broadcom BCM4313, so I can do tests on it too.

Duh! Buying dell's laptop?
Refuse WiFi card and buy it on your own!


----------



## pkubaj (Mar 31, 2012)

BCM43225 (yes there are two 2's) reporting in. Like others, I can test the driver.


----------



## homie (Apr 17, 2012)

paulfrottawa said:
			
		

> Working
> 
> ```
> bwi0@pci0:5:2:0:	class=0x028000 card=0x1355103c chip=0x431814e4 rev=0x02 hdr=0x00
> ...



I have the same NIC in an iBook G4, but CPU architecture is PowerPC and the bwn driver doesn't work for me properly. For example I could connect to my AP (packet loss ~10-40%), ping it, but it was only possible near the AP (less than 3-2 meters). Any thoughts are welcome.

Thanks.


----------



## ForTozs (Jun 22, 2012)

I would gladly test on a BCM4312 (low power) Dell Mini. bwn is close on this one, but I still am having problems.


----------



## kr651129 (Jun 23, 2012)

I'd like to help test also but I think that Broadcom is just so bad that it shouldn't be supported or "supported" at all.  The only reason I'm for the support of Broadcom drivers is because they are in a lot of Dell machines.  I don't really know much about Broadcom in machines other than Dell.


----------



## andersbo87 (Jun 25, 2012)

Most newer Macs (at least MacBook Pros) from (at least) 2009 and newer also use Broadcom. The one I've got, a 2011 17-inch model, uses Broadcom for both wired and wireless Internet. The wired Broadcom driver (bge(4)) works fine in FreeBSD 9.0, however wireless does not work (I haven't tried it with NDIS yet).


----------



## UglyJoe (Aug 21, 2012)

emc2 said:
			
		

> Just letting anyone who was discussing bcm4322 support before, I am starting to have more free time now.  I'm currently writing another driver, but that shouldn't take too long.  I should be able to pick up where I left off.



Any update on progress on this driver?


----------



## KNOStic (Aug 22, 2012)

UglyJoe said:
			
		

> Any update on progress on this driver?


So far, no. I'm hoping to be available to work with EMC in about 2-3 weeks perhaps. The problem with these cards is that they're all based on Broadcom's wl5 code, and neither bwi nor bwn modules will work with the "newer" Broadcom cards. In fact, on 64 bit versions, bwn, if it detects the cards at all will panic hard. I had to remove several PCI ID's from the /usr/src/sys/dev/siba/siba_bwn.c code (and reported it numerous times) since bwn doesn't work with them anyway after failing to attach and then spitting the bit in the kernel, going four paws to the moon. Jeung walked away from bwn over a year ago now.

I've tried all sorts of tricks myself with NDIS, and although the cards get detected and attached and even have their firmware uploaded through NDIS, they come up brain dead on channel 1, won't scan and when you go through the step of `# /etc/rc.d/netif restart` after manually trying to wake them up, kernel panic. Now I know Richardpl has submitted new code to try to fix that, but not one line of it has made it into the kernel yet, not even the latest build of 10 current. For MY purposes, NDIS is hopelessly broken and is absolutely useless with Broadcom PCI-E stuff. I won't even get into how bad it gets if the card has bluetooth as well. 

So ... Since we last visited this topic, the kernel folks have finally gotten some work in on 802.11n support, so there's some hope that wasn't there before. bwi and bwn clearly ain't gonna cut it since the cards in question here are all bcmwl5-based and there IS a Linux driver and library released by Broadcom which of course doesn't help us here in beastie-land.

I propose however that the only real way to go after this would be to take the code that Broadcom released for Linux and attempt to port the code to BSD. Either that, or snatch some Broadcom wiglets and hold them for ransom until they provide US a port. 

EMC ... what should we do? Be happy to do what I can once I've moved into my new location after the end of this month ... but like it or not, BSD *MUST* support Broadcom, we have no choice. Every POS computer made lately has that stuff in them, and Apple has abandoned their users who bought in with Tiger, Leopard and now Snow Leopard. EVERY Apple user I talk to WANTS BSD on there. But they have Broadcom out the wazoo. It *must* get done, one way or another. We really have no choice anymore.

I wrote Windows drivers for years, I've cobbled BSD drivers here and there. I'm really not quite up to speed for something of this complexity, but I can certainly help if I can get a few other hands with a little more experience with the 802.11 stuff. Any takers?

---

Finally for Dutch: I understand that this should go out on the "list" but I don't want to step on what's going on there until there's actually some degree of plan. I see they're insanely busy schmoozing ath into working and so far, all we have here is a dollar and a dream. Thus, for the moment, I think this is a smarter place to build an army and at least indicate to the rest of the community how important dealing with Broadcom's mess truly is. Hope you'll forgive me.


----------



## Seeker (Aug 22, 2012)

I think, that first step should be talking to Broadcom, to support FreeBSD and build native driver, as they did for Linux.
If "diplomacy" fails ..., we might get a little harsher with them.


----------



## kpa (Aug 22, 2012)

I don't think there's much you can do unless Broadcom sees some value (cash cash cash) in supporting FreeBSD. It doesn't help that FreeBSD has reputation of being a server OS and you don't see those wireless network adapters in servers that often.


----------



## Seeker (Aug 22, 2012)

Reputation is ... *false!*
FreeBSD is what you make it to.
Desktop, laptop, server, embedded ...
If Nvidia has been made into seeing FreeBSD "the right way", than Broadcom could too.
Nvidia is also a bigger company, so ..., has anyone started chatter with Broadcom?


----------



## emc2 (Aug 23, 2012)

I definitely have an interest in improving the hardware support on Apple platforms.  As for time well...  I've been supposedly working on EFI support under GSoC, except I'm backlogged there too, due to job searching/interviewing, and now I have to move and start a new job.

I have plans on reverse-engineering the closed source linux driver, which I think I've discussed here before.  In essence, there is an object file they distribute, which gets compiled against an open source linux kernel interface.  From the look of things, the object file is OS-independent.  If that's the case, it should be possible to build a replacement for the linux interface.

I had plans to make some tools to try and decompile the object file.  The process goes something like this:  disassemble, reconstruct CFGs, run structural analysis to get back the control flow structures[0], try and figure out local variables from registers/stack slots, try and infer types using info from the headers.  All but the last two steps can be fully automated.  The last two may need help from a human somewhere along the way.  I'm pretty confident that this could recover most if not all of the closed-source object file in this case.  In the more general case, these tools could be a very useful for future efforts.


[0]: See "Advanced Compiler Design and Implementation"


----------



## Seeker (Aug 23, 2012)

Post this on *hackers@freebsd.org*


> In essence, there is an object file they distribute, which gets compiled against an open source linux kernel interface. From the look of things, the object file is OS-independent. If that's the case, it should be possible to build a replacement for the linux interface.
> 
> I had plans to make some tools to try and decompile the object file. The process goes something like this: disassemble, reconstruct CFGs, run structural analysis to get back the control flow structures[0], try and figure out local variables from registers/stack slots, try and infer types using info from the headers. All but the last two steps can be fully automated. The last two may need help from a human somewhere along the way. I'm pretty confident that this could recover most if not all of the closed-source object file in this case. In the more general case, these tools could be a very useful for future efforts.
> 
> ...


You'll get directly in touch with *devs* ...

*Hint:* Fact that this is about driver, is very little relevant, but reverse-engineering bin code.
Best help and assistance, you'll get there.


----------



## yo9fah (Nov 1, 2012)

How can I solve this problem, I cannot connecting to my wireless card http://i.imgur.com/NKxaX.png

Not connecting. I get an error:


> bwn0: RX decryption attempted (old 0 keyidx 0x1) bwn0: need multicast update callback



I tried with bwi driver but not working.

# pciconf -lvbc


```
siba_bwn0@pci0:4:0:0:	class=0x028000 card=0xe003105b chip=0x431514e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM4312 802.11b/g LP-PHY'
    class      = network
    bar   [10] = type Memory, range 64, base 0xf8000000, size 16384, enabled
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 09[58] = vendor (length 120)
    cap 05[e8] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[d0] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
ecap 0001[100] = AER 1 0 fatal 1 non-fatal 4 corrected
ecap 0002[13c] = VC 1 max VC0
ecap 0003[160] = Serial 1 4c473affff9a001f
ecap 0004[16c] = unknown 1
```

# kldstat


```
Id Refs Address            Size     Name
 1   39 0xffffffff80200000 1323288  kernel
 2    2 0xffffffff81524000 484c0    linux.ko
 3    1 0xffffffff8156d000 415d8    if_bwn.ko
 4    2 0xffffffff815af000 cc18     siba_bwn.ko
 5    1 0xffffffff815bc000 29e0     coretemp.ko
 6    1 0xffffffff815bf000 6668     sem.ko
 7    1 0xffffffff815c6000 6600     cuse4bsd.ko
 8    1 0xffffffff815cd000 de08     tmpfs.ko
 9    1 0xffffffff815db000 2d358    bwn_v4_lp_ucode.ko
10    1 0xffffffff81812000 3dfc     linprocfs.ko
11    1 0xffffffff81816000 15c2     fdescfs.ko
12    1 0xffffffff81818000 a96b     fuse.ko
13    1 0xffffffff81823000 8267     i915.ko
14    1 0xffffffff8182c000 13815    drm.ko
```

# netstat -r


```
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.1.1        UGS         0      392   bge0
localhost          link#12            UH          0        6    lo0
192.168.1.0        link#13            U           0        0  wlan0
192.168.1.100      link#4             UHS         0        0    lo0
192.168.1.102      link#13            UHS         0        0    lo0

Internet6:
Destination        Gateway            Flags      Netif Expire
::                 localhost          UGRS        lo0
localhost          link#12            UH          lo0
::ffff:0.0.0.0     localhost          UGRS        lo0
fe80::             localhost          UGRS        lo0
fe80::%bge0        link#4             U          bge0
fe80::21d:72ff:fe3 link#4             UHS         lo0
fe80::%lo0         link#12            U           lo0
fe80::1%lo0        link#12            UHS         lo0
ff01::%bge0        fe80::21d:72ff:fe3 U          bge0
ff01::%lo0         localhost          U           lo0
ff02::             localhost          UGRS        lo0
ff02::%bge0        fe80::21d:72ff:fe3 U          bge0
ff02::%lo0         localhost          U           lo0
```

# ifconfig


```
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=c019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
	ether 00:1d:72:32:45:5d
	inet6 fe80::21d:72ff:fe32:455d%bge0 prefixlen 64 scopeid 0x4 
	inet 192.168.1.100 netmask 0xffffff00 broadcast 192.168.1.255
	nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
bwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:1f:3a:9a:4c:47
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
	status: associated
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:1d:72:32:45:5d
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	lladdr 0.1d.72.ff.ff.32.45.5d.a.2.ff.fe.0.0.0.0
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0xc 
	inet 127.0.0.1 netmask 0xff000000 
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:1f:3a:9a:4c:47
	inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g
	status: associated
	ssid YO9FAH channel 6 (2437 MHz 11g) bssid 00:22:6b:e9:5e:7a
	country US authmode WPA2/802.11i privacy ON deftxkey UNDEF
	AES-CCM 2:128-bit txpower 30 bmiss 7 scanvalid 450 bgscan
	bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS
	wme roaming MANUAL
```

# ifconfig wlan0 list scan sta


```
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
union           00:e0:61:28:41:97    1   54M -138:-95  100 EP   WPS
D.O.D           34:08:04:08:3c:14    1   54M -133:-95  100 EPS  WPS HTCAP WME
YO9FAH          00:22:6b:e9:5e:7a    6   54M -115:-95  100 EP   RSN WME
TRENDnet        00:14:d1:34:6b:8e    6   54M -137:-95  100 EPS 
Nutunet         28:10:7b:62:fc:28    6   54M -122:-95  100 EP   HTCAP WPA RSN WME WPS
cla@alex        f4:ec:38:cb:53:42    4   54M -124:-95  100 EPS  RSN WPA WME HTCAP ATH WPS
ifconfig: sta: bad value
```

loader.conf


```
linux_load="YES"
coretemp_load="YES"
sem_load="YES"
cuse4bsd_load="YES"
tmpfs_load="YES"
linux_v4l2wrapper_load="YES"
pwc_load="YES"
# Enable the graphical boot-loader
autoboot_delay="01"
if_bwn_load="YES"
bwn_v4_lp_ucode_load="YES"
hw.bwn.usedma=0
```

rc.conf


```
background_dhclient="YES"
hostname="fbsd"
keymap="us.iso.kbd"
ifconfig_bge0="DHCP"
ifconfig_bge0_ipv6="inet6 accept_rtadv"
sshd_enable="YES"
moused_enable="NO"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
hald_enable="YES"
dbus_enable="YES"
slim_enable="YES"
fusefs_enable="YES"
linux_enable="YES"
smartd_enable="YES"
devfs_system_ruleset="devfsrules_common"
# Clean out temporary files
clear_tmp_enable="YES"
clean_tmp_X="YES"
webcamd_enable="YES"
wlans_bwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
```

And my dmesg: http://pastebin.com/RmN7W7ew


----------



## yo9fah (Nov 5, 2012)

*LE:* Oh God !!! I do not believe it !!! I work my wireless network card !!! Are now connected to my wireless card BCM4312 but works with "*Project Devil*"!


----------



## dclegg (Nov 6, 2012)

*willing to test BCM4322*

Hi, I also have a Dell Latitude E5500 with BCM4322 wireless.
I'm very new to FreeBSD but excited to try to switch from Linux. I understand the broadcom support is in progress and wanted to volunteer testing andy developments. This is my first post here so please forgive my ignorance. Let me know if there's anything else I can supply. 

Bwi driver doesn't appear to do much, will load with kldload or in loader.conf but doesn't show any result in pciconf. Bwn driver makes kernel panic when put in loader.conf, similar to previous notes about this. When loaded with kldload it works. shows in kldstat and dmesg is as follows

```
siba_bwn0: <Unknown> mem 0xf69fc000-0xf69fffff irq 17 at device 0.0 on pci12
siba_bwn0: warn: multiple PCI(E) cores
siba_bwn0: unsupported coreid (USB 2.0 Device)
siba_bwn0: unsupported coreid (unknown)
siba_bwn0: unsupported coreid (Internal Memory)
siba_bwn0: unknown chipid 0x4322 for PLL & PMU init
bwn0 on siba_bwn0
bwn0: unsupported PHY type (4)
device_attach: bwn0 attach returned 6
```

`# pciconf -lv`:

```
siba_bwn0@pci0:12:0:0:  class=0x028000 card=0x000d1028 chip=0x432b14e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM4322 802.11a/b/g/n Wireless LAN Controller'
    class      = network
```

`# kldstat`:

```
Id Refs Address            Size     Name
 1   14 0xffffffff80200000 11cd9b0  kernel
 3    1 0xffffffff81612000 8341     i915.ko
 4    1 0xffffffff8161b000 139a7    drm.ko
 9    1 0xffffffff8162f000 29889    if_bwn.ko
10    1 0xffffffff81659000 61e4     siba_bwn.ko
```


----------



## l2f (Nov 15, 2012)

paradox said:
			
		

> ```
> wpa_supplicant_enable="YES"
> wlans_ndis0="wlan0"
> ifconfig_wlan0="WPA DHCP"
> ...



I remove the first line: 
	
	



```
wpa_supplicant_enable="YES"
```
 and added 
	
	



```
wpa_supplicant_flags="-Dndis"
```
 in my /etc/rc.conf

I have a compaq mini 110c 1100ca running: 

```
FreeBSD MiniBeastie.maison.org 8.3-RELEASE-p4 FreeBSD 8.3-RELEASE-p4 #0: Tue Oct 30 15:25:20 EDT 2012     root@MiniBeastie.maison.org:/usr/obj/usr/src/sys/GENERIC_P4  i386
```

Thanks so much for the info 

Regards,

l2f


----------



## adrian@ (Dec 9, 2012)

*If you're serious about hacking on updated broadcom/marvell support*

.. then please join the FreeBSD wireless list (freebsd-wireless@freebsd.org) and don't be afraid to ask questions.

I'm not really allowed to work on it (as I'm employed by Qualcomm Atheros), so I stick to net80211 and atheros wireless driver support.

I and the other developers would love to see some traction made on updated broadcom support. Yes, this does likely mean porting the brcm80211 driver from Linux and all the relevant SIBA bus glue over. Yes, Broadcom _had_ (or have, internally?) a multi-platform driver which would likely work on FreeBSD with little changes. But what they push into Linux has been "linux-ified" and we'd likely have to undo all of that nonsense in order to get it working on FreeBSD.

It's a catch-22 situation. If there's no-one using Broadcom on FreeBSD, no-one's going to ask, and thus Broadcom won't take it seriously, so they won't help, so there isn't any support on FreeBSD, hence no-one uses it, etc. If you want to see that cycle broken then we the community need to do the "linux thing" - stand up and take charge of it ourselves.

The same goes for Marvell (mostly for their embedded wifi on various ARM *plug devices.) They do have a BSD wireless driver for their chipsets. They just don't open source it to FreeBSD any longer.


----------



## G_Nerc (Dec 10, 2012)

*adrian@*, good day! As developer of wireless - subsystem, can you talk is anybody working in broadcom usb wireless on FreeBSD? For example for *Netgear WNA-3100*
Broadcom is widely used chipset and support in FreeBSD will be necessary


----------



## MasterOne (Dec 22, 2012)

Damned, completely overlooked the Broadcom problem! 

I just checked, the Acer Aspire One 753 netbook I am trying to run FreeBSD 9.1-RELEASE amd64 on, has a BCM43225 wireless chipset, so I guess this is a dead end then?


----------



## tzoi516 (Oct 6, 2013)

dclegg said:
			
		

> Bwi driver doesn't appear to do much, will load with kldload or in loader.conf but doesn't show any result in pciconf. Bwn driver makes kernel panic when put in loader.conf, similar to previous notes about this. When loaded with kldload it works.



Did you install net/bwn-firmware-kmod?


----------



## gustopn (Nov 6, 2013)

Be sure to disable APIC when using Broadcom wifi devices, because they have broken APIC, that's a problem on Linux too.
Also, I have one of this miniPCIe BCM abgn adapters left, I am not using it any more, because I have newer Intel now, so if any developer would like to have it, just send me a message, I can send it away by DHL (or whatever).
Ah, I see now, it is even BCM94321MC!
And I also have one Apple Atheros 9k 802.11gn - with no part number on it.


----------



## serverhamster (Jun 24, 2014)

BCM43228 here. Doesn't appear to work with bwn(4).


----------

