Solved Broadcom BCM43xx wifi setup

Help with setting up network cards, including WiFi cards.
Post Reply
wb7odyfred
Posts: 207
Joined: Sat Nov 12, 2016 5:44 pm

Solved Broadcom BCM43xx wifi setup

Post by wb7odyfred »

Broadcom bwn BCM43xx BCM43xxx wifi setup

Working chipsets BCM4311
https://forums.ghostbsd.org/viewtopic.p ... 331#p10712 place 3 different firmwares in /boot/modules
/boot/loader.conf select one firmware to load.
This driver requires firmware to be loaded before it will work.The ports/net/bwn-firmware-kmod port needs to be installed before ifconfig(8) will work. In most cases the bwn_v4_ucode kernel module from the port should be used. However, if an LP (low power) PHY is being used, the bwn_v4_lp_ucode module should be used. or maybe bwn_v4_n_ucode_load be used with BCM4322 chipset

bwn_v4_ucode_load="YES"
or
bwn_v4_lp_ucode_load="YES"
or
bwn_v4_n_ucode_load="YES"

in loader.conf

most likely bwn_v4_ucode_load="YES" like my imac.
at the bottom Eric tells probono he has the BCM4322 chip in his iMac working
Maybe test boot a helloSystem USB flash drive or a nomadbsd.org USB Flash drive and see if these FreeBSDs work on your hardware

https://wiki.freebsd.org/Laptops/HP_Compaq_6715b Laptop HP Compaq 6715b
https://wiki.freebsd.org/IntelMacMini Intel Mac Mini wiki, look for BCM4331 setup
https://www.reddit.com/r/freebsd/commen ... _mac_mini/ Reddit Gettting BCM4331 working on a mac mini
https://github.com/lostcarrier/macbookpro-freebsd 2016 FreeBSD setup for a Mac Book Pro
https://mail-archive.freebsd.org/cgi/ge ... d-wireless Old 2018 Patch on file if_bwn_phy_n_core.c
https://forums.freebsd.org/threads/bcm4 ... pen.87765/ BCM4331 not working on Mac Book Pro 2011
https://www.freshports.org/net/bwn-firmware-kmod bwn firmware kmod
https://man.freebsd.org/cgi/man.cgi?que ... ease-ports FreeBSD release ports
Code Src
https://github.com/freebsd/freebsd-src/ ... ipc.c#L102 chipc.c file changes/patches
https://github.com/freebsd/freebsd-src/ ... pc.c#L1311

please comment below and add confirmations of which chipsets have been confirmed testing and working by editing the RE: TITLE and changing to your Solved: BCM43xx with exact chipset name and number. Like BCM4331 or BCM43258

Which firmware file name that particular Broadcom BCM chipset uses.

The output of your

Code: Select all

ghostbsd-version[
freebsd-version/code] and 
[code]uname -aKmnopr
These 3 items, will help nexr guy make his Broadcom WiFi chipset work with Ghostbsd/Freebsd

Clockwork:
@Finster_Fred:
> ifconfig create wlan0 wlandev bwn0
I did without this line. In my case, the interface was created independently and did not require additional actions on my part.
> where does firmware files go in what path directory? how to get firmware files? /boot/modules
I'm not sure about the firmware, but I wrote that you need to install net/bwn-firmware-kmod. This port contains the necessary modules for work. You can do pkg info -lx bwn-firmware-kmod and you will see that during installation it already put the necessary modules in the right place. /boot/modules

Fred Finster:
Good work Job well done. Thank you. Appreciate the screen grabs you made.
I really do want to know and share the firmware name for your bcm4311 chipset and path location where wifi firmware files are stored. yes the net/bwn-firmware-kmod did install the firmware files correctly. I just wish to be precise for future users that may just copy a firmware file to a path and not use the freshports method. Place the firmware files in /boot/modules directory.
Clockwork:
https://www.freshports.org/net/bwn-firmware-kmod
has info on this if they don't want to set the port. You can click the button: Expand this list (7 items) to expand the message. According to pkg-plist, he brought these three files with him:
/boot/modules/bwn_v4_ucode.ko
/boot/modules/bwn_v4_lp_ucode.ko
/boot/modules/bwn_v4_n_ucode.ko

Code: Select all

ifconfig -HT wlan0 create wlandev bwn0
or

Code: Select all

ifconfig  wlan0 create wlandev bwn0

Code: Select all

man ifconfig
for details

Code: Select all

sudo ifconfig wlan0 up scan
find access points around you.


