BCM4331 not working (MBP2011, FreeBSD13) - OPEN

Hi all,

I want my old MBP running FreeBSD13, but still running into trouble with the BCM4331.
Anyone who succeeded with this challenge?

Thanks!
 
loader.conf (my 2 trials)
Code:
#if_bwn_load="YES"
#bwn_v4_ucode_load="YES"
bhnd_load="YES"
wlan_load="YES"

rc.conf (my 2 trials)
Code:
#wlans_bwn0="wlan0"
wlans_bhnd0="wlan0"
#ifconfig_wlan0="WPA DHCP"
ifconfig_wlan0="WPA SYNDHCP"

sysctl net.wlan.devices --> blank

Code:
pciconf -lv | grep network -B 3
bge0@pci0:2:0:0:    class=0x020000 rev=0x10 hdr=0x00 vendor=0x14e4 device=0x16b4 subvendor=0x14e4 subdevice=0x16b4
    vendor     = 'Broadcom Inc. and subsidiaries'
    device     = 'NetXtreme BCM57765 Gigabit Ethernet PCIe'
    class      = network
--
bwn_pci0@pci0:3:0:0:    class=0x028000 rev=0x02 hdr=0x00 vendor=0x14e4 device=0x4331 subvendor=0x14e4 subdevice=0x4331
    vendor     = 'Broadcom Inc. and subsidiaries'
    device     = 'BCM4331 802.11a/b/g/n'
    class      = network
 
Complete log attached...

Code:
dmesg | grep BCM

bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4

bhnd0: <BCM4331 BCMA bus> on bhndb0

bge0: <Broadcom BCM57765 B0, ASIC rev. 0x57785100> mem 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff at device 0.0 on pci3

brgphy0: <BCM57765 1000BASE-T media interface> PHY 1 on miibus0

sdhci_pci0: <Broadcom BCM577xx SDXC/MMC Card Reader> mem 0xa0420000-0xa042ffff at device 0.1 on pci3

bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4

bhnd0: <BCM4331 BCMA bus> on bhndb0

bge0: <Broadcom BCM57765 B0, ASIC rev. 0x57785100> mem 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff at device 0.0 on pci3

brgphy0: <BCM57765 1000BASE-T media interface> PHY 1 on miibus0

sdhci_pci0: <Broadcom BCM577xx SDXC/MMC Card Reader> mem 0xa0420000-0xa042ffff at device 0.1 on pci3

bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4

bhnd0: <BCM4331 BCMA bus> on bhndb0

bge0: <Broadcom BCM57765 B0, ASIC rev. 0x57785100> mem 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff at device 0.0 on pci3

brgphy0: <BCM57765 1000BASE-T media interface> PHY 1 on miibus0

sdhci_pci0: <Broadcom BCM577xx SDXC/MMC Card Reader> mem 0xa0420000-0xa042ffff at device 0.1 on pci3

bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4

bhnd0: <BCM4331 BCMA bus> on bhndb0

bge0: <Broadcom BCM57765 B0, ASIC rev. 0x57785100> mem 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff at device 0.0 on pci3

brgphy0: <BCM57765 1000BASE-T media interface> PHY 1 on miibus0

sdhci_pci0: <Broadcom BCM577xx SDXC/MMC Card Reader> mem 0xa0420000-0xa042ffff at device 0.1 on pci3

bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4

bhnd0: <BCM4331 BCMA bus> on bhndb0

bge0: <Broadcom BCM57765 B0, ASIC rev. 0x57785100> mem 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff at device 0.0 on pci3

brgphy0: <BCM57765 1000BASE-T media interface> PHY 1 on miibus0

sdhci_pci0: <Broadcom BCM577xx SDXC/MMC Card Reader> mem 0xa0420000-0xa042ffff at device 0.1 on pci3

bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4

bhnd0: <BCM4331 BCMA bus> on bhndb0
 

Attachments

  • dmesg.txt
    65 KB · Views: 62
bhnd0: <Broadcom 802.11 MAC/PHY/Radio, rev 29> mem 0x18001000-0x18001fff,0x18101000-0x18101fff irq 1 at core 1 (no driver attached)
this should be bwn0 if all works well
kldstat|egrep 'bwn|bhnd'

Code:
# kldstat |egrep 'bhnd|bwn'|sed 's/.* //'|sort
bcma_bhndb.ko
bhnd.ko
bhnd_pci.ko
bhnd_pci_hostb.ko
bhndb.ko
bhndb_pci.ko
bwn_v4_n_ucode.ko
if_bwn.ko
siba_bhndb.ko
 
