# The Ubuntu Forum Community > Ubuntu Official Flavours Support > Networking & Wireless > [all variants] New brcm80211 driver guide for Broadcom wireless cards

## Axx83

*Update 29/04/2011*
The new broadcom driver is included in the 2.6.38 kernel that comes with Ubuntu 11.04 Natty Narwhal
I suggest everyone to just upgrade to the new version.


*Update 07/01/11*
Thanks to user some-one the problem with git sources has been solved.
At the moment the only commit version that compiles in 10.10 is this one:
http://git.kernel.org/?p=linux/kerne...efe3b14;sf=tgz
Download the .tar.gz file in your home directory and extract it.
Now INSTEAD of "cd ~/linux-next/drivers/staging/brcm80211" you will do "cd ~/linux-next-a694cb1" and follow the rest of the guide strarting with "nano Makefile".

*START*
This guide has been tested and works on Ubuntu 10.10 Maverick amd64 installed on an Acer Travelmate 8172t with Broadcom *BCM43225* wireless device.

Currently supported chips
=========================
Name      Device ID
BCM4313   0x4727
BCM43224  0x4353
BCM43225  0x4357

This guide is based on this tutorial in the opensuse forum: Opensuse installation guide which is based on the README file inside the source code.

Make sure the proprietary broadcom driver is not loaded by the system, open "Additional driver" application in system > administration and disable the driver if it was enabled, restart if necessary.

Open terminal (Applications>Accessories>Terminal) and copy paste these lines one after another.

Install build packages


```
sudo apt-get install build-essential git-core
```


Download the driver and the firmware


```
git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git clone git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git
```

Modify the file to make it work with your kernel


```
cd ~/linux-next/drivers/staging/brcm80211
nano Makefile
```

Add this code at the end


```
KDIR    := /lib/modules/$(shell uname -r)/build
ccflags-y += -I$(SUBDIRS)/include -I$(SUBDIRS)/sys -I$(SUBDIRS)/phy

default:
	echo $(PWD)
	$(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) CONFIG_BRCM80211_PCI=y V=1 modules
```

CTRL+X to exit and save


Compile the driver


```
make
```

If it exit with and error then check the UPDATE section at the top.


Copy it in the proper dir


```
sudo cp brcm80211.ko /lib/modules/`uname -r`/
```


Download and copy the device's firmware


```
sudo mkdir /lib/firmware/brcm
cd ~/linux-firmware
sudo cp brcm/bcm43xx* /lib/firmware/brcm
cd /lib/firmware/brcm
sudo ln -s bcm43xx-0-610-809-0.fw bcm43xx-0.fw
sudo ln -s bcm43xx_hdr-0-610-809-0.fw bcm43xx_hdr-0.fw
```


Load the driver module


```
sudo modprobe mac80211
sudo insmod /lib/modules/`uname -r`/brcm80211.ko
```

At this point the wireless should work correctly in network-manager


Load dependencies


```
sudo depmod -a
```


Add the module to the startup


```
sudo nano /etc/modules
```

Add this lines at the end


```
brcm80211
```

CTRL+X to exit and save


Fix the problem with suspending


```
sudo nano /usr/lib/pm-utils/defaults
```

add after #SUSPEND_MODULES=""


```
SUSPEND_MODULES="brcm80211"
```

CTRL+X to exit and save

----------


## Axx83

I need feedback guys...

----------


## sigiczek

My system is Ubuntu 10.10, Wireless card is BRCM4313, hardware is HP Mini 5103

Just installed the driver according to your description and everything works just as described.

I'm so relieved the BRCM 4313 finally works up to expectations, It was pain to work with the proprietary driver.

You've really made my day. :Guitar:

----------


## sigiczek

Well after playing with it for a while, I've found a strange behavior. The speed of WiFi noticably drops, when the notebook goes on battery. 

It's a powersaving feature, that is quite annoying. The easy workaround is to set:



```
sudo iwconfig eth1 power off 
# presuming that eth1 is your wireless network device
```

which disables the power management feature of your card. Can be handy, when transfering larger files...

----------


## Axx83

I am pretty sure power management in this version of the driver is not working, card is always on full power and the sudden drops you register are actually bugs, in fact if I run iwconfig whwn on battery it says power management is off.

Can you check just running


```
sudo iwconfig
```

when on battery with no other tweaks and post the results?

----------


## someonestolemyname

I got it working, and it has some nice advantages. It's a good bit faster when it works, and treats the network a lot better.

However, it seems to stop working after a minute when I'm connected to an N network. On G it is stable (more or less), but on N I need to reconnect often.

No guarantees that it isn't the network, my school has a screwed up network, but it never seemed to have stability issues with the proprietary driver.

How can I update it to follow new progress? Is there any?

p.s. I have the BCM43224 chip.

----------


## sigiczek

> Can you check just running
> 
> 
> ```
> sudo iwconfig
> ```
> 
> when on battery with no other tweaks and post the results?


When on battery:


```
~$ sudo iwconfig

eth1      IEEE 802.11  ESSID:"7Patro.42"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:1X:CX:6X:1X:DX   
          Bit Rate=54 Mb/s   Tx-Power:24 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Managementmode:All packets received
          Link Quality=5/5  Signal level=-38 dBm  Noise level=-91 dBm
          Rx invalid nwid:0  Rx invalid csudo iwconfigrypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

~$ sudo iwconfig eth1 power off

~$ sudo iwconfig

eth1      IEEE 802.11  ESSID:"7Patro.42"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:1F:C6:62:1B:D7   
          Bit Rate=54 Mb/s   Tx-Power:24 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=5/5  Signal level=-38 dBm  Noise level=-83 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

On AC Power, the power management is always off.

I've observed problems with 802.11b - just mere ping took several seconds and the troughtput was tragic, but it can be the AP at where I've checked it. With power management off, the throughtput is great, when it's set to the "All packets received", the ping drops to 200..300ms from the usual 2..5 ms...

My card is BRCM4313, my machine is HP Mini 5103. I'm so annoyed by the instability, that i've already considered swapping the card for some other, but the card is of custom size  :Sad: .

----------


## Axx83

@someonestolemyname:
On my notebook the proprietary driver did not work AT ALL, connections were all dropped even before getting actually connected, with this driver not all is perfect but it's a development driver, still not stable so it's ok to have some issues. As far as updates go I don't know where to check...

@sigiczek:
Weird, on my computer if I run iwconfig and try to set power management it says it's not allowed...

----------


## ShouriChatterjee

I have the broadcom bcm4313 chipset.

I had problems with the proprietary wl driver. It would take a long time and not realize that the network it was trying to connect to does not exist etc.

brcm80211 compilation according to the instructions had glitches.
I had to do the following to "ccflags-y" in the Makefile:


```
ccflags-y :=                    \
    -DBCMDBG                \
    -DWLC_HIGH                \
    -DSTA                    \
    -DWME                    \
    -DWL11N                    \
    -DDBAND                    \
    -DBCMDMA32                \
    -DBCMNVRAMR                \
    -Idrivers/staging/brcm80211/sys        \
    -Idrivers/staging/brcm80211/phy        \
    -Idrivers/staging/brcm80211/util    \
    -Idrivers/staging/brcm80211/include    \
    -I/opt/kernel/linux-next/drivers/staging/brcm80211/include    \
    -I/opt/kernel/linux-next/drivers/staging/brcm80211/sys    \
    -I/opt/kernel/linux-next/drivers/staging/brcm80211/phy
