OpenWrt Forum Archive

Topic: broadcom proprietary driver and Asus RT-N16

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

b43 driver is consuming too much cpu power, so I decided to try broardcom proprietary driver.
I installed kmod-brcm-wl, nas, wlc and removed b43 kmod.

My wireless settings are

config wifi-device 'wl0'
    option type 'broadcom'
    option channel '5'
    option txpower '18'
    option hwmode '11bg'

config wifi-iface
    option device 'wl0'
    option mode 'ap'
    option ssid 'skygate'
    option encryption 'psk2+tkip+ccmp'
    option key 'password'

The problem is that wireless is not working after reboot. I see skygate network for a second, after that it's disappeared. I can go to Wifi settings and hit save&apply button. That's bring it to life. I suspect nas - I tried to disable security with option encryption 'none' and wireless works after reboot. What can go wrong ? In the wiki it's said that nas 'just works'

This is my first experience with OpenWRT (I migated from DD-WRT), so I could miss the obvious.

(Last edited by abi on 5 May 2015, 15:05)

nas isn't really responsible for beacons, so it may be sth different. Unfortunately both wl.ko and nas are closed source, so there are limited possibilities of fixing this.
You may try different encryptions, maybe you'll be lucky enough to not trigger some wl.ko/nas bug.

Nope, I tried everything, except WEP (as this is the same as to leave it unencrypted), also tried CC (trunk).
Well, I'll stick to b43 then, 1 Mb/sec is OK most of the time.

I have an ASUS RT-N16 too and never got the brcmsmac driver to work properly. That meant I was stuck on the b43 driver which is limited to 802.11g, no support for 802.11n unfortunately.

However, I have finally cracked the Broadcom proprietary driver using Chaos Calmer rc3. I spent two days struggling with all the options, as some seemed to cancel each other out or wouldn’t survive reboots.

The first crucial discovery I made (after the first day!) is that the Broadcom-wl config utility is useless. It appears to be outdated and not support WPA2 for instance. When I used wlc instead of wl I started to make progress.


These are the steps I took (while being connected with a cable of course):

1) Remove any remnants of previous drivers such as b43 and brcmsmac (kmod-b43, kmod-b43legacy, kmod-brcmsmac, kmod-brcmutil etc.) and you might as well remove the official wl utility to prevent confusion.

2) Reboot the router

3) Delete etc/config/wireless

4) Install:
    * kmod-brcm-wl        (the driver itself)
    * nas            (broadcom’s WPA supplicant. Without this you won’t get WPA or WP2 to work)
    * wlc            (the open source version of the official wl tool)

5) Create a new wireless config file containing the following:

config wifi-device  wl0
    option type broadcom
    option channel 3        (change the channel to what works best for you)
    option country GB         (replace GB with your country’s ISO 3166 country code)
    option htmode HT20

config wifi-iface
    option device wl0
    option network lan
    option mode ap
    option ssid XXXXXXXXXX         (replace with your ssid)
    option encryption psk2+ccmp    (this forces AES encryption over WPA2)
    option key XXXXXXXXXX         (replace with your WPA2 passphrase)

6) Use the wlc utility to set a few additional settings that appear to be only work using wlc

In this order:
wlc down
wlc ap 1 (I wasn’t able to get the AP mode without this, it seemed to default to client mode until I used wlc to force it)
wlc wpa_auth 128 (this sets the key type to WPA2-PSK. Mixed mode WPA/WPA2 appears to be 132)
wlc up

There seems to be no manual for wlc. It is largely compatible with wl so you can use that manual and list of commands for the basics however while wl requires to specify the interface for each command, wlc seems to be fine without it. Furthermore, wlc appears to support more than wl so for more advanced/modern settings it takes a bit of trial and error. I also used the manual for nas to get some of the settings from (the correct code for wpa_auth for instance). If your requirements are different from mine (using RADIUS authentication for instance) I suggest you dive deeper into the nas utility and its manual.

7) Test whether everything works OK by rebooting the router. If it comes up without any interventions you’ve done it right.

(Last edited by MorrisMajor on 7 Sep 2015, 12:02)

Thanks MorrisMajor.But not working.I use N16 both as Client and Master.
http://screenshot.net/y2jolsp.jpg
Client mode works perfectly after reboot but Master mode does not.While a client can connect to the router with 802.11n, the DHCP failed to issue IPs.

(Last edited by axishero on 15 Oct 2015, 19:17)

Can you first try to get it to work only as a Master? I'd start there, get that to work, and then see what happens when you add Client mode.

I couldn't get it to work as Master until I did the wlc ap 1 thing.

brcmsmac was rather slow and unstable for me (I was having the same issue as MorrisMajor had). I didn't test b43 at all.

So I switched to proprietary blob driver, and it seems to work fine on Chaos Calmer (15.05.1).

On brcmsmac, iperf3 showed 16 Mbits/sec max. On broadcom-wl, router is able to push up to 77 Mbits/sec.

Transition was rather smooth, though. The only obstacle was that WPA2-Enterpise was somehow unavailable for configuration through the web UI. I had to do that manually through uci. Other than than, I didn't have to do anything. No wireless config files or anything.

root@OpenWrt:~# uci show wireless.@wifi-iface[1]
wireless.cfg063579=wifi-iface
wireless.cfg063579.device='wl0'
wireless.cfg063579.network='lan'
wireless.cfg063579.mode='ap'
wireless.cfg063579.ssid='redacted'
wireless.cfg063579.doth='1'
wireless.cfg063579.wmm='1'
wireless.cfg063579.encryption='wpa2'
wireless.cfg063579.auth_server='192.168.0.104'
wireless.cfg063579.auth_secret='redacted'

The discussion might have continued from here.