dmesg
Code:
dmesg | grep BCM
bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4
bhnd0: <BCM4331 BCMA bus> on bhndb0
bge0: <Broadcom BCM57765 B0, ASIC rev. 0x57785100> mem 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff at device 0.0 on pci3
brgphy0: <BCM57765 1000BASE-T media interface> PHY 1 on miibus0
sdhci_pci0: <Broadcom BCM577xx SDXC/MMC Card Reader> mem 0xa0420000-0xa042ffff at device 0.1 on pci3
bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4
bhnd0: <BCM4331 BCMA bus> on bhndb0
bge0: <Broadcom BCM57765 B0, ASIC rev. 0x57785100> mem 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff at device 0.0 on pci3
brgphy0: <BCM57765 1000BASE-T media interface> PHY 1 on miibus0
sdhci_pci0: <Broadcom BCM577xx SDXC/MMC Card Reader> mem 0xa0420000-0xa042ffff at device 0.1 on pci3
bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4
bhnd0: <BCM4331 BCMA bus> on bhndb0
bge0: <Broadcom BCM57765 B0, ASIC rev. 0x57785100> mem 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff at device 0.0 on pci3
brgphy0: <BCM57765 1000BASE-T media interface> PHY 1 on miibus0
sdhci_pci0: <Broadcom BCM577xx SDXC/MMC Card Reader> mem 0xa0420000-0xa042ffff at device 0.1 on pci3
bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4
bhnd0: <BCM4331 BCMA bus> on bhndb0
bge0: <Broadcom BCM57765 B0, ASIC rev. 0x57785100> mem 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff at device 0.0 on pci3
brgphy0: <BCM57765 1000BASE-T media interface> PHY 1 on miibus0
sdhci_pci0: <Broadcom BCM577xx SDXC/MMC Card Reader> mem 0xa0420000-0xa042ffff at device 0.1 on pci3
bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4
bhnd0: <BCM4331 BCMA bus> on bhndb0
bge0: <Broadcom BCM57765 B0, ASIC rev. 0x57785100> mem 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff at device 0.0 on pci3
brgphy0: <BCM57765 1000BASE-T media interface> PHY 1 on miibus0
sdhci_pci0: <Broadcom BCM577xx SDXC/MMC Card Reader> mem 0xa0420000-0xa042ffff at device 0.1 on pci3
bwn_pci0: <Broadcom BCM4331 802.11n Dual-Band Wireless> mem 0xa0600000-0xa0603fff at device 0.0 on pci4
bhnd0: <BCM4331 BCMA bus> on bhndb0


kldstat
Code:
kldstat |egrep 'bhnd|bwn'|sed 's/.* //'|sort
bcma_bhndb.ko
bhnd.ko
bhnd_pci.ko
bhnd_pci_hostb.ko
bhndb.ko
bhndb_pci.ko
bwn_v4_n_ucode.ko
if_bwn.ko
siba_bhndb.ko

ifconfig
Code:
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 c8:2a:14:13:ac:cc
    inet 192.168.178.23 netmask 0xffffff00 broadcast 192.168.178.255
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
    inet 127.0.0.1 netmask 0xff000000
    groups: lo
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>


What is missing?
bwn0 is not listed in ifconfig ...
 
i am not sure why it does not work
also im not sure if you need bwn_v4_n_ucode firmware or without the _n_ (mine is not the same model / not a mac)
try to boot verbose and or compile the driver with BWN_DEBUG
 
Unfortunately not working yet.
Anyone out there, who got the wifi with BCM4331 on MBP up and running?
 
looks like it's not supported, you may try to hack the driver (i did with mine with limited success)
hw_revision 29 is not supported (mine is 30 also not supported)

i added the missing bits for my card from the linux b43 driver
unfortunately my card does not work very well in linux either so the end result is about 10Mb/s but still better than nothing
 
same issue here on a Mac mini late 2012. The computer has the same chipset.
Here outputs from my system:
Code:
#pciconf -lv
 
bwn_pci0@pci0:2:0:0:    class=0x028000 rev=0x02 hdr=0x00 vendor=0x14e4 device=0x4331 subvendor=0x14e4 subdevice=0x4331
    vendor     = 'Broadcom Inc. and subsidiaries'
    device     = 'BCM4331 802.11a/b/g/n'
    class      = network
Code:
sysctl net.wlan.devices
net.wlan.devices: rtwn0
The rtwn0 is a second USB WLAN adapter. The adapter works fine. But I cannot active the bwn_pci0 device.
What`s happend with the BCM4331 chipset?
 
Last edited by a moderator:
Unfortunately not working yet.
Anyone out there, who got the wifi with BCM4331 on MBP up and running?
Trying that now on MacBook Pro 2012, but failing miserably so far.... :-(

I've compiled custom kernel with:
Code:
device        bwn            # Broadcom BCM43xx wireless NICs.
options       BWN_GPL_PHY
and also installed bwn-firmware-kmod
but still got "driver not attached" in dmesg during boot and no interface in sysctl net.wlan.devices
 
Back
Top