```

Compilation worked after that.

I did not put in the module name in the /etc/modules file - it works fine.

On the System->Administration -> Additional Drivers tab, I uninstalled all other drivers. Surprisingly it recognises brcm80211!

Wireless network is very fast now.

----------


## Jehosephat Q. Turnipseed

Tried it - it worked much faster than the Broadcom STA wl driver, but it was pretty unstable - only worked for a few minutes at a time.  Going to try ndiswrapper for now.

By the way /usr/lib/pm-utils/defaults undid my edits by itself.

----------


## foxjazz

I had problems at:
cd ~/linux-next/drivers/staging/brcm80211

no such file or directory exists.

Yes, new to linux ubuntu.

can you write a script program that will do this update auto?

----------


## ubuntuforums

> I had problems at:
> cd ~/linux-next/drivers/staging/brcm80211
> 
> no such file or directory exists.
> 
> Yes, new to linux ubuntu.
> 
> can you write a script program that will do this update auto?


Make sure you're in your home folder when running "git clone git://...linux-next.git" and "git clone git://...linux-firmware.git". Otherwise /linux-next and /linux-fireware will not be created in your home directory where they're suppose to be. (in the terminal the ~ indicates your home directory)

Also did you read the note at the top of the guide, it may be useful: 


> At the moment the only commit version that compiles in 10.10 is this one:
> http://git.kernel.org/?p=linux/kerne...efe3b14;sf=tgz
> Download the .tar.gz file in your home directory and extract it.
> Now INSTEAD of "cd ~/linux-next/drivers/staging/brcm80211" you will do "cd ~/linux-next-a694cb1" and follow the rest of the guide strarting with "nano Makefile".

----------


## foxjazz

test -e include/generated/autoconf.h -a -e include/config/auto.conf || (		\
	echo;								\
	echo "  ERROR: Kernel configuration is invalid.";		\
	echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
	echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
	echo;								\
	/bin/false)
mkdir -p /home/foxjazz/linux-next/drivers/staging/brcm80211/.tmp_versions ; rm -f /home/foxjazz/linux-next/drivers/staging/brcm80211/.tmp_version

----------


## Axx83

> The driver now is divided in two, brcm full mac and brcm soft mac. The first one doesn't compile, but the second one does.
> 
> For compile you have to download the driver from this link:
> http://git.kernel.org/?p=linux/kerne...4d1e202;sf=tgz
> 
> You always can download the latest version browsing the git:
> http://git.kernel.org/?p=linux/kerne...bc0156;hb=HEAD
> 
> Uncompress the file and then go to this folder:
> ...


I tried your guide and this is so far the only driver, newer than the one still on my guide that compiles and install correctly.

Unfortunately as I can see neither the speed nor stability has gotten any better, I think there's no need to update the guide right now

----------


## ramakrishna.hcu.mtech

sir;

 Internet connection is not detecting in the ubuntu on dell inspiron laptop, but internet is perfectly coming in other os i.e . windows xp. till today also internet came in ubuntu but due to installation of some package alsa driver for sound one file is modified i guess. so can u please help me 

while installing i modified the resulted file

sudo nano /etc/modprobe.d/alsa-base.conf

options snd-hda-intel model=dell-m6 is added in the resulted file


and asked to save , i saved 

after rebooting the system. internet is not coming in ubuntu, fortunately sound through headphone problem is solved.

please help me as soon as possible

----------


## some-one

> I tried your guide and this is so far the only driver, newer than the one still on my guide that compiles and install correctly.
> 
> Unfortunately as I can see neither the speed nor stability has gotten any better, I think there's no need to update the guide right now


Yes, the latest commits are just code cleanup, there is nothing new.

----------


## febelus

hi all, i've installed it on my macbook air 11" with broadcom bcm43224. After installation my network manager recognize wifi card and scan for all ap on the zone, but when i try to connect to my ap (wpa password) doesn't connect and request me the password.

----------


## bradmurmz

> hi all, i've installed it on my macbook air 11" with broadcom bcm43224. After installation my network manager recognize wifi card and scan for all ap on the zone, but when i try to connect to my ap (wpa password) doesn't connect and request me the password.



The driver seems to be working great on my macbook air 11"

Actually seems to be more stable and faster than the proprietary wl driver!

I actually updated my kernel to 2.6.37 if this helps at all?

----------


## bradmurmz

Found a much better solution to this!!

Just update your kernel to 2.6.37 like this ::
http://www.ramoonus.nl/2011/01/linux...-ubuntu-linux/ 


Then just install this nice firmware dpkg ::
http://packages.debian.org/unstable/...ware-brcm80211


UPDATE ::
Maybe its not as stable as I would have hoped.  :Sad:   Who do I got to donate to in order to get some movement on this driver? I really need it to be stable if I want to use linux on my macbook air primarily for work.

----------


## bradmurmz

According to this https://bugs.archlinux.org/task/22714

the bugs have been worked out in the new version of the driver inside 2.6.38-rc5+

I have to say that after the update to this kernel things are MUCH more stable however I was still able to reproduce the bug by threading a lot of http requests at once... 

If anyone trys this, please let me know how it worked for you and what firmware your using?

Thanks!

----------


## abettik

Hi guys,

thanks for this thread, hope it will help but yet, I'm still stuck to



```
sudo insmod /lib/modules/`uname -r`/brcm80211.ko
insmod: error inserting '/lib/modules/2.6.35-25-generic/brcm80211.ko': -1 Invalid parameters
```

any ideas ?
thanks

my config is the following



```
ubuntu 10.10

uname -r 
2.6.35-25-generic

 lspci -nn | grep -i net
02:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g LP-PHY [14e4:4727] (rev 01)
```

I followed the step in the first step, including the update of 07/01/01

make step is ok

modeprobe is almost ok



```
sudo modprobe mac80211
WARNING: All config files need .conf: /etc/modprobe.d/options, it will be ignored in a future release.
```

but insmod failed as said on the top

(sorry for the eventual wrong tag, I'm a newbie on forums)

----------


## Axx83

put here the list of the files you find in the brcm80211 directory AFTER you have completed make command

----------


## abettik

Here are the list of the main folder and subfolders

l

```
s -ltrh
total 1,6M
-rw-r--r-- 1 julie julie 1,6K 2011-02-28 20:33 TODO
-rw-r--r-- 1 julie julie 3,0K 2011-02-28 20:33 README
-rw-r--r-- 1 julie julie  996 2011-02-28 20:33 Kconfig
drwxr-xr-x 3 julie julie 4,0K 2011-02-28 20:33 include
drwxr-xr-x 2 julie julie 4,0K 2011-02-28 20:33 brcmfmac
-rw-r--r-- 1 julie julie 2,2K 2011-02-28 20:55 Makefile
drwxr-xr-x 2 julie julie 4,0K 2011-02-28 20:56 phy
drwxr-xr-x 2 julie julie 4,0K 2011-02-28 20:57 sys
drwxr-xr-x 3 julie julie 4,0K 2011-02-28 20:57 util
-rw-r--r-- 1 julie julie 768K 2011-02-28 20:57 brcm80211.o
-rw-r--r-- 1 julie julie   42 2011-02-28 20:57 modules.order
-rw-r--r-- 1 julie julie    0 2011-02-28 20:57 Module.symvers
-rw-r--r-- 1 julie julie 3,7K 2011-02-28 20:57 brcm80211.mod.c
-rw-r--r-- 1 julie julie 7,2K 2011-02-28 20:57 brcm80211.mod.o
-rw-r--r-- 1 julie julie 775K 2011-02-28 20:57 brcm80211.ko

