# BroadCom 4318 PCMCIA problems

## rompenstein

Hey guys I'm having problems getting my wireless card working. As I said its a BroadCom 4318 PCMCIA card. I'm using the b43 kernel driver. The Module loads fine and ifconfig and iwconfig both list wlan0. The problem is I can't connect. My router is WEP so I've tried using both wireless tools and wpa supplicant, both in both cases "iwlist scan" finds nothing. No clue what the problem could be. I'll try to post conf.d/net tomorrow. Are there any other files that might be relevant?

----------

## d2_racing

Hi, can you post your lspci, and also what happen when you try to connect to your Routeur(AP).

Just send the last part of dmesg after you try to connect.

----------

## rompenstein

lspci

```
gentoo rompenstein # lspci

00:00.0 Host bridge: Intel Corporation 82845 845 (Brookdale) Chipset Host Bridge (rev 04)

00:01.0 PCI bridge: Intel Corporation 82845 845 (Brookdale) Chipset AGP Bridge (rev 04)

00:1d.0 USB Controller: Intel Corporation 82801CA/CAM USB Controller #1 (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 42)

00:1f.0 ISA bridge: Intel Corporation 82801CAM ISA Bridge (LPC) (rev 02)

00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 Controller (rev 02)

00:1f.5 Multimedia audio controller: Intel Corporation 82801CA/CAM AC'97 Audio Controller (rev 02)

00:1f.6 Modem: Intel Corporation 82801CA/CAM AC'97 Modem Controller (rev 02)

01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]

02:00.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78)

02:01.0 CardBus bridge: Texas Instruments PCI1420 PC card Cardbus Controller

02:01.1 CardBus bridge: Texas Instruments PCI1420 PC card Cardbus Controller

03:00.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)
```

/etc/conf.d/net

```
config_eth0=("dhcp")

config_wlan0=("dhcp")

modules=("wpa_supplicant")

wpa_supplicant_wlan0="-Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf"
```

/etc/wpa_supplicant/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ap_scan=1

network={

        ssid="mckinley"

        key_mgmt=NONE

        wep_key0="password"

        priority=2

        auth_alg=SHARED

}

network={

        key_mgmt=NONE

        priority=-9999999

}
```

dmesg

```
gentoo init.d # ./net.wlan0 restart

 * Stopping wlan0

 *   Bringing down wlan0

 *     Shutting down wlan0 ...                                                                                                                                  [ ok ]

 *     Stopping wpa_cli on wlan0 ...                                                                                                                            [ ok ]

 *     Stopping wpa_supplicant on wlan0 ...                                                                                                                     [ ok ]

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported                                                                                              [ ok ]th param 5 value 0x1 - 

 *   Starting wpa_cli on wlan0 ...                                                                                                                              [ ok ]

 *     Backgrounding ...

gentoo init.d # dmesg

ADDRCONF(NETDEV_UP): wlan0: link is not ready

b43-phy0: Radio turned off by software

wlan0: Initial auth_alg=0

wlan0: authenticate with AP 00:1c:df:4c:1c:56

wlan0: Initial auth_alg=0

wlan0: authenticate with AP 00:1c:df:4c:1c:56

wlan0: authenticate with AP 00:1c:df:4c:1c:56

wlan0: authenticate with AP 00:1c:df:4c:1c:56

wlan0: authentication with AP 00:1c:df:4c:1c:56 timed out
```

iwlist scan

```
gentoo init.d # iwlist scan

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

sit0      Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     No scan results
```

ifconfig

```
gentoo init.d # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:08:74:9D:5F:D9  

          inet addr:76.189.27.14  Bcast:255.255.255.255  Mask:255.255.192.0

          UP BROADCAST RUNNING MULTICAST  MTU:576  Metric:1

          RX packets:227075 errors:0 dropped:0 overruns:1 frame:0

          TX packets:16010 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:23315820 (22.2 Mb)  TX bytes:1449657 (1.3 Mb)

          Interrupt:11 Base address:0xec00 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:8 errors:0 dropped:0 overruns:0 frame:0

          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:831 (831.0 b)  TX bytes:831 (831.0 b)

wlan0     Link encap:Ethernet  HWaddr 00:1C:DF:4D:5C:AF  

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:129 errors:0 dropped:0 overruns:0 frame:0

          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:41063 (40.1 Kb)  TX bytes:3813 (3.7 Kb)

