# Broadcom Wireless chips support



## SaveTheRbtz (Nov 16, 2008)

I have notebook running freebsd-current and with broadcom wi-fi on board
*PH34R#* uname -a
FreeBSD PH34R 8.0-CURRENT FreeBSD 8.0-CURRENT #6: Fri Nov 14 00:21:58 MSK 2008     savetherbtz@PH34R:/usr/obj/usr/src/sys/PH34R.8  i386

*PH34R#* pciconf -lv | grep BCM43
    device     = 'BCM4310 broadcom wireless 1490 (dell)'

wireless currently running via ndis

Will there be support for this wireless chipset in future?


----------



## graudeejs (Nov 16, 2008)

I very much doubt.
Broadcom aren't willing to give drivers to free community


----------



## Kitche (Nov 17, 2008)

I m pretty sure that drivers would be ported sometime from OpenBSD but highly doubt it will be officially Broadcom.


----------



## paradox (Nov 17, 2008)

_http://paradox.lissyara.su/bwi.01.tar.bz2
try this driver


----------



## prudhvi (Nov 17, 2008)

Hi, Paradox

Your  driver is working like charm 

I tried it on 7.0-RELEASE will give it a short in 8-CURRENT today 

Thanks


----------



## richardpl (Nov 17, 2008)

It will not work on CURRENT because of VAP aka multi-BSS


----------



## paradox (Nov 18, 2008)

>prudhvi  
driver not mine
i take it from perforce repository
my be iam write own driver


----------



## SaveTheRbtz (Nov 19, 2008)

Today I've tried dragonflybsd bwi drivers on my *HP 6715s* laptop... But it didn't worked out with my card =(
First of all in pciconf my card listens as 
_device     = 'BCM4310 broadcom wireless 1490 (dell)'_
but has BCM4312's id:
_bwi0@pci0:48:0:0:	class=0x028000 card=0x1371103c chip=*0x4312*14e4 rev=0x02 hdr=0x00_

Back to driver:
My card isn't in supported macs revisions list... So i've got error something like "MAC rev 13 is not supported"
not a big deal, added to see if it helps.

*# vi bwimac.c*
_static const uint8_t bwi_sup_macrev[] = { 2, 4, 5, 6, 7, 9, 10*, 13* };_
Now driver says "unsupported 11G PHY, rev 9"
This is worse, but I can give it a try:
*# vi bwiphy.c*
_if (phyrev > *9*) {
                        device_printf(sc->sc_dev, "unsupported 11G PHY, "
                                      "rev %u\n", phyrev);
                        return ENXIO;
                			}_
That time i've got "bwi0: can't initialize 0th TX ring"
And what i see in bwi_init_tx_ring64? (Yeah my card has 64bit bus)

_static int
bwi_init_tx_ring64(struct bwi_softc *sc, int ring_idx)
{
        /* TODO:64 */
        return EOPNOTSUPP;
}_
=((  I can't write it without knowledge of BWI_TXRX64_RINGINFO_ADDR_MASK, BWI_TXRX64_RINGINFO_FUNC_MASK and etc. values =(

full output of driver below

```
bwi0: <Broadcom BCM4312 802.11 Wireless Lan> mem 0xc8000000-0xc8003fff irq 18 at device 0.0 on pci48
bwi0: [ITHREAD]
bwi0: regwin: chipcommon (0x800), rev 19, vendor 0x4243
bwi0: BBP: id 0x4311, rev 0x2, pkg 0
bwi0: nregwin 4, cap 0x0864000d
bwi0: regwin: 802.11 MAC (0x812), rev 13, vendor 0x4243
bwi0: MAC: rev 13
bwi0: regwin: usb 1.1 host (0x817), rev 4, vendor 0x4243
bwi0: regwin: pci express (0x820), rev 5, vendor 0x4243
bwi0: clksrc CS_OSC
bwi0: clkfreq min 990000, max 1010000
bwi0: power on delay 153
bwi0: bus rev 6
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 9, ver 4
bwi0: PHY: 802.11G attach
bwi0: RF: manu 0x17f, type 0x2050, rev 2
bwi0: bus rev 6
bwi0: PHY is linked
bwi0: 64bit 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 6
bwi0: locale: 0
bwi0: WARNING: using obsoleted if_watchdog interface
bwi0: Ethernet address: 00:00:00:1a:73:8c
bwi0: bwi_init
bwi0: bwi_stop
bwi0: bbp atten: 0, rf atten: 3, ctrl1: 2, ctrl2: 65535
bwi0: bus rev 6
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: lo gain: 19, rx gain: 48
bwi0: RF calibration value: 0x0026
bwi0: base tssi 49
bwi0: can't initialize 0th TX ring
```

So there are couple of questions
1) to FreeBSD commiters: bwi driver is now in OpenBSD,NetBSD and even in DreganFlyBSD. Is there so big problem to port it?
2) to bcm hackers: does anybody know where i can get some kind of reversed engineered driver manual or some kind of helpsheet for firmware bits?


----------



## paradox (Nov 19, 2008)

> bwi0: 64bit bus space


64bit bus not supported by any bwi drivers of *BSD



> 1) to FreeBSD commiters: bwi driver is now in OpenBSD,NetBSD and even in DreganFlyBSD. Is there so big problem to port it?