ls -lhtr phy/
total 1,9M
-rw-r--r-- 1 julie julie 1,7K 2011-02-28 20:33 wlc_phytbl_n.h
-rw-r--r-- 1 julie julie 132K 2011-02-28 20:33 wlc_phytbl_n.c
-rw-r--r-- 1 julie julie 2,1K 2011-02-28 20:33 wlc_phytbl_lcn.h
-rw-r--r-- 1 julie julie  45K 2011-02-28 20:33 wlc_phytbl_lcn.c
-rw-r--r-- 1 julie julie 5,7K 2011-02-28 20:33 wlc_phyreg_n.h
-rw-r--r-- 1 julie julie  74K 2011-02-28 20:33 wlc_phy_radio.h
-rw-r--r-- 1 julie julie 929K 2011-02-28 20:33 wlc_phy_n.c
-rw-r--r-- 1 julie julie 3,2K 2011-02-28 20:33 wlc_phy_lcn.h
-rw-r--r-- 1 julie julie 131K 2011-02-28 20:33 wlc_phy_lcn.c
-rw-r--r-- 1 julie julie  33K 2011-02-28 20:33 wlc_phy_int.h
-rw-r--r-- 1 julie julie 8,5K 2011-02-28 20:33 wlc_phy_hal.h
-rw-r--r-- 1 julie julie  77K 2011-02-28 20:33 wlc_phy_cmn.c
-rw-r--r-- 1 julie julie 1,1K 2011-02-28 20:33 phy_version.h
-rw-r--r-- 1 julie julie  35K 2011-02-28 20:56 wlc_phy_cmn.o
-rw-r--r-- 1 julie julie  53K 2011-02-28 20:56 wlc_phy_lcn.o
-rw-r--r-- 1 julie julie 300K 2011-02-28 20:56 wlc_phy_n.o
-rw-r--r-- 1 julie julie  14K 2011-02-28 20:56 wlc_phytbl_lcn.o
-rw-r--r-- 1 julie julie  41K 2011-02-28 20:56 wlc_phytbl_n.o


julie@julie-1215N:~/brcm80211$ ls -lhtr sys/
total 992K
-rw-r--r-- 1 julie julie 3,2K 2011-02-28 20:33 wl_ucode_loader.c
-rw-r--r-- 1 julie julie 1,8K 2011-02-28 20:33 wl_ucode.h
-rw-r--r-- 1 julie julie 3,8K 2011-02-28 20:33 wl_mac80211.h
-rw-r--r-- 1 julie julie  45K 2011-02-28 20:33 wl_mac80211.c
-rw-r--r-- 1 julie julie 2,7K 2011-02-28 20:33 wl_export.h
-rw-r--r-- 1 julie julie 3,4K 2011-02-28 20:33 wl_dbg.h
-rw-r--r-- 1 julie julie 1,1K 2011-02-28 20:33 wlc_types.h
-rw-r--r-- 1 julie julie 2,0K 2011-02-28 20:33 wlc_stf.h
-rw-r--r-- 1 julie julie  18K 2011-02-28 20:33 wlc_stf.c
-rw-r--r-- 1 julie julie 3,4K 2011-02-28 20:33 wlc_scb.h
-rw-r--r-- 1 julie julie 8,2K 2011-02-28 20:33 wlc_rate.h
-rw-r--r-- 1 julie julie  17K 2011-02-28 20:33 wlc_rate.c
-rw-r--r-- 1 julie julie  25K 2011-02-28 20:33 wlc_pub.h
-rw-r--r-- 1 julie julie 5,1K 2011-02-28 20:33 wlc_phy_shim.h
-rw-r--r-- 1 julie julie 6,2K 2011-02-28 20:33 wlc_phy_shim.c
-rw-r--r-- 1 julie julie  40K 2011-02-28 20:33 wlc_mac80211.h
-rw-r--r-- 1 julie julie 221K 2011-02-28 20:33 wlc_mac80211.c
-rw-r--r-- 1 julie julie 5,5K 2011-02-28 20:33 wlc_key.h
-rw-r--r-- 1 julie julie 2,2K 2011-02-28 20:33 wlc_event.h
-rw-r--r-- 1 julie julie 4,6K 2011-02-28 20:33 wlc_event.c
-rw-r--r-- 1 julie julie 6,3K 2011-02-28 20:33 wlc_channel.h
-rw-r--r-- 1 julie julie  46K 2011-02-28 20:33 wlc_channel.c
-rw-r--r-- 1 julie julie 9,8K 2011-02-28 20:33 wlc_cfg.h
-rw-r--r-- 1 julie julie 5,9K 2011-02-28 20:33 wlc_bsscfg.h
-rw-r--r-- 1 julie julie  11K 2011-02-28 20:33 wlc_bmac.h
-rw-r--r-- 1 julie julie 113K 2011-02-28 20:33 wlc_bmac.c
-rw-r--r-- 1 julie julie 1,4K 2011-02-28 20:33 wlc_antsel.h
-rw-r--r-- 1 julie julie  10K 2011-02-28 20:33 wlc_antsel.c
-rw-r--r-- 1 julie julie 1,7K 2011-02-28 20:33 wlc_ampdu.h
-rw-r--r-- 1 julie julie  39K 2011-02-28 20:33 wlc_ampdu.c
-rw-r--r-- 1 julie julie 1,2K 2011-02-28 20:33 wlc_alloc.h
-rw-r--r-- 1 julie julie 8,2K 2011-02-28 20:33 wlc_alloc.c
-rw-r--r-- 1 julie julie 1,2K 2011-02-28 20:33 d11ucode_ext.h
-rw-r--r-- 1 julie julie 3,6K 2011-02-28 20:56 wlc_alloc.o
-rw-r--r-- 1 julie julie 3,7K 2011-02-28 20:56 wlc_antsel.o
-rw-r--r-- 1 julie julie  14K 2011-02-28 20:56 wlc_channel.o
-rw-r--r-- 1 julie julie 4,1K 2011-02-28 20:56 wlc_event.o
-rw-r--r-- 1 julie julie  93K 2011-02-28 20:56 wlc_mac80211.o
-rw-r--r-- 1 julie julie 5,3K 2011-02-28 20:56 wlc_rate.o
-rw-r--r-- 1 julie julie 7,4K 2011-02-28 20:56 wlc_stf.o
-rw-r--r-- 1 julie julie  25K 2011-02-28 20:56 wl_mac80211.o
-rw-r--r-- 1 julie julie  16K 2011-02-28 20:56 wlc_ampdu.o
-rw-r--r-- 1 julie julie  48K 2011-02-28 20:57 wlc_bmac.o
-rw-r--r-- 1 julie julie 5,4K 2011-02-28 20:57 wlc_phy_shim.o
-rw-r--r-- 1 julie julie 2,5K 2011-02-28 20:57 wl_ucode_loader.o


