# Broadcom4315 with broadcom-sta [SOLVED]

## 3igHankCh0w

I have just come into possession of a Dell M1730 with Dell(Broadcom 4315) wireless at first I tried b43-fwcutter because of the info

I was reading from lspci and also other info during a fresh install of gentoo (laptop previously had you know what on it M$) I then found the

information on broadcom-sta and emerged it. I now have working wireless but cannot connect with my wireless DSL access point the wireless adaptor can spot the network SSID but does not seem to pass the psk. I am using wpa_supplicant with WPA level security

it works on my other 2 laptops an HP with a broadcom 4311 using b43-fwcutter and an old compaq armada E500 with with an AirLink 101

usb wireless dongle using ndsiwrapper both use wpa_supplicant and wireless is working fine any help would be appreciated thanks to all

who look and I hope you all have a good day.

----------

## d2_racing

Hi, can you post this :

```

# lspci -n

# ifconfig -a

# iwconfig

```

----------

## pappy_mcfae

If you want to use broadcom-sta, you have to not set up the b43 module, or the ssb module. Depending on the kernel version broadcom-sta works, or doesn't. If you are using kernel version >=.29, broadcom-sta will be buggy. 

Your best bet is to set up the b43 module and be done with it.

Blessed be!

Pappy

----------

## 3igHankCh0w

I believe what you want from lspci -n is 0c:00.0 0280: 14e4:4315 (rev 01) I hope. The output of ifconfig does not show the wireless card though I can see the little blue light is on and the out put of iwconfig show this for the wireless

eth1     IEEE 802.11g ESSID:"" Nickname:""

            Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated

            Bit Rate:54 Mb/s  Tx-Power:32 dBm

            Retry min limit:7 RTS thr:off  Fragment thr:off

            Power Managementmode:All packets received

after I run wpa_supplicant -Dwext -ieth1-c /etc/wpa_supplicant/wpa_supplicant.conf I get this when I run iwconfig

eth1     IEEE 802.11g ESSID:"2WIRE437" Nickname:""

            Mode:Managed Frequency:2.412 GHz Access Point:  00:18:3F:64:1B:31

            Bit Rate:54 Mb/s  Tx-Power:32 dBm

            Retry min limit:7 RTS thr:off  Fragment thr:off

            Power Managementmode:All packets received

and my wireless appears when I run ifconfig -a 