_http://paradox.lissyara.su/bwi.01.tar.bz2




> 2) to bcm hackers: does anybody know where i can get some kind of reversed engineered driver manual or some kind of helpsheet for firmware bits?


this is a new firmware but curently not supported bwi driver
_paradox.lissyara.su/code.rar


----------



## paradox (Nov 19, 2008)

show me yr 
	
	



```
uname -a
```
is yr bsd 64bit?  as example amd64


----------



## SaveTheRbtz (Nov 19, 2008)

_[PH34R] ~> uname -spr
FreeBSD 7.1-PRERELEASE *i386*_


----------



## paradox (Nov 19, 2008)

imposible ))


> Today I've tried dragonflybsd bwi drivers on my HP 6715s laptop


which platform the DF ?


----------



## SaveTheRbtz (Nov 19, 2008)

1) it'll be CURRENT in an hour.
2) i386


----------



## paradox (Nov 19, 2008)

too strange


----------



## SaveTheRbtz (Nov 19, 2008)

No, 64bit it's about bus space
_bwi0: 64bit bus space_
there are three kinds of bus space in BCM43xx: 30bit 32bit and 64bit

It's not connected with operating system arch in any way


----------



## allbanddxer (Nov 19, 2008)

This is so interesting that I should stumble on this bwi driver, I have been searching for a solution and gave a OpenBSD a try just because they had that driver, but I could not adjust to OpenBSD. I downloaded bwi.01.tar.bz2 that was posted by Paradox but I don't really know what to do with it. After I install it, how do I configure that module to start? Do I add bwi_enable="YES"  in /boot/loader.conf... and then setup the network device like any other card?  If it matters, I am using 7.0 Release i386.


----------



## SaveTheRbtz (Nov 19, 2008)

I've tried to compile driver against -current and as *richardpl* said it has some issues with new 80211 stack. So every one who is willing to try bwi need to downgrade to at least 7-STABLE

*allbanddxer* 
_# cd bwi.01
# make
# make install
# kldload bwi_v3
# kldload if_bwi
_
And can you tell model of ur BCM from 
_# pciconf -lv_
?


----------



## allbanddxer (Nov 20, 2008)

*allbanddxer* 
_# cd bwi.01
# make
# make install
# kldload bwi_v3
# kldload if_bwi
_
And can you tell model of ur BCM from 
_# pciconf -lv_
?[/QUOTE]

Hey thanks for the install steps SaveTheRbtz, here is the output you requested. 
bwi0@pci0:2:0:0:	class=0x028000 card=0x033a1154 chip=0x431814e4 rev=0x02 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM43XX Broadcom 802.11b/g'
    class      = network

AKA:  Buffalo Wireless WLI-CB-G54HP


----------



## SaveTheRbtz (Nov 20, 2008)

Your card is in "known devices" list, so, if revision is right it should work just fine

```
{ PCI_VENDOR_BROADCOM, 0x4301,"Broadcom BCM4301 802.11 Wireless Lan" },
	{ PCI_VENDOR_BROADCOM, 0x4307,"Broadcom BCM4307 802.11 Wireless Lan" },
	{ PCI_VENDOR_BROADCOM, 0x4311,"Broadcom BCM4311 802.11 Wireless Lan" },
	{ PCI_VENDOR_BROADCOM, 0x4312,"Broadcom BCM4312 802.11 Wireless Lan" },
	{ PCI_VENDOR_BROADCOM, 0x4320,"Broadcom BCM4306v1 802.11 Wireless Lan"},
	{ PCI_VENDOR_BROADCOM, 0x4321,"Broadcom BCM4306v2 802.11 Wireless Lan"},
	{ PCI_VENDOR_BROADCOM, 0x4325,"Broadcom BCM4306v3 802.11 Wireless Lan"},
	{ PCI_VENDOR_BROADCOM, 0x4324,"Broadcom BCM4309 802.11 Wireless Lan" },
	{ PCI_VENDOR_BROADCOM, 0x4318,"Broadcom BCM4318 802.11 Wireless Lan" },
	{ PCI_VENDOR_BROADCOM, 0x4319,"Broadcom BCM4319 802.11 Wireless Lan" }
```


----------



## allbanddxer (Nov 20, 2008)

This is great news, thanks for the help.


----------



## richardpl (Nov 20, 2008)

SaveTheRbtz said:
			
		

> I've tried to compile driver against -current and as *richardpl* said it has some issues with new 80211 stack. So every one who is willing to try bwi need to downgrade to at least 7-STABLE