julie@julie-1215N:~/brcm80211$ ls -lhtr util/
total 576K
-rw-r--r-- 1 julie julie 1,4K 2011-02-28 20:33 siutils_priv.h
-rw-r--r-- 1 julie julie  48K 2011-02-28 20:33 siutils.c
-rw-r--r-- 1 julie julie  15K 2011-02-28 20:33 sbutils.c
-rw-r--r-- 1 julie julie  19K 2011-02-28 20:33 qmath.c
-rw-r--r-- 1 julie julie  22K 2011-02-28 20:33 nicpci.c
-rw-r--r-- 1 julie julie 5,2K 2011-02-28 20:33 linux_osl.c
-rw-r--r-- 1 julie julie  75K 2011-02-28 20:33 hndpmu.c
-rw-r--r-- 1 julie julie  71K 2011-02-28 20:33 hnddma.c
-rw-r--r-- 1 julie julie 6,1K 2011-02-28 20:33 bcmwifi.c
-rw-r--r-- 1 julie julie  27K 2011-02-28 20:33 bcmutils.c
-rw-r--r-- 1 julie julie  51K 2011-02-28 20:33 bcmsrom.c
-rw-r--r-- 1 julie julie  22K 2011-02-28 20:33 bcmotp.c
-rw-r--r-- 1 julie julie  17K 2011-02-28 20:33 aiutils.c
-rw-r--r-- 1 julie julie  19K 2011-02-28 20:56 siutils.o
-rw-r--r-- 1 julie julie 6,9K 2011-02-28 20:56 aiutils.o
-rw-r--r-- 1 julie julie 8,1K 2011-02-28 20:56 bcmotp.o
-rw-r--r-- 1 julie julie  35K 2011-02-28 20:56 bcmsrom.o
-rw-r--r-- 1 julie julie  12K 2011-02-28 20:56 bcmutils.o
-rw-r--r-- 1 julie julie 1,7K 2011-02-28 20:56 bcmwifi.o
-rw-r--r-- 1 julie julie  25K 2011-02-28 20:56 hndpmu.o
-rw-r--r-- 1 julie julie 4,8K 2011-02-28 20:56 linux_osl.o
-rw-r--r-- 1 julie julie  26K 2011-02-28 20:57 hnddma.o
-rw-r--r-- 1 julie julie 7,8K 2011-02-28 20:57 nicpci.o
drwxr-xr-x 2 julie julie 4,0K 2011-02-28 20:57 nvram
-rw-r--r-- 1 julie julie 5,3K 2011-02-28 20:57 qmath.o
```

----------


## börly molitor

Hi,

i hope anyone could help me.
I Add this code at the end of the makefile:

KDIR := /lib/modules/$(shell uname -r)/build
ccflags-y += -I$(SUBDIRS)/include -I$(SUBDIRS)/sys -I$(SUBDIRS)/phy

default:
echo $(PWD)
$(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) CONFIG_BRCM80211_PCI=y V=1 modu



If i compile the driver (make) i get a message see below, but the 'brcm80211.ko' file is missing???.

oot@bt:~/linux-next-2d57aa7/linux-next-2d57aa7/drivers/staging/brcm80211# make
echo /root/linux-next-2d57aa7/linux-next-2d57aa7/drivers/staging/brcm80211
/root/linux-next-2d57aa7/linux-next-2d57aa7/drivers/staging/brcm80211
make -C /lib/modules/2.6.35.8/build SUBDIRS=/root/linux-next-2d57aa7/linux-next-
2d57aa7/drivers/staging/brcm80211 CONFIG_BRCM80211_PCI=y V=1 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.35.8'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
mkdir -p /root/linux-next-2d57aa7/linux-next-2d57aa7/drivers/staging/brcm80211/. tmp_versions ; rm -f /root/linux-next-2d57aa7/linux-next-2d57aa7/drivers/staging /brcm80211/.tmp_versions/*

WARNING: Symbol version dump /usr/src/linux-source-2.6.35.8/Module.symvers
is missing; modules will have no dependencies and modversions.

make -f scripts/Makefile.build obj=/root/linux-next-2d57aa7/linux-next-2d57aa7/d rivers/staging/brcm80211
(cat /dev/null; ) > /root/linux-next-2d57aa7/linux-next-2d57aa7/drivers/staging/ brcm80211/modules.order
make -f /usr/src/linux-source-2.6.35.8/scripts/Makefile.modpost
scripts/mod/modpost -i /usr/src/linux-source-2.6.35.8/Module.symvers -I /roo t/linux-next-2d57aa7/linux-next-2d57aa7/drivers/staging/brcm80211/Module.symvers -o /root/linux-next-2d57aa7/linux-next-2d57aa7/drivers/staging/brcm80211/Modul e.symvers -S -w -s
make[1]: Leaving directory `/usr/src/linux-source-2.6.35.8'


root@bt:~/linux-next-2d57aa7/linux-next-2d57aa7/drivers/staging/brcm80211# ls -l
total 44
drwxrwxr-x 2 root root 4096 2011-02-23 22:08 brcmfmac
drwxrwxr-x 3 root root 4096 2011-02-23 22:08 brcmsmac
drwxrwxr-x 3 root root 4096 2011-02-23 22:08 include
-rw-rw-r-- 1 root root 1005 2011-02-23 22:08 Kconfig
-rw-rw-r-- 1 root root 1233 2011-02-26 22:39 Makefile
-rw-rw-r-- 1 root root 1252 2011-02-26 22:29 Makefile~
-rw-r--r-- 1 root root 810 2011-02-26 22:15 Makefile.patch
-rw-r--r-- 1 root root 0 2011-02-26 22:42 modules.order
-rw-r--r-- 1 root root 0 2011-02-26 22:00 Module.symvers
-rw-rw-r-- 1 root root 3008 2011-02-23 22:08 README
-rw-rw-r-- 1 root root 1629 2011-02-23 22:08 TODO
drwxrwxr-x 3 root root 4096 2011-02-23 22:08 util
root@bt:~/linux-next-2d57aa7/linux-next-2d57aa7/drivers/staging/brcm80211#


thanks
boerly

----------


## Joker5bb

the latest staging driver does not build brcm80211.ko

BCM43224 chipset needs the brcmsmac driver 



```
joker@joker-M15x:~$ modinfo brcmsmac
filename:       /lib/modules/2.6.35-27-generic/updates/drivers/staging/brcm80211/brcmsmac/brcmsmac.ko
license:        Dual BSD/GPL
description:    Broadcom 802.11n wireless LAN driver.
author:         Broadcom Corporation
srcversion:     5D850F4300261D9555349E4
alias:          pci:v000014E4d00004727sv*sd*bc*sc*i*
alias:          pci:v000014E4d00004353sv*sd*bc*sc*i*
alias:          pci:v000014E4d00004357sv*sd*bc*sc*i*
depends:        mac80211,cfg80211
vermagic:       2.6.35-27-generic SMP mod_unload modversions
```



```
joker@joker-M15x:~$ iw list
Wiphy phy0
	Band 1:
		Capabilities: 0x4070
			HT20
			Static SM Power Save
			RX Greenfield
			RX HT20 SGI
			RX HT40 SGI
			No RX STBC
			Max AMSDU length: 3839 bytes
			No DSSS/CCK HT40
			40 MHz Intolerant
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: 8 usec (0x06)
		HT TX/RX MCS rate indexes supported: 0-15
		Frequencies:
			* 2412 MHz [1] (19.0 dBm)
			* 2417 MHz [2] (19.0 dBm)
			* 2422 MHz [3] (19.0 dBm)
			* 2427 MHz [4] (19.0 dBm)
			* 2432 MHz [5] (19.0 dBm)
			* 2437 MHz [6] (19.0 dBm)
			* 2442 MHz [7] (19.0 dBm)
			* 2447 MHz [8] (19.0 dBm)
			* 2452 MHz [9] (19.0 dBm)
			* 2457 MHz [10] (19.0 dBm)
			* 2462 MHz [11] (19.0 dBm)
			* 2467 MHz [12] (disabled)
			* 2472 MHz [13] (disabled)
			* 2484 MHz [14] (disabled)
		Bitrates (non-HT):
			* 1.0 Mbps
			* 2.0 Mbps (short preamble supported)
			* 5.5 Mbps (short preamble supported)
			* 11.0 Mbps (short preamble supported)
			* 6.0 Mbps
			* 9.0 Mbps
			* 12.0 Mbps
			* 18.0 Mbps
			* 24.0 Mbps
			* 36.0 Mbps
			* 48.0 Mbps
			* 54.0 Mbps
	Band 2:
		Capabilities: 0x4070
			HT20
			Static SM Power Save
			RX Greenfield
			RX HT20 SGI
			RX HT40 SGI
			No RX STBC
			Max AMSDU length: 3839 bytes
			No DSSS/CCK HT40
			40 MHz Intolerant
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: 8 usec (0x06)
		HT TX/RX MCS rate indexes supported: 0-15
		Frequencies:
			* 5180 MHz [36] (17.0 dBm)
			* 5200 MHz [40] (17.0 dBm)
			* 5220 MHz [44] (17.0 dBm)
			* 5240 MHz [48] (17.0 dBm)
			* 5260 MHz [52] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5280 MHz [56] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5300 MHz [60] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5320 MHz [64] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5500 MHz [100] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5520 MHz [104] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5540 MHz [108] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5560 MHz [112] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5580 MHz [116] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5600 MHz [120] (disabled)
			* 5620 MHz [124] (disabled)
			* 5640 MHz [128] (disabled)
			* 5660 MHz [132] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5680 MHz [136] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5700 MHz [140] (20.0 dBm) (passive scanning, no IBSS, radar detection)
			* 5745 MHz [149] (21.0 dBm)
			* 5765 MHz [153] (21.0 dBm)
			* 5785 MHz [157] (21.0 dBm)
			* 5805 MHz [161] (21.0 dBm)
			* 5825 MHz [165] (21.0 dBm)
		Bitrates (non-HT):
			* 6.0 Mbps
			* 9.0 Mbps
			* 12.0 Mbps
			* 18.0 Mbps
			* 24.0 Mbps
			* 36.0 Mbps
			* 48.0 Mbps
			* 54.0 Mbps
	max # scan SSIDs: 4
	max scan IEs length: 2257 bytes
	Coverage class: 0 (up to 0m)
	Available Antennas: TX 0 RX 0
	Supported interface modes:
		 * managed
		 * monitor
	Supported commands:
		 * new_interface
		 * set_interface
		 * new_key
		 * new_beacon
		 * new_station
		 * new_mpath
		 * set_mesh_params
		 * set_bss
		 * authenticate
		 * associate
		 * deauthenticate
		 * disassociate
		 * join_ibss
		 * join_mesh
		 * remain_on_channel
		 * set_tx_bitrate_mask
		 * action
		 * frame_wait_cancel
		 * set_wiphy_netns
		 * set_channel
		 * set_wds_peer
		 * connect
		 * disconnect
	Supported TX frame types:
		 * IBSS: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * managed: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * AP: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * AP/VLAN: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * mesh point: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * P2P-client: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * P2P-GO: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
	Supported RX frame types:
		 * IBSS: 0x00d0
		 * managed: 0x0040 0x00d0
		 * AP: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
		 * AP/VLAN: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
		 * mesh point: 0x00d0
		 * P2P-client: 0x0040 0x00d0
		 * P2P-GO: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
```

