This page covers the BCM47xx and BCM53xx Wireless Router/AP SoC running MIPS CPUs.
Beginning with r41024 this arch was split into 3 subtargets:
- legacy: old devices like WRT54G*
- generic: devices not fitting the other 2 subtargets
- mips74k: newer devices with BCMA SoC and bgmac ethernet
The current goal is to boot one image on all the different devices using SoC of the bcm47xx family. The main image is openwrt-brcm47xx-squashfs.trx which is in the generic image format used by the Broadcom SDK for these devices. Many vendors like Netgear and Linksys currently are using some own image formats to prevent a wrong image from being flashed to their devices, these images are containing the same code as the generic image, but do have some special header just for this device, mostly containing the internal device name and the version of this firmware.
If you want to flash OpenWrt from the default firmware use the image for your device if there is one, otherwise use openwrt-brcm47xx-squashfs.trx image. For sysupgrade always use the generic image openwrt-brcm47xx-squashfs.trx independently from what image you initially flashed to your device.
If that does not work you could download the image builder our check out OpenWrt from the svn and edit target/linux/brcm47xx/image/Makefile to fit your needs. If you have to do some modifications to generate a valid image and it boots on your device please send a patch to the mailing list for inclusion into OpenWrt.
Version 12.09-rc1: http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/brcm47xx/
This image has support for all BCM47xx SoCs using SSB. These are all devices with a ieee802.11b or ieee802.11g WiFi support and the BCM4785/BCM4705 with an additional ieee80211n PCI devices connected to the SoC. This also includes some devices without any WiFi functionality using this SOC.
This SoC has a different Ethernet core and does not use b44 as the Ethernet driver but is needs tg3 for that. The default images for Attitude Adjustment do not include the tg3 Ethernet driver. Use the image builder (OpenWrt-ImageBuilder-brcm47xx-for-linux-i486.tar.bz2) to generate a image with Ethernet support. The profile with b43 as the WiFi driver is name Bcm4705-b43.
make image PROFILE="Bcm4705-b43"
Snapshot images download: http://downloads.openwrt.org/snapshots/trunk/brcm47xx/
This is the current version where development takes place. It contains support for all the SoC also supported by Attitude Adjustment and in addition also some most of the recent bcm47xx SoCs. It should at least boot of all the know MIPS based BCM47xx and BCM53xx based SoCs.
The default Barrier Breaker images are containing the b44, tg3 and bgmac Ethernet driver so Ethernet should work on all supported services without using the image builder. If you want to save some space you could use the image builder to generate an image better suiting your device.
New Broadcom devices have gigabit Ethernet that is supported by bgmac kernel driver. Unfortunately CPUs on most of SoCs are too slow to provide 1000 Mb/s routing or NAT. It results in NAT being limited to something around 130Mb/s on BCM4706 and even less on slower units (like ~50Mb/s on BCM4718A1).
To solve this problem Broadcom developed proprietary ctf.ko module that watches in-system routing rules and implements NAT on it's own. It results in much better performance (even up to 850Mb/s on BCM4706) while breaking things like QoS and advanced firewall rules.
Unfortunately ctf.ko is closed source and there is no open source alternative. For more details see:
There are different WiFi drivers for the Broadcom WiFi cores found in the BCM47xx SoCs or the PCI(e) or USB connected WiFi chips on the boards. There is no driver supporting all chips and all have their pros and cons. Some chips are supported by three of these drivers and others are supported by none of these drivers.
Do not activate multiple drivers at once. The first that is loaded takes precedence in that case so it is not easily controlled which one. Normally using other Linux distributions you would blacklist the other two drivers. In OpenWrt you can just make sure they are not installed using opkg, which automatically removes them from the
This is the open source driver built by the community based on reverse engineered specifications of the proprietary Broadcom driver. This is the driver that is included in the current OpenWrt builds. It is also in the mainline Linux kernel. This driver supports most of the current available Broadcom WiFi cores. It has support for station (STA), AP, AdHoc, Mesh and other modes, but it just supports 802.11g rates and does not support 802.11g operating in the 5GHz band.
The OpenWrt package is named: kmod-b43
This is for some very old ieee802.11b and first generation Broadcom ieee802.11g compatible devices. This driver has a similar feature set to b43 and is only supported by the community based on reverse engineered specifications.
The OpenWrt package is named: kmod-b43legacy
This is the open source driver supported and released by Broadcom in 2010. It is mainlined in the Linux kernel, but only since version 3.2. It is still missing some functionality, as of 2013: dual width 40MHz channels, advanced power saving features, LED support, HW-based encryption, among others. The driver has been renamed to its two constituents, the soft MAC driver (brcmsmac) and the full MAC driver (brcmfmac).
brcmsmac supports some recent soft mac ieee802.11n Broadcom WiFi cores found on PCIe cards and in SoCs, for details see the website. This driver is developed and supported by Broadcom. The current version only supports station mode, but there are patches in current OpenWrt trunk which are adding support for AP and Ad Hoc mode. brcmsmac is capable of operation devices with ieee80211n rates and running the in the 5GHz band, but AP mode currently does not work in the 5GHz band.
The OpenWrt package is named: kmod-brcmsmac
brcmfmac supports some recent full mac ieee802.11n Broadcom WiFi cores found on USB, SDIO and SPI interfaces, for details see the website.
The OpenWrt package is named: kmod-brcmfmac
broadcom-wl contains the proprietary closed source Broadcom STA (STAtion, for access point use) driver, released by Broadcom before releasing the open source brcm80211 driver. It contains closed source binaries enclosed within an open source package to integrate it into a kernel package. The closed source part was created especially for OpenWrt and is independent from the kernel version in use. This driver supports many of the ieee802.11g devices and some of the earlier ieee802.11n devices. As of 2013, it often has more functionality than the brcm80211 drivers. For example, it supports dual width 40MHz channels and power saving features, which have yet to be implemented in brcm80211. It is capable of operating in AP mode and also supports the 5GHz band.
Note that for broadcom-wl a special utility has to be used to configure most advanced driver settings, as they cannot be configured using UCI. In OPKG, this utility is called
wl. An open source variant created by OpenWrt developers is called
wlc, which is also used by UCI to communicate with the driver. For basic settings UCI can therefore be used as normal. Note that many advanced functionality that can usually be configured using UCI (see the UCI wireless configuration page) cannot be configured with UCI with this driver however. Instead, any advanced functionality can by configured with the
wl utility. Beware that running
wifi (to activate your UCI WiFi configuration file) will however restart the driver and you will lose your settings made by the utility.
The OpenWrt package for the driver is named: kmod-brcm-wl
The OpenWrt package for the configuration utility is named: wl
The OpenWrt package for the open source variant of the configuration utility is named: wlc
After installing any wireless driver made for opkg and OpenWrt, new WiFi configuration entries in the
/etc/config/wireless UCI file are available upon reboot. These are set by the OPKG driver maintainer. If they are not available, you can run
wifi detect to acquire a sample configuration. For broadcom-wl (the kmod-brcm-wl package) the wireless interface is named
wl0. By far not everything can be set using UCI. Use the
wl utility to set advanced settings. For example, to set the channel to 4, on the 2.4Ghz band, and with a bandwidth of 40Mhz using the lower band, use:
root@OpenWrt:~# wl -i wl0 chanspec -c 4 -b 2 -w 40 -s -1 Chanspec set to 0x2b04
Now reload the wifi configuration by:
root@OpenWrt:~# wl -i wl0 down root@OpenWrt:~# wl -i wl0 up
You configure to run these settings at boot to make them stick. Please note that this method of WiFi configuration is rather low level and—going partly past the normal OpenWrt WiFi interface—there isn't any mechanism available to automatically choose the right channel for example. So you have to manually select the channel specification. If the above channel is too crowded in your area, set it for example to channel 9 using the upper sideband:
root@OpenWrt:~# wl -i wl0 chanspec -c 9 -b 2 -w 40 -s 1 Chanspec set to 0x2e09
In the future maybe the community will further integrate the proprietary Broadcom driver into the OpenWrt framework. What is more likely though is that the open source drivers (brcm80211) will obtain more functionality.
If you want to use LuCI to configure UCI configuration, note that not all functionality and features are currently well supported and do not correspond well to the driver functionality in the graphical interface. It may therefore sometimes call the driver configuration utility with unsupported arguments.
For providing authentication and encryption with Wi-Fi and the broadcom-wl driver, you need the proprietary application from Broadcom, nas (Network Authentication Service). The tool is automatically started by the wireless infrastructure to accomodate the broadcom-wl driver. There is no configuration necessary, just install the package nas. See also encryption.
An exmaple UCI configuration is as follows. Note that the hwmode option does not have to be given in which case the driver's default is used.
config wifi-device 'wl0' option type 'broadcom' option disabled '0' option channel '4' option txpower '16' config wifi-iface option device 'wl0' option network 'lan' option ssid 'OpenWrt' option key 'passphrase' option mode 'ap' option encryption 'psk2'
|Broadcom devices may use two different buses for its wireless drivers:
- SSB (Sonic Silicon Backplane), bus used by older devices
- BCMA (AMBA), bus developed by Broadcom; shall replace SSB (see also here)
The b43 driver supports both SSB and BCMA-chips. However, brcm80211 (brcmSmac & brcmFmac) does not and will not support any chips which contain the SSB. Therefore, older devices may be unsupported by the newer open source drivers. See also this patch Patch for 3.11
When using sysupgrade always use openwrt-brcm47xx-squashfs.trx and not any device specific file.
See also '.bin' to '.trx' image conversion.
Most of the recent devices have a CFE bootloader able to boot images over the network.
To build an image bootable over the network select the following: "Target Images" —> [x] "ramdisk" —> Compression —> [xz] This will generate a file in bin/brcm47xx/openwrt-brcm47xx-vmlinux.elf
The following example boots an elf image from the tftp server at 192.168.1.2 under the path /brcm47xx/openwrt-brcm47xx-vmlinux.elf:
boot -tftp -elf 192.168.1.2:/brcm47xx/openwrt-brcm47xx-vmlinux.elf
List with some detailed informations about bcm47xx SoCs: http://wireless.kernel.org/en/users/Drivers/b43/soc header
doc/hardware/soc/soc.broadcom.bcm47xx.txt · Last modified: 2014/07/18 09:47 by theoradicus