wmaster0  Link encap:UNSPEC  HWaddr 00-1C-DF-4D-5C-AF-2B-68-00-00-00-00-00-00-00-00  

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
```

iwconfig

```
gentoo init.d # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11g  ESSID:"Dynex"  

          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:1C:DF:4C:1C:56   

          Bit Rate=1 Mb/s   Tx-Power=off   

          Retry min limit:7   RTS thr:off   Fragment thr=2346 B   

          Encryption key:off

          Link Quality=40/100  Signal level=-75 dBm  Noise level=-72 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

----------

## rompenstein

Ok there's a new development. It seems to work at boot time as it will find a network but by the time gentoo finishes booting it doesn't work anymore. I can't get online and can no longer see any networks with a scan.

----------

## IvanMajhen

Your iwconfig says that that txpower is off...

Try iwconfig wlan0 txpower on.

----------

## rompenstein

Alright. The txpower thing is my fault, but it wasn't off when I tried it before. I tried switching to ndiswrapper with no improvement. At that point I upgraded my kernel from 2.6.24-r5 to 2.6.25-r4 and then it kind of worked but I got errors pertaining to WEP which I couldn't solve (tried every kernel option mentioned on this board). At that point I decided to try b43 in the new kernel and it will now recognize my router and associate with it but dhcp times out.

```
gentoo init.d # ./net.wlan0 restart

 * Stopping wlan0

 *   Bringing down wlan0

 *     Stopping dhcpcd on wlan0 ...                                       [ ok ]

 *     Shutting down wlan0 ...                                            [ ok ]

 * Starting wlan0

 *   Configuring wireless network for wlan0

 *     wlan0 connected to ESSID "mckinley" at 00:02:2D:2A:03:BE

 *     in managed mode on channel 9 (WEP enabled)

 *   Bringing up wlan0

 *     dhcp

 *       Running dhcpcd ...

err, wlan0: timed out

warn, wlan0: using IPV4LL address 169.254.179.150                         [ ok ]

 *       wlan0 received address 169.254.179.150/16

gentoo init.d # dmesg

b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)

b43-phy0: Radio turned off by software

wlan0: Initial auth_alg=0

wlan0: authenticate with AP 00:02:2d:2a:03:be

ADDRCONF(NETDEV_UP): wlan0: link is not ready

b43-phy0: Radio turned on by software

wlan0: Initial auth_alg=0

wlan0: authenticate with AP 00:02:2d:2a:03:be

wlan0: RX authentication from 00:02:2d:2a:03:be (alg=0 transaction=2 status=0)

wlan0: authenticated

wlan0: associate with AP 00:02:2d:2a:03:be

wlan0: Initial auth_alg=0

wlan0: authenticate with AP 00:02:2d:2a:03:be

wlan0: association frame received from 00:02:2d:2a:03:be, but not in associate s                                                                                      

tate - ignored

wlan0: RX authentication from 00:02:2d:2a:03:be (alg=0 transaction=2 status=0)

wlan0: authenticated

wlan0: associate with AP 00:02:2d:2a:03:be

wlan0: RX AssocResp from 00:02:2d:2a:03:be (capab=0x11 status=0 aid=1)

wlan0: associated

ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

wlan0: Initial auth_alg=0

wlan0: authenticate with AP 00:02:2d:2a:03:be

wlan0: RX authentication from 00:02:2d:2a:03:be (alg=0 transaction=2 status=0)

wlan0: authenticated

wlan0: associate with AP 00:02:2d:2a:03:be

wlan0: RX ReassocResp from 00:02:2d:2a:03:be (capab=0x11 status=0 aid=1)

wlan0: associated

wlan0: Initial auth_alg=0

wlan0: authenticate with AP 00:02:2d:2a:03:be

wlan0: RX authentication from 00:02:2d:2a:03:be (alg=0 transaction=2 status=0)

wlan0: authenticated

wlan0: associate with AP 00:02:2d:2a:03:be

wlan0: RX ReassocResp from 00:02:2d:2a:03:be (capab=0x11 status=0 aid=1)

wlan0: associated

wlan0: no IPv6 routers present

gentoo init.d # 
```

not really sure what the problem could be.

----------

## IvanMajhen

Try setting static IP. If this works, then maybe is something wrong with dhcpcd.