----------


## alan-souza

This driver does not support ad-hoc mode? For when taking place in this way get an error saying it is not supported!

----------


## shiman6

it seems the standard wl driver supports ad-hoc networks. And it seems to be doing fine on my system. no bad network connections, no slow network connections. Sadly my wifi card was shipped without a bluetooth chip. (BCM4313)

Edit to add: i found sometimes the wifi chip doesnt work after waking up from sleep mode, (windows and ubuntu) but when you restart the driver, it works again. Either disable then re-enable for windows users, or sudo rmmod wl then sudo modprobe wl, or whatever driver you use, for ubuntu.

----------


## alan-souza

The connection speed of this driver is exceeding the owner! The problem is that he is not supporting ad-hoc mode!

----------


## Robby123

Hello Guys,

i have a problem with this guide and i hope someone can help me.

everytime when i run the insmod command my screen become completly black or white and the system dont react any more....

my system is ubuntu 10.10

you need more information about my system?

----------


## RocaHe

Driver BUG?!

My netbook is ASUS EeePC 1015PW with BCM4313 wireless card.
the OS  is Ubuntu10.10.

Brcm80211 Driver is working all right.

When running Aircrack-ng(1.1),Monitor mode can be activated an Injection is Working.

BUT,the netcard can only recognise the packets(or DATA) send or received by itself.
While other PCs are working via my wireless router,the netcard does find the router's ESSID and can receive the bacons,but data is always stay at 0.Also,the aircrack cannot find other wifi clients except itself.


SO,I just wordering whether it is a driver bug?

----------


## mohegan

How can I do with Natty ?  Any idea ?
The brcm80211 module is include in linux 2.6.38 but I want test the last version.

----------


## pikamoku

I've just installed latest Natty Beta and cant make work neither *brcm80211* nor official *sta* driver (on Lenovo b560, BCM4313 )

but doing:



```
sudo apt-get install b43-fwcutter
```

made my day  :Very Happy:  

infrastucture works fine but ad-hoc mode doesnt work at least on the only one network I've tested. At least I can now connect to internet.


I'll wait untill official Natty release to test again brcm80211.
any idea would be wellcome. thanks

----------


## ephk

It seems there's a lot of people who can receive beacons but are unable to get any data packets. I did some research but i cant find anything. Im completely clueless, i dont know whether it's caused by the driver itself or some other configuration, or even the airodump application.

Im using a bcm4313, and i've followed this guide and then downloaded, patched and installed the compat-wireless.

Does anyone have more information regarding this problem?

----------


## meesha

Under Natty 11.04 :

                 1.Install the Non-free Broadcom STA Driver via 'Additional Software'

2.To check if my suggested solution will work for you, try to run the following command in terminal


```
sudo modprobe -r acer-wmi
```

after that you should be able to connect to wireless lan (should work  for acer travelmate & lenovo ideapad with broadcom wireless adapters  )

3.If that worked out for you, the following procedure will resolve  the issue permanently with not working wireless/wlan broadcom adapters:


```
sudo gedit /etc/modprobe.d/blacklist.conf
```

 in the blacklist.conf file add at the end this:
 blacklist acer-wmi

4.Reboot to check and you're done.


see also https://bugs.launchpad.net/ubuntu/na...ux/+bug/730972

----------


## t0nj0uR5

Updated firmware for BCM4313, BCM43224, and BCM43225 chips. Stability fix for packet injection. Give your feedback if it fully works. Thank you.

http://git.kernel.org/?p=linux/kerne...74b29d2051dd09

----------


## t0nj0uR5

Updated firmware for BCM4313, BCM43224, and BCM43225 chips. Stability fix for packet injection. Give your feedback if it fully works. Thank you.

http://git.kernel.org/?p=linux/kerne...74b29d2051dd09

----------


## divyanshu308

tried first but then it stuck so i force quitted it.
then tried again didnt work.
now it worked but then stopped in between and gave an error.


divyanshu@Inspiron-N5010:~$ sudo apt-get install build-essential git-core
[sudo] password for divyanshu: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  dpkg-dev git libalgorithm-diff-perl libalgorithm-merge-perl liberror-perl
Suggested packages:
  debian-keyring git-doc git-arch git-cvs git-svn git-email git-daemon-run
  git-gui gitk gitweb
The following NEW packages will be installed:
  build-essential dpkg-dev git git-core libalgorithm-diff-perl
  libalgorithm-merge-perl liberror-perl
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0B/7,193kB of archives.
After this operation, 14.9MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously deselected package dpkg-dev.
(Reading database ... 162594 files and directories currently installed.)
Unpacking dpkg-dev (from .../dpkg-dev_1.15.8.4ubuntu3.1_all.deb) ...
Selecting previously deselected package build-essential.
Unpacking build-essential (from .../build-essential_11.5_amd64.deb) ...
Selecting previously deselected package liberror-perl.
Unpacking liberror-perl (from .../liberror-perl_0.17-1_all.deb) ...
Selecting previously deselected package git.
Unpacking git (from .../git_1%3a1.7.1-1.1ubuntu0.1_amd64.deb) ...
Selecting previously deselected package git-core.
Unpacking git-core (from .../git-core_1%3a1.7.1-1.1ubuntu0.1_all.deb) ...
Selecting previously deselected package libalgorithm-diff-perl.
Unpacking libalgorithm-diff-perl (from .../libalgorithm-diff-perl_1.19.02-1_all.deb) ...
Selecting previously deselected package libalgorithm-merge-perl.
Unpacking libalgorithm-merge-perl (from .../libalgorithm-merge-perl_0.08-1_all.deb) ...
Processing triggers for man-db ...
Setting up firmware-b43-lpphy-installer (4.174.64.19-4) ...
Not supported card here (PCI id 14e4:4727)!
Use proper b43 or b43legacy firmware.
Aborting.
dpkg: error processing firmware-b43-lpphy-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libdpkg-perl (1.15.8.4ubuntu3.1) ...
Setting up dpkg-dev (1.15.8.4ubuntu3.1) ...
Setting up build-essential (11.5) ...
Setting up liberror-perl (0.17-1) ...
Setting up git (1:1.7.1-1.1ubuntu0.1) ...
Setting up git-core (1:1.7.1-1.1ubuntu0.1) ...
Setting up libalgorithm-diff-perl (1.19.02-1) ...
Setting up libalgorithm-merge-perl (0.08-1) ...
Errors were encountered while processing:
 firmware-b43-lpphy-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