I appologize for not supplying more information but I still do not know how to output the command line data to a file ( I know I'm a GUI cripple )

if you could help with the bash command I will get you more detailed info 

Also my wpa_supplicant.conf file

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

#ap_scan=0

ap_scan=1

#ap_scan=2

fast_reauth=1

network={

       ssid="2WIRE437"

       proto=WPA

       key_mgmt=WPA-PSK

       pairwise=CCMP TKIP

       #group=TKIP

       psk="SecretPassCodeTenDigits"

       this may be where I made my big mistake I ran wpa passphrase and got this really big number

       #psk=d4d7baf7395b9b7ba23fba88e892fe49f12e47a764699cbbbcf809f22286aa47

       priority=2

}

#network={

#       key_mgmt=NONE

#       priority=-9999999999999

#}

# End of /etc/wpa_supplicant/wpa_supplicant.conf

And for pappy_mcfae I have wireless working on my HP laptop but the card on my Dell XPS is a 4315 which I was led to believe was not supported by b43 or ndsiwrapper if this is wrong let me know also I am useing kernel-2.6.30-gentoo-r4 I removed b43 from my kernel but I believe

I have ssb I will look and post later Thanks to both of you for your help it is appreciated.

----------

## d2_racing

Weird in fact, that's not wlan0.

Can you post this :

```

# cat /etc/udev/rules.d/70-persistent-net.rules

# cat /etc/conf.d/net

```

----------

## 3igHankCh0w

d2_racing here are the files you requested

# cat /etc/udev/rules.d/70-persistent-net.rules:

# This file was automatically generated by the /lib64/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single

# line, and change only the value of the NAME= key.

# PCI device 0x14e4:0x1672 (tg3)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:21:9b:dc:ab:5f", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x14e4:0x4315 (wl)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:23:4d:36:f5:2f", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# cat /etc/conf.d/net:

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

# For wpa_supplicant

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

dhcpcd_eth1="-t 10"

# End of /etc/conf.d/net

----------

## d2_racing

I tought that the new driver would still use the wlan0 and wmaster0 standard.

----------

## pappy_mcfae

Actually, let me rephrase that. I've been acid testing the broadcom-sta on this machine all day. It's running with a 2.6.30-zen4 kernel, and the only issue I had is I forgot to turn off the ssb module. Things still worked, but it was herky-jerky. NFS refused to start until I started Firefox.

That's all fixed now. I have it running just fine. Speed is good, and it hasn't tried to throw a kernel panic as of yet. That's really good because the last time I tried it, it would kernel panic if I scanned via wpa_supplicant's GUI. It is faster than the b43 driver as well.

Blessed be!

Pappy

----------

## vincent-

```
# lspci | grep Broadcom

02:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)

# uname -r

2.6.30-gentoo-r4
```

I'm using broadcom-sta without problems.

----------

## d2_racing

You should post the settings that you need to enable the driver just in case, someone wants to use this driver instead of the B43.

----------

## vincent-

Ok, I'll do it in few minutes. I use this driver in my laptop and now I'm in my house, sorry  :Razz: 

----------

## d2_racing

No problem  :Razz: 

----------

## 3igHankCh0w

I have just been successful in making my wireless connection I disabled ssb as pappy_mcfae suggested in his post and I now have a working wireless connection that I am useing to post this reply I would like to thank everyone for their help and I would like to add this is why I have stuck with gentoo

over the past few years because of the great community of users that are eager to help again I disabled the loading of the ssb module in my /etc/modules.autoload.d/kernel-2.6 file  rebooted disconnected my eth0 wired connection brought up my wireless connection with 

the command :  wpa_supplicant -b -c  /etc/wpa_supplicant/wpa_supplicant.conf -ieth1 -Dwext     

 Then the command : dhcpcd eth1 

and success a wireless connection now all that is left is to get it to start at boot but that is for later again thank you all

----------

## vincent-

```
[*] Networking support  --->

   [*] Wireless  --->

      -*-   Improved wireless configuration API

      [*]   Old wireless static regulatory definition

      -*-   Wireless extensions

      [*]       Wireless extensions sysfs files

      <*> Common routines for IEEE802.11 drivers

      [*]   lib80211 debuggingmessages

      <*> Generic IEEE 802.11 Networking Stack (mac80211)

      [*]       Enable LED triggers

      [*]       Select mac80211 debugging features  --->
```

----------

## d2_racing

And then you installed the net-wireless/broadcom-sta package.

----------

## pappy_mcfae

Yes, once you get the proper kernel settings, it's a simple emerge -av broadcom-sta. As long as you are running ~arch, or if you keyword unmask it, you should get the latest version, which has been working fairly well for it's second day under testing. 

However, you don't need to have the mac80211 option set on the kernel. Because of the nature of the broadcom-sta, all you need is the basic wireless settings (everything above the mac80211 option).

I believe that there are different kernel settings for older kernels. I haven't had a chance to test that theory yet. However, it is on my list of things to do for the day. I'll see what I can see, and report back here.

Blessed be!

Pappy

----------

## pappy_mcfae

Yes, I was right. There are two different needed settings, depending upon the kernel version against which you plan to compile broadcom-sta. If you are using a .28 kernel, or lower, you want to set the following in the kernel:

```
--- Wireless

<*>   Improved wireless configuration API

[*]     nl80211 new netlink interface support

[ ]   Old wireless static regulatory definitions

-*-   Wireless extensions 

[*]     Wireless extensions sysfs files 

< >   Generic IEEE 802.11 Networking Stack (mac80211)

<*>   Generic IEEE 802.11 Networking Stack (DEPRECATED)

[ ]     Enable full debugging output

<M>     IEEE 802.11 WEP encryption (802.1x)

<M>     IEEE 802.11i CCMP support

<M>     IEEE 802.11i TKIP encryption

```

If you're using a kernel greater than or equal to .29, you want to use the following kernel settings:

```
--- Wireless

<*>   Improved wireless configuration API

[ ]     cfg80211 regulatory debugging

[ ]   Old wireless static regulatory definitions

[*]   Wireless extensions

[*]     Wireless extensions sysfs files

<*>   Common routines for IEEE802.11 drivers

[ ]   lib80211 debugging messages

< >   Generic IEEE 802.11 Networking Stack (mac80211)
```

Blessed be!

Pappy

----------

## vincent-

Thank you, I will change it.

----------

## d2_racing

@Pappy, are you sure about that : <*>   Generic IEEE 802.11 Networking Stack (DEPRECATED) 

That driver use the old stack for IEEE 802.11, that's weird because I think that the last driver that used that option was ipw2200.

----------

## pappy_mcfae

Yes, I am sure. I set up the kernel incorrectly, and kept adding options until broadcom-sta compiled. The kernel settings I offered are the bare minimum. The bits I show are entirely correct. 

Never let it be said that Broadcom has been cooperative with or sensitive of the needs and whiles the Linux community. If they had, they would have known that those settings were destined to be deleted. That's why the broadcom-sta ebuild patches any kernel greater than or equal to 2.6.29; the kernel which did delete that stuff.

Blessed be!

Pappy

----------

## d2_racing

So if you use a kernel 2.6.30 or higher, then you need to use the b43 driver then.

----------

## pappy_mcfae

Not at all. I'm using 2.6.30-zen4 with broadcom-sta. They finally got the patch to work properly, so that is no longer an issue. The ebuild detects the kernel version and patches, if need be.

Blessed be!

Pappy

----------

## d2_racing

Nice  :Razz: 

----------

## pappy_mcfae

Yes, it is. I've changed to broadcom-sta because it's faster. Who'd have thunk it?

Blessed be!

Pappy

----------

## wormite

Interesting discussion, as of now, 2.6.31 has cut out the support of old net_device. The broadcom-sta kernel module around 5.10.XX won't be compiled anymore. 

It seems that the driver has serious problem with supporting the 802.11n card. Resulting in disconnection of the card from TKIP setup modules from time to time.

I looked into the kernel module source, compared the 5.10.xx with 5.60.xx, they changed several places regarding net_device and TKIP broadcasting, but not too much,

and obviously the new one does not work very well with the tkip in 802.11n card.

I'll test the wl.ko of my patched 5.10.xx and 5.60.xx on the kernel 2.6.31 and get back.

I don't know how the ubuntu people got around this, the 5.10.xx was able to be compiled on their distributed 2.6.31 kernel, it has been working for me. But once you use

the typical home wlan with TKIP encryption, it hangs every several minutes.

It's all about the linux driver support, funny news is, the iPad, iPod and Nexus are getting the same problems since they are using Broadcom4329. Haha.

Steve Jobs got someone to talk to now.

----------

## eniac

I'm also using the broadcom-sta driver.

And having some trouble setting up a connection.

I always get the CTRL-EVENT-DISCONNECTEd - Disconnect event - remove keys message in wpa_cli.

If I understood the latest post in this thread I should stop using TKIP and switch to something else ?

----------

## pappy_mcfae

You need not do such things. The broadcom-sta driver is not where TKIP comes into play. That is taken care of via wpa_supplicant. If you have the kernel set to where broadcom-sta will finish compilation, that is all you need. 

As to the question of dropping connections, that can happen with any driver. It is less likely to happen using ndiswrapper and tweaking the .conf file that sets the driver's default operating characteristics. But it still happens.

Just for grins, post your /etc/conf.d/net file.

Cheers,

Pappy

----------

## wormite

 *pappy_mcfae wrote:*   

> You need not do such things. The broadcom-sta driver is not where TKIP comes into play. That is taken care of via wpa_supplicant. If you have the kernel set to where broadcom-sta will finish compilation, that is all you need. 
> 
> As to the question of dropping connections, that can happen with any driver. It is less likely to happen using ndiswrapper and tweaking the .conf file that sets the driver's default operating characteristics. But it still happens.
> 
> Just for grins, post your /etc/conf.d/net file.
> ...

 

I do not know exactly how the TKIP functionality is divided between wpa_supplicant and the broadcom-sta driver, but to me it is obvious that broadcom-sta driver has a part that is dealing with tkip:

```
wl/sys/wl_linux.c:                                if (wl->tkip_bcast_data[key->id]) {

wl/sys/wl_linux.c:                                        wl->tkipmodops->deinit(wl->tkip_bcast_data[key->id]);

wl/sys/wl_linux.c:                                        wl->tkip_bcast_data[key->id] = NULL;

wl/sys/wl_linux.c:      //      if (!wl->tkip_bcast_data) {

wl/sys/wl_linux.c:      //         //wl->tkip_bcast_data = wl->tkipmodops->init(key->id);

wl/sys/wl_linux.c:                //                        wl->tkip_bcast_data[key->id] =

wl/sys/wl_linux.c:                //                                wl->tkipmodops->init(key->id);

wl/sys/wl_linux.c:      //      if (wl->tkip_bcast_data) {

wl/sys/wl_linux.c:      //         wl->tkipmodops->set_key(&key->data, key->len,

wl/sys/wl_linux.c:      //            (uint8 *)&key->rxiv, wl->tkip_bcast_data);

wl/sys/wl_linux.c:      //      if (wl->tkip_bcast_data) {

wl/sys/wl_linux.c:      //         wl->tkipmodops->deinit(wl->tkip_bcast_data);

wl/sys/wl_linux.c:      //         wl->tkip_bcast_data = NULL;

wl/sys/wl_linux.c:            if (!wl->tkip_ucast_data) {

wl/sys/wl_linux.c:               wl->tkip_ucast_data = wl->tkipmodops->init(key->id);

wl/sys/wl_linux.c:            if (wl->tkip_ucast_data) {

wl/sys/wl_linux.c:               wl->tkipmodops->set_key(&key->data, key->len,

wl/sys/wl_linux.c:                  (uint8 *)&key->rxiv, wl->tkip_ucast_data);

wl/sys/wl_linux.c:            if (wl->tkip_ucast_data) {

wl/sys/wl_linux.c:               wl->tkipmodops->deinit(wl->tkip_ucast_data);

wl/sys/wl_linux.c:               wl->tkip_ucast_data = NULL;

```

This part has undergone huge changes between 5.10.91 and 5.60.48.36. The last reported working version of driver for BCM4322 is 5.10.91.

http://en.gentoo-wiki.com/wiki/Dell_Latitude_E6x00#Broadcom

I tried to merge the two versions to find out what the problem is. I am just guessing that the tkip part can be an important factor since when I downgraded to 5.10.91 and switched to 

CCMP everything worked.

----------

## pappy_mcfae

Having worked with the broadcom-sta for some time, I've never seen this issue. Since I recently found out that ndiswrapper has been placed back among the functional, I stopped using braodcom-sta. I didn't do it because the broadcom-sta was problematic. I did it because ndiswrapper works so much better.

The kernel settings required to make ndiswrapper finish compilation are also the same as broadcom-sta, and kernel-based TKIP, etc. are not among those settings. Those things are best left to wpa_supplicant.

Cheers,

Pappy

----------

