RT-N16 brcmFmac & brcm-wl trouble

Thanks! Now I undestood, that I can't use brcmfmac for rt-n16. Brcmsmac now work, but only on 20Mhz. (I think it means that firmware already installed). How I can get to work brcm-wl? Can somebody post working config for brcm-wl?

  • Wow...you purchased a license from Broadcom!?!?
  • That works as an AP?!?!
  • Will they let you share it with us???

You will likely have to install wlc and wireless-tools.

Note that broadcom-wl doesn't use a standard cfg80211 API, so it can't be configured using standard nl80211 tools. This is why OpenWrt has an extra package providing wlc (user space tool that uses Broadcom's proprietary API) and broadcom.sh (that translates UCI config into wlc calls). You can also install wl binary that is closed source version of wlc written by Broadcom that may be helpful for some debugging. Remember that broadcom.sh may not handle all UCI options, please see the UCI wireless configuration page for the details. Some advanced functionality can by configured with the wl utility only. 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.

Remember that there is little interest in devices that require legacy Broadcom wireless drivers (due to their severe limitations compared to better-supported chip sets), so the documentation may be many years old. It looks like there haven't been any significant changes on that page in five or more years.

The code dates back nearly a decade

4ae595a3aa1 package/broadcom-wl/Makefile        (Jo-Philipp Wich 2010-07-13 16:55:57 +0000  12) PKG_VERSION:=5.10.56.27.3

I followed this instrction http://softinite.com/?p=241 but I think luci is not adopteb for this driver. And in my case devices connected and disconnected immediate.
As a result, is the best way to use brcmsmac driver? There is no other options besides b43 (((

Let me be clear up any confusion. No, won't work:

From https://wiki.debian.org/wl

It includes a binary-only component targeted for the x86 or x86-64 architecture. Supported devices are listed at the end of this page.

From https://www.archlinux.org/packages/community/x86_64/broadcom-wl/

Architecture: x86_64
Repository: Community
Description: Broadcom 802.11 Linux STA wireless driver

From: https://www.broadcom.com/support/download-search?pf=Wireless+LAN+Infrastructure

here are different tars for 32-bit and 64-bit x86 CPU architectures.

This is why I asked if he purchased a license...

or maybe your device is x86_64???

NO - you don't, because is a Broadcom CPU SoC.

As far as I know, this is the ONLY way.

I mean wireless config file. Yes, it used as AP.

Thank for all!!!

1 Like

Read the pages carefully then, as brcm-wl does not work in AP mode.

BTW, you don't have to use 2 posts to respond - we can see you talking to everyone.

brcm-wl only works great on Lede (Asus RT-N16). It doesn’t work on OpenWRT, they ruined everything

Thanks! I will try it. Which version do you use? How you configure it? Something like this http://softinite.com/?p=241 ?

LEDE 17.01.7

https://openwrt.org/toh/asus/rt-n16

opkg remove kmod-b43 kmod-b43legacy kmod-mac80211 kmod-cfg80211 kmod-brcmsmac
opkg update; opkg install kmod-brcm-wl nas wlc wl
rm -f /etc/config/wireless; reboot

1 Like

Thank a lot!

First, to be very clear, OpenWrt didn't do anything to "ruin" this.

Broadcom hasn't maintained it in a decade and it is a miracle that it was working at all with the Linux 4.4 kernel. Kernel ABIs change with time and proprietary, binary blobs eventually no longer are compatible. In the cell-phone world, this is often months, not many years.

Second, LEDE v17 is not a solution and shouldn't be run on any device.

v17 is unmaintained, has been for some time, and is not recommended for any use at this time due to multiple, severe, well-known, actively exploited security vulnerabilities in its kernel, third-party applications, and 802.11 protocols.

5 Likes

I found the way to use proprietary drivers kmod-brcm-wl with openwrt 19.07.2.
Basically we need add one disabled wifi-iface at the end of /etc/config/wireless:

config wifi-device 'wl0'
        option type 'broadcom'
        option channel '1'
        option txantenna '3'
        option rxantenna '3'
        option country 'BR'
        option frameburst '1'
        option htmode 'HT40'
        option txpower '14'
        option hwmode '11g'

config wifi-iface 'default_wl0'
        option device 'wl0'
        option network 'lan'
        option mode 'ap'
        option wmm '1'
        option ssid 'My SSID'
        option encryption 'psk2+ccmp'
        option key 'mypassword'

config wifi-iface 'wifinet1'
        option device 'wl0'
        option mode 'ap'
        option ssid 'TrickToFixNasParams'
        option encryption 'none'
        option disabled '1'     

Luci Wireless interface doesn't work.

I can show iface details using iwinfo via ssh:
iwinfo wl0 assoclist

Details:
https://bugs.openwrt.org/index.php?do=details&task_id=2139

2 Likes

@oferreiro Thanks you. I've tried the configuration you've proposed and now it is a second day in a row when WiFi works without any issues. (Before that the record was 15 minutes).

I followed the guide at https://openwrt.org/toh/asus/rt-n16 to set up OpenWrt 19.07.3 on my Asus RT-N16 to use is by setting it up as wireless client network for providing internet to devices connected to wired LAN ports of N-16 by following https://openwrt.org/docs/guide-user/network/wifi/connect_client_wifi.

After installation as my intention was to use the proprietary Broadcom driver so as to make the wireless -n work, I issued the following commands:

# removing previous modules 
opkg remove kmod-b43 kmod-b43legacy kmod-mac80211 kmod-cfg80211 kmod-brcmsmac
# installing proprietary module and supported packages
opkg update; opkg install kmod-brcm-wl nas wlc wl 
# cleaning up wireless configuration and rebooting device
rm -f /etc/config/wireless; reboot 

Thereafter I adjusted /etc/config/wireless config as per @oferreiro comment apart from the fact that I use ng as hwmode as I want wireless N.

Now I see that my wl0 device is showing as not active and my wireless connection is showing as not associated. I have attached the screenshot. Am I doing anything wrong? The wl0 is showing as inactive and generic 802.11 bg instead of 802.11bgn . Also nothing is connected.

Just issued following commands. No change in situation

root@OpenWrt:~# iw dev wl0 scan
nl80211 not found.
root@OpenWrt:~# iw list
nl80211 not found.
root@OpenWrt:~# wl down
wl: wl driver adapter not found
root@OpenWrt:~# wl -i wl0 down
root@OpenWrt:~# wl -i wl0 chanspec -c 9 -b 2 -w 40 -s 1
Chanspec set to 0x2e09
root@OpenWrt:~# wl -i wl0 up
root@OpenWrt:~# wl -i wl0 status
SSID: "\x4F\x70\x65\x6E\x57\x72\x74\x4F\x6E\x65"
Mode: Managed	RSSI: 0 dBm	noise: -77 dBm	Channel: 9
BSSID: 20:CF:30:CE:15:A7	Capability: ESS ShortPre ShortSlot 
Supported Rates: [ 1(b) 2(b) 5.5(b) 6(b) 9 11(b) 12(b) 18 24(b) 36 48 54 ]
802.11N Capable:
	Chanspec: 2.4GHz channel 9 40MHz (0x2e09)
	Control channel: 11
	802.11N Capabilities: 
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 32 ]

wl -i wl0 status shows that wireless N capability is available then why device is inactive or not associated.

The 'TrickToFixNasParams' network must be the last network. Otherwise, this hack will not work.
You can do it, editing /etc/config/wireless like this:

config wifi-device 'wl0'
        option type 'broadcom'
        option channel '1'
        option txantenna '3'
        option rxantenna '3'
        option country 'BR'
        option frameburst '1'
        option htmode 'HT40'
        option txpower '14'
        option hwmode '11g'

config wifi-iface 'default_wl0'
        option device 'wl0'
        option network 'lan'
        option mode 'ap'
        option wmm '1'
        option ssid 'My SSID'
        option encryption 'psk2+ccmp'
        option key 'mypassword'

config wifi-iface 'wifinet1'
        option device 'wl0'
        option network 'lan'
        option mode 'ap'
        option wmm '1'
        option ssid 'My another SSID'
        option encryption 'psk2+ccmp'
        option key 'mypassword'

config wifi-iface 'wifinet2'
        option device 'wl0'
        option mode 'ap'
        option ssid 'TrickToFixNasParams'
        option encryption 'none'
        option disabled '1'

Using Luci, I think you need remove 'TrickToFixNasParams', and recreate it after create your additional wireless network.
But Luci interface doesn't work to show connections info with broadcom-wl drivers.
The last version that Luci wireless interface worked correctly was Lede-17.01.7.
Using ssh interface, you can get wireless info using iwinfo (replace <iface> by wl0, wl0.1 etc):

iwinfo <iface> assoclist

As the package is proprietary code, it has not been maintained for a long time.
Unfortunately the open source driver for these broadcom chips was basically made using reverse engineering. So they perform much less than proprietary drivers.

Thanks - I'm also tryign to get an old WRT610n v1 to work again. Had an older version of Openwrt on it which did work - (I do recall enabling or building with the wl drivers, but that was several years ago.) I have have loaded 19.07.3, but found that once I remove b43 and load wl, also that luci does not read the wireless settings - but cli wlc/wl/iwinfo show correct
I did notice that wifi status nor ubus call network.wireless status (which I think is what luci calls under the hood to get wireless status) is returning blank/empty.
I suspect this has something to do with netifd, as only with b43 which uses mac80211 scripts like /lib/netifd/wireless/mac80211.sh ?
Anyhow, the strangest part is that I swear as I was messing around with removing b43 and loading wl, at one point I had luci working properly - i.e. it was reading and setting wifi properly with wl driver - I could see it reported 300Mbps and bgn for 2.4ghz wl0, and abgn for 5ghz wl1

But sadly, I'm not sure what state or which firmware (playing around with imagebuilder) I had loaded, or which packages i had removed/added :((

So I'm convinced that there is something not quite right with the broadcom stuff in terms of reporting status (although it's working) - as I understand it, all the custom stuff for this broadcom interaction with wifi, netifd, uci, and in general openwrt is implemented in /lib/wifi/broadcom.sh

but sadly, I still cant see why it's failing to report status - but I'm convinced it's solvable

Ok I spent more time on this today.
Luci + 18.06.8 + wl mostly work. (There is some wonkyness with wl1 and the way you must specify a 5ghz channel, else wl1 will somehow think it's on 2.4G)
(openwrt-18.06.8-brcm47xx-generic-linksys-wrt610n-v1-squashfs.bin)

But for the most part, it will at least show you accurate wireless settings.

But upgrading to 19.07.3 then moving back to wl, luci will not show wireless information.
It seems like this is probably related to changes in the way luci gets/sets wireless (and other) configs.
(I did see that neither wifi status nor ubus call network.wireless status work in earlier versions)

I'm guessing this is fixable if someone were to implement netifd handler script for broadcom (wl) driver, but I'm guessing there is not much support left around for this dead horse :frowning:

1 Like

I think it is a bug.
Luci don't work with broadcom-wl drivers, on last openwrt versions.
But wifi itself works well, after I inserted an additional disabled interface wifi-iface at the end of /etc/config/wireless (RT-N16 brcmFmac & brcm-wl trouble)
I'm working with a netgear wl3500l-v1. It don't support 5Ghz, only 2.4Ghz.
I think this bug need another report.
But I have a question: won't it duplicate the bug report?
https://bugs.openwrt.org/index.php?do=details&task_id=2139