Now edit these 3 files /boot/loader.conf, /etc/rc.conf, and /etc/wpa_supplicant.conf

examples of editing 3 files:
EDIMAX EW-7811un v1 https://forums.ghostbsd.org/viewtopic.php?f=64&t=526
RTL8188ce https://forums.ghostbsd.org/viewtopic.php?f=64&t=570

/boot/loader.conf

Code: Select all

boot_verbose="1"
verbose_loading="YES"
bwn_pci="YES"
bwn_v4_n_ucode_load="YES"
if_bwn_load="YES"
bwn_v4_n_ucode_load="YES"
if_bwn_load="YES"

 
https://wiki.freebsd.org/Laptops/HP_Com ... D%22YES%22

/etc/rc.conf

Code: Select all

rc_debug="YES"
rc_info="YES"
network_interfaces="AUTO"
wpa_supplicant_enable="YES"

# wlans_bwn0="wlan0"
# ifconfig_wlan0="WPA SYNCDHCP"

wlans_bwn0="wlan0"
create_args_wlan0="down country US"
ifconfig_wlan0="WPA DHCP"
Command to use on the CLI

Code: Select all

ifconfig create wlan0 wlandev bwn0
# or use this next line for wlan1
ifconfig create wlan1 wlandev bwn0
Service commands to restart the network. Usually issue the first line and all is well

Code: Select all

service netif restart
service routing restart
dimwit_flathead
Posts: 1
Joined: Sat Feb 17, 2024 8:52 pm

Re: Solved Broadcom BCM43xx wifi setup

Post by dimwit_flathead »

The bwn manpage says that you have to rebuild the kernel. I had to uncomment "device bwn" in FreeBSD's 14.0 kernel config.

https://man.freebsd.org/cgi/man.cgi?bwn%284%29
wb7odyfred
Posts: 207
Joined: Sat Nov 12, 2016 5:44 pm

Re: Solved Broadcom BCM43xx wifi setup

Post by wb7odyfred »

Can you share the vendor and product pci ID numbers of which BCM43xx wifi device you got working? Also the related lines in those 3 files
/boot/loader.conf /etc/rc.conf and a sample /etc/wpa_supplicant.conf file

ls -lh /boot/modules/ with the related Broadcom device module files

Thanks, I am quite happy someone was able to use the above information and succeed in using a BCM43xx wifi chip on Freebsd 14.0
fWyTiigN5D7T
Posts: 2
Joined: Fri May 10, 2024 7:34 pm

Not working: BCM4312 802.11b/g LP-PHY

Post by fWyTiigN5D7T »

Card: BCM4312 802.11b/g LP-PHY in Dell Inspiron 1545 laptop
Driver requested by the card: bwn_v4_lp_ucode
System: Latest GhostBSD with all updates
hw-probe link: https://bsd-hardware.info/?probe=3c3432b2c0

Upon loading the driver by

Code: Select all

sudo kldload bwn_v4_lp_ucode
and connecting to the network, kernel panics and reboots automatically after about 10 seconds since connecting. No changes to rc.conf or loader.conf. Exact steps to reproduce:
  • Get BCM4312 802.11b/g LP-PHY card (mini PCIe)
  • Install GhostBSD
  • save your WPA-PSK network in /etc/wpa_supplicant.conf
  • sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf or achieve same result by letting Network Manager in MATE do it
  • sudo kldload bwn_v4_lp_ucode
  • sudo ifconfig wlan0 down
  • sudo ifconfig wlan0 up
  • sudo dhclient wlan0 or achieve the same by adding to rc.conf: ipv6_activate_all_interfaces="YES"
  • You are now connected, ping and Internet works
  • After couple of seconds, GUI freezes, after 10 seconds, reboot
By the way, GhostBSD detects this card (during installation?), so wlan0 and bwn0 are already joined and ready to work, this is done by default in /etc/rc.conf entries, all you need is a bwn driver loaded.

I tried various things, from doing everything by hand without .conf files assistance, to fully loading everything by .conf and wpa_supplicant, tested also in single root mode. Nothing worked, I've tried: no APIC (bricked system), change from DMA to PIO in bwn driver, no ACPI, Safe Mode, siba_load, bhnd_load, and some more, no change anywhere. Every attempt ended up with the same kernel panic. I am not able to copy paste the full error because after reboot I don't know if logs are preserved anywhere?
Lastly, I did not try to recompile the kernel, I don't know how to do it and what I supposed to change there.
Post Reply