----------

## rompenstein

My router is incapable of static IP so that isn't an option. I know it's lame but I can't help it.

On another note I've gone back to trying ndiswrapper which kind of works. I can connect to the internet through unsecured networks but apparently I can't set a WEP key. when I try to do so with iwconfig i get:

```
gentoo rompenstein # iwconfig wlan0 key s:key

Error for wireless request "Set Encode" (8B2A) :

    SET failed on device wlan0 ; Invalid argument.

```

not sure what is up with that. Also it seems to work fine at first but then quits working soon and I am unable to disconnect and reconnect or connect to any other networks without rebooting.

Also I noticed that with b43 my LEDs never come on and according to iwpriv there are no private ioctls, although I am able to scan just fine.

Basically I'm looking for any solution that will work, which means either a way to set a key with ndiswrapper or a way to make dns work with b43. I really don't care which at this point.

Thanks again.

----------

## pappy_mcfae

If you decide to go with ndiswrapper, which is a wise choice with pretty much anything Broadcom, go with the .22 kernel family. I have a 4318 PCMCIA that works perfectly with ndiswrapper and the.22 kernels. It does not work with the .23 or .24 kernels, and just barely with the .25. I have gotten b43 to work, but it's still slow.

Blessed be!

Pappy

----------

## rompenstein

Alright thanks for the hint. I am getting closer to solving this. I'm currently using ndiswrapper with 2.6.22-r10 and it works reliably on unsecured networks (so far anyway). I am still unable to set a key though. Can't figure out why. I would be inclined to think the driver (I'm using bcmwl5) doesn't support it at all, but I've read about many instances of other people getting this to work. Any more ideas?

----------

## pappy_mcfae

Are you talking key as in encryption key? If so, then you also need wpa_supplicant. I know it works with WPA encryption, and it is said to work with WEP, but I have never tried the latter.

Blessed be!

Pappy

----------

## rompenstein

I am trying to use WEP encryption as it's the only encryption my router supports. I have tried both wpa_supplicant and wireless tools and neither one works.

----------

## IvanMajhen

Is your key in router entered as ascii or hex?

It looks like key error...

Try withou auth_alg=SHARED

----------

## pappy_mcfae

Shut off all encryption temporarily to make sure there are no other problems with the network. You need to get things working in the raw, so to speak, just to make sure things are ok. If that works, then someone who knows how to use wpa_supplicant with WEP will come along and share that secret.

Blessed be!

Pappy

----------

## d2_racing

 *pappy_mcfae wrote:*   

> If that works, then someone who knows how to use wpa_supplicant with WEP will come along and share that secret.

 

I can help you with that.

----------

## pappy_mcfae

See what I mean?!

Blessed be!

Pappy

----------

## rompenstein

 *Quote:*   

> Is your key in router entered as ascii or hex?
> 
> It looks like key error...
> 
> Try withou auth_alg=SHARED

 

It's in ascii. I'm using iwconfig right now and I did put the "s:" but also tried it without. Also I did try it without auth_alg=SHARED as well and it made no difference.

 *Quote:*   

> Shut off all encryption temporarily to make sure there are no other problems with the network. You need to get things working in the raw, so to speak, just to make sure things are ok. If that works, then someone who knows how to use wpa_supplicant with WEP will come along and share that secret. 

 

It has been working perfectly for several days now with no encryption using iwconfig. I can't even get it to work without encryption using wpa_supplicant so I gave that up.

Any other ideas?

----------

## dennisn

I also have your wireless card (4318), and your exact same problem with the kernel b43 driver. The problem still exists with linux 2.6.26.5--namely, there appears to be a bug in the way b43 does authentication. The log messages show that it does know about and does /try/ to authenticate with the AP, and that it even receives authentication frames back from the AP, but many times (usually after a cold boot, more usually after hours of being offline), it just can't connect the dots.

elbarto has also posted about this problem at https://forums.gentoo.org/viewtopic-t-699706.html

If a solution is ever found, let us know!

----------

## dennisn

Passing "-K" to dhcpcd seems to have fixed it!

In /etc/conf.d/net, 

```
dhcpcd_wlan0="-t 10 -K"
```

 *Quote:*   

> 
> 
> -K, --nolink
> 
>              Don't receive link messages for carrier status.  You should only
> ...

 

Confirmation?

----------