divyanshu@Inspiron-N5010:~$ 
 :Confused:

----------


## Axx83

new update

----------


## exo6

When I got to the second line (cd ~/linux-firmware), it told me that no such file or directory exists .

sudo mkdir /lib/firmware/brcm
cd ~/linux-firmware
sudo cp brcm/bcm43xx* /lib/firmware/brcm
cd /lib/firmware/brcm
sudo ln -s bcm43xx-0-610-809-0.fw bcm43xx-0.fw
sudo ln -s bcm43xx_hdr-0-610-809-0.fw bcm43xx_hdr-0.fw

By the way, I was following the original post with the "step-by-step" instructions .

----------


## exzR

hi! i have ubuntu 10.04 lts and cant upgrade distro because i use backbox...i have followed the tutorial but when i try to load

insmod /lib/firmware/'uname -r'/brcm80211 it says 

insmod: error inserting /lib/firmware/'uname -r'/brcm80211.ko; -1 File exist

and iwconfig says

no wireless extensions....


ps: modprobe mac80211 and brcm80211 work with out errors..

pps: with wl driver works but i need a driver that works with aircrack..

----------


## Joker5bb

I am using the new firmware with 2.6.39 kernel and I get no data in monitor mode. 
On my ubuntu 11.04 machine it will show no APs if the device interface is down, also crashes when I bring up the interface up

----------


## thewump

I've been using this driver for about 6 weeks.  Initially I was getting total system freezes frequently, but with latest firmware this is down to about once / day.

Is there any logging I can set to help debug this and report it back?

Thanks

K

----------


## Bob.Sponge

> test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
>     echo;                                \
>     echo "  ERROR: Kernel configuration is invalid.";        \
>     echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
>     echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";    \
>     echo;                                \
>     /bin/false)
> mkdir -p /home/foxjazz/linux-next/drivers/staging/brcm80211/.tmp_versions ; rm -f /home/foxjazz/linux-next/drivers/staging/brcm80211/.tmp_version


To my understanding this is not an error.
This is the comparison phrase.
Ignore it as long as the .ko file is generated.

----------


## Bob.Sponge

> Driver BUG?!
> 
> My netbook is ASUS EeePC 1015PW with BCM4313 wireless card.
> the OS  is Ubuntu10.10.
> 
> Brcm80211 Driver is working all right.
> 
> When running Aircrack-ng(1.1),Monitor mode can be activated an Injection is Working.
> 
> ...


I think we have a similar issue:
My airodump-ng shows no networks at all.
If I create one using airbase-ng then it shows.

I have Broadcom BCM4313 [14e4:4727] (rev 01).

----------


## wyt168

> ```
> cd ~/linux-next/drivers/staging/brcm80211
> nano Makefile
> ```
> 
> Add this code at the end
> 
> 
> ```
> ...


I followed the instructions step by step, and modified the Makefile, as follows:


```
wyt168@ubuntu:~/linux-next/drivers/staging/brcm80211$ cat Makefile 
#
# Makefile fragment for Broadcom 802.11n Networking Device Driver
...
# common flags
subdir-ccflags-y                    := -DBCMDMA32
subdir-ccflags-$(CONFIG_BRCMDBG)    += -DBCMDBG -DBCMDBG_ASSERT

obj-$(CONFIG_BRCMUTIL)    += brcmutil/
obj-$(CONFIG_BRCMFMAC)    += brcmfmac/
obj-$(CONFIG_BRCMSMAC)    += brcmsmac/

# WYT110621:
# Added to build Broadcom wireless driver
KDIR    := /lib/modules/$(shell uname -r)/build
ccflags-y += -I$(SUBDIRS)/include -I$(SUBDIRS)/sys -I$(SUBDIRS)/phy

default:
    echo $(PWD)
    $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) CONFIG_BRCM80211_PCI=y V=1 modules
# WYT110621_END
```

However after running "make", nothing was built:


```
wyt168@ubuntu:~/linux-next/drivers/staging/brcm80211$ make
echo /home/wyt168/linux-next/drivers/staging/brcm80211
/home/wyt168/linux-next/drivers/staging/brcm80211
make -C /lib/modules/2.6.32-32-generic/build SUBDIRS=/home/wyt168/linux-next/drivers/staging/brcm80211 CONFIG_BRCM80211_PCI=y V=1 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-32-generic'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (        \
    echo;                                \
    echo "  ERROR: Kernel configuration is invalid.";        \
    echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";    \
    echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";    \
    echo;                                \
    /bin/false)