Or he/she can download bwi from perforce (older files revisions, because latest one I tested are broken) and it have support for vap. Just open correct branch ;-)


----------



## SaveTheRbtz (Nov 20, 2008)

richardpl said:
			
		

> Just open correct branch ;-)


mmm... correct branch? Can you post link on perforce to that branch?


----------



## richardpl (Nov 20, 2008)

http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/vap/sys/dev/bwi&HIDEDEL=NO
http://perforce.freebsd.org/depotTr...depot/projects/vap/sys/modules/bwi&HIDEDEL=NO

For firmware: bwifw.ko use same one already posted


----------



## SaveTheRbtz (Nov 20, 2008)

If anyone needs... here is bwi_v4 firmware kernel module sources. (based on 4.80.53.0)
http://opticomspb.ru/~savetherbtz/freebsd/bwi/bwifw_v4.tar.bz2
Specs for it can be found here:
http://bcm-v4.sipsolutions.net/

Does anybody want to write driver? =)


----------



## paradox (Nov 20, 2008)

>SaveTheRbtz  
try this forum review http://forum.lissyara.su/viewtopic.php?f=5&t=10250 about Broadcom wifi
is a russian forum


----------



## bsdsys_x86 (Nov 25, 2008)

I am currently using a Broadcom BCM4401 with FreeBSD 7


```
pciconf -lv | grep BCM4
    device     = 'BCM4401 Broadcom NetLink 4401 10/100 Ethernet NIC'
```

I am using the builtin bfe driver. Worked the first time durring install. I even did a FTP install.


```
bfe0: <Broadcom BCM4401-B0 Fast Ethernet> mem 0xef9fe000-0xef9fffff irq 17 at de                          vice 0.0 on pci3
```


----------



## SaveTheRbtz (Nov 25, 2008)

BCM4401 is not a Wireless Card.
Here we are talking generaly about BCM43XX family


----------



## bsdsys_x86 (Nov 26, 2008)

SaveTheRbtz said:
			
		

> BCM4401 is not a Wireless Card.
> Here we are talking generaly about BCM43XX family


 
Oops... missed the 43XX part!


----------



## veilside (Jan 30, 2009)

will this driver also work on 6.4?


----------



## veilside (Jan 30, 2009)

ok, i gave it a try and it does not work for 6.4.
will try 7-stable too.


----------



## ultraquix (Jun 18, 2010)

I compiled the drivers into the kernel (that helped)


```
device bwi
device wlan
device wlan_wep
device wlan_ccmp
device wlan_tkip
device wlan_amrr
device firmware
```

I put this in my /etc/rc.conf (it's in the documents)

```
wlans_bwi0="wlan0"
ifconfig_wlan0="ssid MYNAME WPA DHCP"
```

still had to run dhclient wlan0

Loren Cannon


----------



## ultraquix (Jun 18, 2010)

The ports/net/bwi-firmware-kmod port needs to be installed before ifconfig(8) will work.(1)

1.  bwi man page

:OOO


----------



## ultraquix (Jun 18, 2010)

Oh yeah, BCM4311


----------



## Angered_Kabar (Jun 22, 2010)

ultraquix said:
			
		

> Oh yeah, BCM4311



Is the firmware port v4?  I had some trouble with v3 on my 4311 when I tried installing FreeBSD 8-Release on my laptop back in January.

I'd love to be able to *use* FreeBSD on it.


----------



## ultraquix (Jun 24, 2010)

It's from ports
bwi-firmware-kmod I think.
make install clean
I believe it is version 3


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


----------



## ultraquix (Jun 24, 2010)

I think 8.1 is a different story.


----------



## ultraquix (Jun 24, 2010)

```
device bwi
device firmware
```

are the two lines you have to add.  The rest already seem to be in the kernel configuration file.


----------



## ultraquix (Jun 24, 2010)

`dhclient wlan0` sometimes has to be run more than once.


----------



## ultraquix (Jun 24, 2010)

PC-BSD doesn't seem to switch from ethernet to wireless without a reboot.


----------



## DutchDaemon (Jun 24, 2010)

ultraquix, format your posts, please: Posting and Editing in the FreeBSD Forums


----------



## unicyclist (Jun 24, 2010)

fwiw, I'm on freebsd 8.0, with an 4318. Got it all working about 2 days ago.
Just boot, log in, and go. 
Quite pleased


----------



## ma (Oct 25, 2010)

*Broadcom BCM4310 USB Controller*

Hello,

I have a new laptop Acer Aspire One D250 with the chip:


```
none2@pci0:1:0:0:       class=0x028000 card=0xe01b105b chip=0x431514e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM4310 USB Controller'
    class      = network
```

It seems that there is no driver in FreeBSD for this card (not even in HEAD) and the Windows 7 has the driver as BCMWL6.SYS which is unsupported NDIS API-6.

Any ideas what I could do? Any BCMWL5.SYS driver with support for this chip? Thanks in advance

Matthias <guru@unixarea.de>


----------