mkdir -p /home/wyt168/linux-next/drivers/staging/brcm80211/.tmp_versions ; rm -f /home/wyt168/linux-next/drivers/staging/brcm80211/.tmp_versions/*
make -f scripts/Makefile.build obj=/home/wyt168/linux-next/drivers/staging/brcm80211
(cat /dev/null; ) > /home/wyt168/linux-next/drivers/staging/brcm80211/modules.order
make -f /usr/src/linux-headers-2.6.32-32-generic/scripts/Makefile.modpost
  scripts/mod/modpost -m -a -i /usr/src/linux-headers-2.6.32-32-generic/Module.symvers -I /home/wyt168/linux-next/drivers/staging/brcm80211/Module.symvers  -o /home/wyt168/linux-next/drivers/staging/brcm80211/Module.symvers -S -w  -s
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-32-generic'

wyt168@ubuntu:~/linux-next/drivers/staging/brcm80211$ ls
brcmfmac  brcmutil  Kconfig   modules.order   README
brcmsmac  include   Makefile  Module.symvers  TODO
```

Anything I missed here?!

----------


## 0x00dec0de

It does not work, do not do so.

 Dear Sirs,
I met a problem when using a BCM4313.
And looking for a solution. I several times caught this thread.
But after several attempts to adjust the efficiency of office equipment, I came across a kernel panic.
And so a solution was found with the release of kernel 3.0.0
Further, as I did.

Systems:


```
root@undefined:~# lspci |grep Network
06:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)
root@undefined:~# uname -a
Linux undefined 2.6.32-5-amd64 #1 SMP Fri Jun 24 21:14:57 EEST 2011 x86_64 GNU/Linux
```

Action:


```
apt-get install -y dpkg-dev devscripts build-essential git fakeroot kernel-package linux-headers-$(uname -r) 
cd /usr/src/
# But you can see that I did not use the kernel which appeared.
# But you can not take a git repository.
 git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
ln -s linux-next linux
cd linux
cat /boot/config-$(uname -r) > .config
make oldconfig
make-kpkg --append-to-version "-tux" --revision "3.0.0" --us --uc --initrd kernel_image
dpkg -i ../linux-image-3.0.0-rc4-tux-next-20110624_3.0.0_amd64.deb
reboot
```

Result:


```
root@undefined:~# lsmod  | grep brcm
brcmsmac              506199  0 
mac80211              172840  1 brcmsmac
brcmutil                5488  1 brcmsmac
cfg80211              124398  2 brcmsmac,mac80211

root@undefined:~# iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=19 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
```

Good luck.

----------


## docblue

> It does not work, do not do so.
> 
>  Dear Sirs,
> I met a problem when using a BCM4313.
> And looking for a solution. I several times caught this thread.
> But after several attempts to adjust the efficiency of office equipment, I came across a kernel panic.
> And so a solution was found with the release of kernel 3.0.0
> Further, as I did.
> 
> ...


THANK YOU!  :Smile:  Works for me.
My laptop is an Dell Inspiron n4030 with BCM 4313.
=)

----------


## MisterOink

Hi all, I just got a new acer netbook today and was trying to figure out how to get the my bcm 4313 card to work better. I read the whole thread, and still haven't been able to find out how to add the kernel version into the makefile.

I typed uname and found my linux kernel is 2.6.35.8

What do I do from here? This is a whole new language for me?

----------


## x0x0x0h

> It seems there's a lot of people who can receive beacons but are unable to get any data packets.


 Im using a bcm43225 on backtrack 5, and i have the same problem

----------


## File_

Same problem here.
I can put my bcm4313 in monitor mode on Natty but I'm also getting no data.
Has anyone found a solution?

----------


## geekuillaume

Hi everyone !
I use BRCM80211 with Backtrack 5 and, like the others said, no data received...  :Sad: 
I know it's not a priority for devs but it really be cool to add this function to the next release.
Thanks !

----------


## Mcjohnnson

I blacklisted it in favour of STA-driver. Couldn't get my WLAN work properly. I am waiting for UBuntu 11.10 and Kernel 3.0.

Everything is fine. But is was real hard to find a sollution. Wrote a howto.
Acer_wmi was giving me trouble, too.

----------


## marcio_mi

do you know if these drivers (both the free and proprietory one) support power management? 

this is my iwconfig output



```
wlan0     IEEE 802.11bgn  ESSID:"FASTWEB-1-55ls2qcCoLIk"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: 64:87:D7:B9:98:38   
          Bit Rate=54 Mb/s   Tx-Power=19 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-37 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:1  Invalid misc:100   Missed beacon:0
```

but if I try to set the power management on, it doesn't allow me



```
miccoli@netbook-N230:~$ iwconfig wlan0 power on
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.
miccoli@netbook-N230:~$ sudo iwconfig wlan0 power on
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not supported.
```

this happens both with the propriatory and free driver. Any idea?

----------


## .:astroboy:.

so we still don't have any solution on how to use bcm4313 chip set for cracking......

----------


## shiman6

> so we still don't have any solution on how to use bcm4313 chip set for cracking......


funny thing, i have that same chipset on my laptop and the brcm80211 module worked out of the box. it works with aircrack-ng perfectly. It works better than the wl module most of the time in performance and response time.

----------


## geekuillaume

> funny thing, i have that same chipset on my laptop and the brcm80211 module worked out of the box. it works with aircrack-ng perfectly. It works better than the wl module most of the time in performance and response time.


Which linux distro do you use ???

----------


## dbdexter

Hello everybody.
I have a eeepc 1215n with a bcm4313 card. I found a script that automatically patches the brcmsmac driver, and on ubuntu 11.04 works fine (no more -1 fixed channel, injection test passed), BUT when I try to inject, it just sends packets, and lost packets goes up until injection stops. Here's the script:

wget http://wireless.kernel.org/download/...-08-27.tar.bz2
tar -jxf compat-wireless-2011-08-27.tar.bz2
cd compat-wireless-2011-08-27
wget http://patches.aircrack-ng.org/mac80...g+ack_v1.patch
patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch
wget http://patches.aircrack-ng.org/chann...ne-maxim.patch
patch ./net/wireless/chan.c channel-negative-one-maxim.patch
gedit scripts/update-initramfs
#*** FIND LINE 13: KLIB=/lib/modules/2.6.31-wl/build
#*** REPLACE WITH: KLIB=/lib/modules/$(uname -r)/build
make
sudo make install
sudo make unload
#Uncomment the line below to automatically reboot after the script ran.
#sudo reboot

let me know if works
 :Wave: 
P.S. it's a bit slow when updating grub, just wait.

----------


## shadowlyx

Hi all,

Let me start by saying that the solution below applies to Lenovo laptops  that have hw switch with dual function - enable WLAN & BT. Please  also make sure you follow all the required steps in order to have the  proper wlan card driver installed.

I had the same wireless problem with bcm4313 and I spent days trying to fix it with no luck. Until last night.
This fix is for Lenovo laptops that have the hardware switch with dual function - enable/disable both wireless and bluetooth.

Before trying to make the linux driver work, you need turn the switch on  and the you MUST boot into windows (I know how it sound but it's not a  joke and I'm not advertising for the MS guys) and use the FN + F5  combination to open the software control and make sure that BOTH  wireless and bluetooth are "On". If at least one of them is OFF, the it  will never work in linux. The downside is for those that cannot  dual-boot because they only use Linux and don't have a Win OS installed.

You can easily check that in the linux terminal using "rfkill list all".  If the ideapad hw-swith is in the list and hard block is on then you  have the problem I mentioned above. It will not matter if you have the  correct driver installed or not. Just using "rfkill unblock all" will  unblock only the soft block, not the hard version.

For me it was a nightmare until I discovered this setting.
Long story short:
- make sure the hw switch is on
- boot into windows and use FN + F5 to enable WLAN & BT
- boot your linux OS, install the driver (if it's not already there) and  use "rfkill list all"; if your driver is correctly installed everything  should be OK
- make sure you defined a wireless connection in Network Manager
Now it should work.

I hope this will also help others like me that spent hours and days  trying to understand why to correct driver is working but wireless  network cannot be enabled.

Have a nice day.                &nbsp :Wink:  :Capital Razz:

----------


## Dr.Aequitas

guys, i've read all the pages, all the instructions..
i have a very simple and important problem here..
none of the given kernel.org links are working.. so i am not able to download or clone -whatever you name it- anything to start with..
i did download kernel 3.1rc4, extract it on my desktop, browsed into linuxbla-bla/drivers/staging/brcm80211/
i made the change in the Makefile, run the make command, but all i got is this..


```
xxx@xxx-1015PEM:/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211$ make
echo /usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211
/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211
make -C /lib/modules/3.0.4-030004-generic/build SUBDIRS=/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211 CONFIG_BRCM80211_PCI=y V=1 modules
make[1]:`/usr/src/linux-headers-3.0.4-030004-generic' dizinine giriliyor
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (	\
	echo;								\
	echo "  ERROR: Kernel configuration is invalid.";		\
	echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
	echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
	echo;								\
	/bin/false)
mkdir -p /usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/.tmp_versions ; rm -f /usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/.tmp_versions/*
make -f scripts/Makefile.build obj=/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211
make -f scripts/Makefile.build obj=/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/brcmfmac
make[3]: *** Hedef `/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.o' i derlemek için  hiçbir kural yok, `/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/brcmfmac/brcmfmac.o' tarafından gereksinim duyuluyor. Durdu.
make[2]: *** [/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/brcmfmac] Hata 2
make[1]: *** [_module_/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211] Hata 2
make[1]: `/usr/src/linux-headers-3.0.4-030004-generic' dizininden çıkılıyor
make: *** [default] Hata 2
xxx@xxx-1015PEM:/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211$
```

so i need some help over here..
if anyone using eeepc 1015PEM/PED/PE.. can share the brcm80211.ko file with me, it would be appreciated so much..
if noone using eeepc then anyone with a BCM4313 can share it too..
i'm stuck, and can not do anything..

----------


## Axx83

The latest linux kernel ALREADY contains the brcm80211 driver and it works well. If you are running Ubuntu 11.04 then it's already functioning, if you are running previous version you could try updating the kernel with the kernel ppa, try googleing it

----------


## Dr.Aequitas

guys, i've read all the pages, all the instructions..
i have a very simple and important problem here..
none of the given kernel.org links are working.. so i am not able to download or clone -whatever you name it- anything to start with..
i did download kernel 3.1rc4, extract it on my desktop, browsed into linuxbla-bla/drivers/staging/brcm80211/
i made the change in the Makefile, run the make command, but all i got is this..


```
xxx@xxx-1015PEM:/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211$ make
echo /usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211
/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211
make -C /lib/modules/3.0.4-030004-generic/build SUBDIRS=/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211 CONFIG_BRCM80211_PCI=y V=1 modules
make[1]:`/usr/src/linux-headers-3.0.4-030004-generic' dizinine giriliyor
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (	\
	echo;								\
	echo "  ERROR: Kernel configuration is invalid.";		\
	echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
	echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
	echo;								\
	/bin/false)
mkdir -p /usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/.tmp_versions ; rm -f /usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/.tmp_versions/*
make -f scripts/Makefile.build obj=/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211
make -f scripts/Makefile.build obj=/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/brcmfmac
make[3]: *** Hedef `/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.o' i derlemek için  hiçbir kural yok, `/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/brcmfmac/brcmfmac.o' tarafından gereksinim duyuluyor. Durdu.
make[2]: *** [/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211/brcmfmac] Hata 2
make[1]: *** [_module_/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211] Hata 2
make[1]: `/usr/src/linux-headers-3.0.4-030004-generic' dizininden çıkılıyor
make: *** [default] Hata 2
xxx@xxx-1015PEM:/usr/src/linux-headers-3.0.4-030004/drivers/staging/brcm80211$
```

so i need some help over here..
if anyone using eeepc 1015PEM/PED/PE.. can share the brcm80211.ko file with me, it would be appreciated so much..
if noone using eeepc then anyone with a BCM4313 can share it too..
i'm stuck, and can not do anything..

----------


## Dr.Aequitas

> Hello everybody.
> I have a eeepc 1215n with a bcm4313 card. I found a script that automatically patches the brcmsmac driver, and on ubuntu 11.04 works fine (no more -1 fixed channel, injection test passed), BUT when I try to inject, it just sends packets, and lost packets goes up until injection stops. Here's the script:
> 
> wget http://wireless.kernel.org/download/...-08-27.tar.bz2
> tar -jxf compat-wireless-2011-08-27.tar.bz2
> cd compat-wireless-2011-08-27
> wget http://patches.aircrack-ng.org/mac80...g+ack_v1.patch
> patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch
> wget http://patches.aircrack-ng.org/chann...ne-maxim.patch
> ...


i did all the steps without any problem..
but i can not insert brcm80211 module.. it says:


```
xxx@xxx-1015PEM:~$ sudo modprobe brcm80211 
[sudo] password for xxx: 
FATAL: Could not read '/lib/modules/2.6.35-30-generic/brcm80211.ko': No such file or directory
xxx@xxx-1015PEM:~$
```

some info:


```
jockey-text -l
kmod:wl - Broadcom STA wireless driver (Sahipli, Etkisizleştirildi, Kullanımda değil) [auto-install]
kmod:bcma - Broadcom's specific AMBA driver (Özgür, Etkinleştirildi, Kullanımda)
kmod:brcmsmac - Broadcom 802.11n wireless LAN driver. (Özgür, Etkinleştirildi, Kullanımda)
```



```
iwconfig 
lo        no wireless extensions.

eth0      no wireless extensions.

bnep0     no wireless extensions.
```

there's no eth1 which is the wireless interface..

----------


## File_

> The latest linux kernel ALREADY contains the brcm80211 driver and it works well. If you are running Ubuntu 11.04 then it's already functioning, if you are running previous version you could try updating the kernel with the kernel ppa, try googleing it


It is true that cards using brcm80211 drivers work properly with Ubuntu 11.04 but when you put card in monitor mode you don't recieve data. Or is it just me?

----------


## www.rzr.online.fr

what about support in oneric ?
-- 
http://rzr.online.fr/q/lenovo

----------


## Lupius

> It is true that cards using brcm80211 drivers work properly with Ubuntu 11.04 but when you put card in monitor mode you don't recieve data. Or is it just me?


The driver developers plan to start working on monitor mode support after the driver is in main line - which happened two days ago. I've been waiting for almost a year now. Few more months to go!

----------


## chaemil

will this work in oneiric?

----------


## san2244

My laptop is Lenovo Ideapad Z570. I have newly installed Ubuntu 10.04 and the current kernel i have updated to 2.6.38. this is the first time i am using Linux. i am a beginner.The problem i face is that it does not show the wireless device at all in the network option. So from Broadcomm i downloaded the driver and installed it by following commands

# mkdir hybrid_wl
# cd hybrid_wl
# tar xzf <path>/hybrid-portsrc.tar or <path>/hybrid-portsrc-x86_64.tar.gz
#make
#modprobe lib80211
#insmod wl.ko

Then  the wireless was showing and it worked.But when i restart then it doesn't show again. and if i do the following commands it comes but only until next reboot.
#modprobe lib80211
#insmod wl.ko

Is there a way to solve my problem ???

----------


## beatmag

> It is true that cards using brcm80211 drivers work properly with Ubuntu 11.04 but when you put card in monitor mode you don't recieve data. Or is it just me?


I've been trying the latest compat_wireless drivers , the bleeding does compile on 2.6 or 3.0 kernels (but complains of missing BCMA symbols or something, on loading). however the stable 3.2 and stable 2.6 compat_wireless does compile and work.

Even monitor mode works. However just the same as you.
When I monitor. Beacons come up, but Data never comes up for the Access Points.

I remember seeing clients being monitored and packets being monitored from clients, however still no Data comes up from Access Points.

Any fix for this yet?

I have also tried the latest Broadcoms STA drivers which has monitor mode, but it was very very unstable and flaky. I couldnt lock on a channel for monitoring and it kept crashing the whole system. But I was able to capture Data from Access Points!!!!!!!!!!!!!!

I've read some people who managed to capture Data in monitor mode........ how did you guys do it??????

----------


## ts3

> My laptop is Lenovo Ideapad Z570. I have newly installed Ubuntu 10.04 and the current kernel i have updated to 2.6.38. this is the first time i am using Linux. i am a beginner.The problem i face is that it does not show the wireless device at all in the network option. So from Broadcomm i downloaded the driver and installed it by following commands
> 
> # mkdir hybrid_wl
> # cd hybrid_wl
> # tar xzf <path>/hybrid-portsrc.tar or <path>/hybrid-portsrc-x86_64.tar.gz
> #make
> #modprobe lib80211
> #insmod wl.ko
> 
> ...


The instructions on the Broadcom website explain how to load permanently (pasted below):

3: Setup to always load at boot time.

The procedure to make a module load at boot time varies from distro to
distro.  Consult the docs for your specific distro to see how.  The 
following seems to work for my setup on Fedora and Ubuntu.  Check your 
docs to see the procedure for your distro.

Follow these steps to have the driver load as part of the boot process:

# load driver as described above
# cp wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless 
# depmod -a

The complete set of instructions are in the readme.txt file here: http://www.broadcom.com/support/802.11/linux_sta.php

'uname -r' stands for your particular kernel version:
Use uname -r to get the kernel version, note down carefully then use it in the above 'copy' (cp) command.  You'll need to use sudo for copy and depmod.

Cheers  :Smile:

----------


## abhijeet.1308

i try to follow your instruction but i stuck in MakeFile

i get following error:http://pastebin.com/WdxBwhrD

if possible please help? 

i try to install this driver from 1 month please help
 i using kernel version 2.6.39.4 with kde 4

----------


## vishal1121

heyy bro..
i've same BCM4313 card.. and i did it as u told..it's all hw nd soft ok but i dont know how to install the drivers for it..i m windows user and turned into ubuntu now..so m fresher in this os..can u tell me how to install its drivers nd yehhh dude u spend hours nd i spend 15-17 days nd finally found ur post nd it's very usefull for me..but plz help me to download the drivers..

----------


## Back Tracker

Sir,

i am totally New to Ubuntu OS... i followed each steps in post i really cant compile the driver.... Plz Plz help me with this and tell me a solution for this....

Millions Thanxs in advance...

----------


## pikamoku

what card do you have mate?

4313 work fine (on my lenovo b560) with wl driver from *software center* (official repositories). I didnt manually "compile" it

----------

