# wlan0 / bcm4311 issues

## Xamien

I'm using an Inspiron 1501 with amd64 arch.  After working on it for a long time, I finally have just about everything working, even the ATI card (what a doozy that was), with the exception of my BCM4311 card.  The kernel drivers are compiled in (not as modules), the firmware was put in with no problems, and wlan0 posts up.  I can even post 

```
iwconfig wlan0
```

 with the access point mac address and security key (128bit wep) and it comes up with an ip address, but only if I do 

```
dhcpcd wlan0
```

.  I get an ip address at that point and can even ping the router.  I check the router's log and connected devices and it's right there.

However, I go to disconnect the eth0 cable and ping, say, google.com and it just doesn't make it out the net.  Ideas?  What info you need?

----------

## d2_racing

Hi, can you post this :

```

# ifconfig -a

# iwconfig

# iwlist scan

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

# lsmod

# cd /etc/init.d/ && ls -la

```

----------

## Xamien

ifconfig -a 

```
eth0      Link encap:Ethernet  HWaddr 00:1d:09:b2:8d:41  

          inet addr:192.168.0.133  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::21d:9ff:feb2:8d41/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:2723743875 (2.5 GiB)  TX bytes:893995630 (852.5 MiB)

          Interrupt:21 

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:3000 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0 

          RX bytes:179048 (174.8 KiB)  TX bytes:179048 (174.8 KiB)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  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:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:1e:8c:01:53:5f  

          BROADCAST MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:454531 (443.8 KiB)  TX bytes:167021 (163.1 KiB)

wmaster0  Link encap:UNSPEC  HWaddr 00-1E-8C-01-53-5F-00-00-00-00-00-00-00-00-00

-00  

          BROADCAST 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 

```
wlan0     IEEE 802.11bg  ESSID:""  

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

          Tx-Power=-1 dBm   

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

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

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

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

iwlist scan: 

```
wlan0     Interface doesn't support scanning : Network is down
```

/etc/conf.d/net: 

```
essid_wlan0="NETGEARHOME"

mac_key_00146C158418="xxxxxxxxxxxxxxxxxxxxxx"

config_00146C158418=( "dhcp" )
```

I don't use wpa_supplicant.  no wpa keys in the house at the moment.

lsmod: 

```
Module                  Size  Used by

fglrx                2069832  23 
```

Kinda pointless on that one; like I said, I compiled it into the kernel, not as a module.  It does occur to me that compiling it as modules might provide more debugging info. True?

cd /etc/init.d/ && ls -la: 

```
drwxr-xr-x  2 root root  4096 Apr 21 07:56 .

drwxr-xr-x 56 root root  4096 Apr 24 14:57 ..

-rwxr-xr-x  1 root root  3661 Jun 16  2008 bootmisc

-rwxr-xr-x  1 root root  1188 Jun 16  2008 checkfs

-rwxr-xr-x  1 root root  3226 Jun 16  2008 checkroot

-rwxr-xr-x  1 root root  3054 Jun 16  2008 clock

-rwxr-xr-x  1 root root  1429 Jun 16  2008 consolefont

-rwxr-xr-x  1 root root   540 Apr 19 09:41 consolekit

-rwxr-xr-x  1 root root  1729 Apr 20 07:27 crypto-loop

-rwxr-xr-x  1 root root   277 Apr 19 10:16 cupsd

-rwxr-xr-x  1 root root  1152 Apr 19 09:16 dbus

lrwxrwxrwx  1 root root    21 Apr 18 20:59 depscan.sh -> ../../sbin/depscan.sh

lrwxrwxrwx  1 root root    23 Apr 18 20:59 functions.sh -> ../../sbin/functions.sh

-rwxr-xr-x  1 root root   951 Apr 20 07:43 gpm

-rwxr-xr-x  1 root root  5606 Jun 16  2008 halt.sh

-rwxr-xr-x  1 root root   433 Jun 16  2008 hostname

-rwxr-xr-x  1 root root   464 Apr 20 08:34 hsqldb

-rwxr-xr-x  1 root root  1874 Jun 16  2008 keymaps

-rwxr-xr-x  1 root root   620 Jun 16  2008 local

-rwxr-xr-x  1 root root  2088 Jun 16  2008 localmount

-rwxr-xr-x  1 root root  2947 Jun 16  2008 modules

lrwxrwxrwx  1 root root     6 Apr 18 20:59 net.eth0 -> net.lo

-rwxr-xr-x  1 root root 30696 Jun 16  2008 net.lo

lrwxrwxrwx  1 root root     6 Apr 19 12:53 net.wlan0 -> net.lo

-rwxr-xr-x  1 root root  3311 Jun 16  2008 netmount

-rwxr-xr-x  1 root root  1566 Apr 20 06:41 nscd

-rwxr-xr-x  1 root root   833 Apr 21 07:55 ntp-client

-rwxr-xr-x  1 root root   827 Apr 21 07:55 ntpd

-rwxr-xr-x  1 root root   670 Jun 16  2008 numlock

-rwxr-xr-x  1 root root  1871 Apr 19 19:00 pciparm

-rwxr-xr-x  1 root root   569 Jun 16  2008 pydoc-2.4

-rwxr-xr-x  1 root root   666 Apr 20 05:59 pydoc-2.5

-rwxr-xr-x  1 root root   304 Jun 16  2008 reboot.sh

-rwxr-xr-x  1 root root   276 Jun 16  2008 rmnologin

-rwxr-xr-x  1 root root   558 Apr 20 05:54 rsyncd

lrwxrwxrwx  1 root root    23 Apr 18 20:59 runscript.sh -> ../../sbin/runscript.sh

-rwxr-xr-x  1 root root  1133 Apr 20 08:00 samba

-rwxr-xr-x  1 root root   385 Jun 16  2008 shutdown.sh

-rwxr-xr-x  1 root root  2123 Apr 20 06:05 sshd

-rwxr-xr-x  1 root root  1894 Apr 19 13:02 syslog-ng

-rwxr-xr-x  1 root root   510 Apr 20 06:04 udev-postmount

-rwxr-xr-x  1 root root   942 Jun 16  2008 urandom

-rwxr-xr-x  1 root root   530 Apr 19 13:03 vixie-cron

-rwxr-xr-x  1 root root  5210 Apr 19 09:54 xdm

-rwxr-xr-x  1 root root   814 Apr 19 08:32 xinetd

```

----------

## Xamien

and here's what iwlist scan looks like when I do the manual iwconfig on wlan0:

```
wlan0     Scan completed :

          Cell 01 - Address: 00:14:6C:15:84:18

                    ESSID:"NETGEARHOME"

                    Mode:Master

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=85/100  Signal level:-49 dBm  Noise level=-70 dBm

                    Encryption key:on

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s; 9 Mb/s; 18 Mb/s

                              48 Mb/s; 54 Mb/s

                    Extra:tsf=0000000013097181

                    Extra: Last beacon: 188ms ago
```

----------

## d2_racing

Ok, can you try that :

```

# /etc/init.d/net.wlan0 start

```

And for the record, you should use wpa_supplicant.

----------

## Xamien

```
* Caching service dependencies ...                                             [ ok ]

 * Starting wlan0

 *   Loading networking modules for wlan0

 *     modules: apipa arping ccwgroup macchanger macnet rename iwconfig essidnet iptunnel ifconfig system dhcpcd ip6to4

 *       iwconfig provides wireless

 *       ifconfig provides interface

 *       dhcpcd provides dhcp

 *   Configuring wlan0 for MAC address 00:1E:8C:01:53:5F ...                    [ ok ]

 *   Configuring wireless network for wlan0

 *   Connecting to "NETGEARHOME" in managed mode (WEP Disabled) ...             [ !! ]

 *   Failed to configure wireless for wlan0                                     [ !! ]
```

Why wpa_supplicant if all we're using is WEP? Is having it or not having it going to affect someone's abiity to connect?Last edited by Xamien on Sat Apr 25, 2009 2:48 am; edited 1 time in total

----------

## Xamien

and before you ask, the contents of /var/log/messages:

```
Apr 24 21:44:14 Sue-Ellen [239904.951340] wlan0: authenticate with AP 00:14:6c:15:84:18

Apr 24 21:44:14 Sue-Ellen [239904.953052] wlan0: authenticated

Apr 24 21:44:14 Sue-Ellen [239904.953062] wlan0: associate with AP 00:14:6c:15:84:18

Apr 24 21:44:14 Sue-Ellen [239904.955539] wlan0: RX ReassocResp from 00:14:6c:15:84:18 (capab=0x431 status=0 aid=2)

Apr 24 21:44:14 Sue-Ellen [239904.955545] wlan0: associated

Apr 24 21:44:14 Sue-Ellen dhcpcd[4971]: wlan0: carrier lost

Apr 24 21:44:14 Sue-Ellen [239904.959493] wlan0: authenticate with AP 00:14:6c:15:84:18

Apr 24 21:44:14 Sue-Ellen dhcpcd[4971]: wlan0: carrier acquired

Apr 24 21:44:14 Sue-Ellen dhcpcd[4971]: wlan0: open_udp_socket: Cannot assign requested address

Apr 24 21:44:14 Sue-Ellen dhcpcd[4971]: wlan0: rebinding lease of 192.168.1.4

Apr 24 21:44:14 Sue-Ellen [239904.964697] wlan0: authenticated

Apr 24 21:44:14 Sue-Ellen [239904.964704] wlan0: associate with AP 00:14:6c:15:84:18

Apr 24 21:44:14 Sue-Ellen [239904.970378] wlan0: RX AssocResp from 00:14:6c:15:84:18 (capab=0x431 status=0 aid=2)

Apr 24 21:44:14 Sue-Ellen [239904.970384] wlan0: associated

Apr 24 21:44:14 Sue-Ellen [239904.972696] wlan0: deauthenticated

Apr 24 21:44:14 Sue-Ellen [239904.992509] b43-phy0 debug: Disabling hardware based encryption for keyidx: 0, mac: ff:ff:ff:ff:ff:ff

Apr 24 21:44:15 Sue-Ellen dhcpcd[4971]: wlan0: carrier lost

Apr 24 21:44:15 Sue-Ellen [239905.972043] wlan0: privacy configuration mismatch and mixed-cell disabled - disassociate

Apr 24 21:44:24 Sue-Ellen rc-scripts: Failed to configure wireless for wlan0

Apr 24 21:44:24 Sue-Ellen [239915.056088] b43-phy0: Radio turned off by software

Apr 24 21:44:24 Sue-Ellen [239915.072036] b43-phy0 debug: Removing Interface type 2

Apr 24 21:44:24 Sue-Ellen [239915.085190] b43-phy0 debug: Wireless interface stopped

Apr 24 21:44:24 Sue-Ellen [239915.085310] b43-phy0 debug: DMA-32 rx_ring: Used slots 4/64, Failed frames 0/0 = 0.0%, Average tries 0.00

Apr 24 21:44:24 Sue-Ellen [239915.085363] b43-phy0 debug: DMA-32 tx_ring_AC_BK: Used slots 0/128, Failed frames 0/0 = 0.0%, Average tries 0.00

Apr 24 21:44:24 Sue-Ellen [239915.088040] b43-phy0 debug: DMA-32 tx_ring_AC_BE: Used slots 20/128, Failed frames 0/469 = 0.0%, Average tries 1.06

Apr 24 21:44:24 Sue-Ellen [239915.090045] b43-phy0 debug: DMA-32 tx_ring_AC_VI: Used slots 0/128, Failed frames 0/0 = 0.0%, Average tries 0.00

Apr 24 21:44:24 Sue-Ellen [239915.092045] b43-phy0 debug: DMA-32 tx_ring_AC_VO: Used slots 2/128, Failed frames 0/262 = 0.0%, Average tries 1.03

Apr 24 21:44:24 Sue-Ellen [239915.094035] b43-phy0 debug: DMA-32 tx_ring_mcast: Used slots 0/128, Failed frames 0/0 = 0.0%, Average tries 0.00

Apr 24 21:46:38 Sue-Ellen ntpd[4283]: Deleting interface #9 wlan0, fe80::21e:8cff:fe01:535f#123, interface stats: received=0, sent=0, dropped=0, active_time=15000 secs

Apr 24 21:46:38 Sue-Ellen ntpd[4283]: Deleting interface #10 wlan0, 192.168.1.4#123, interface stats: received=0, sent=0, dropped=0, active_time=15000 secs
```

----------

## Xamien

bump

----------

## d2_racing

Ok, what encryption method do you use ?

----------

## Xamien

WEP

----------

## d2_racing

Hi, you should try with wpa_supplicant :

```

# emerge -av wpa_supplicant

```

```

# nano /etc/wpa_supplicant/wpa_supplicant.conf

```

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

network={

  ssid="NETGEARHOME"

  key_mgmt=NONE

  wep_key0=your_key_in_hexa

  wep_tx_keyidx=0

  priority=5

}

```

```

# nano /etc/conf.d/net

```

```

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" )

```

After that, you should reboot and post this :

```

# ifconfig -a

# iwconfig

# /etc/init.d/net.wlan0 start

# ifconfig -a

# iwconfig

# wpa_cli status

# dmesg | tail

```

----------

## Xamien

ifconfig -a: 

```
wlan0     Link encap:Ethernet  HWaddr 00:1e:8c:01:53:5f  

          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::21e:8cff:fe01:535f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:47626 (46.5 KiB)  TX bytes:27117 (26.4 KiB)

```

iwconfig: 

```
wlan0     IEEE 802.11bg  ESSID:"NETGEARHOME"  

          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:14:6C:15:84:18   

          Bit Rate=54 Mb/s   Tx-Power=27 dBm   

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

          Encryption key:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx   Security mode:open

          Power Management:off

          Link Quality=81/100  Signal level:-53 dBm  Noise level=-69 dBm

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

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

/etc/init.d/net.wlan0 start: 

```
* Starting wlan0

 *   Loading networking modules for wlan0

 *     modules: apipa arping ccwgroup macchanger macnet rename wpa_supplicant essidnet iptunnel ifconfig system dhcpcd ip6to4

 *       wpa_supplicant provides wireless

 *       ifconfig provides interface

 *       dhcpcd provides dhcp

 *   Configuring wlan0 for MAC address 00:1E:8C:01:53:5F ...                                                                                                                                                  [ ok ]

 *   Starting wpa_supplicant on wlan0 ...                                                                                                                                                                     [ ok ]

 *   Starting wpa_cli on wlan0 ...                                                                                                                                                                            [ ok ]

 *     Waiting for association                                                                                                                                                                                [ ok ]

 *     Backgrounding ...

```

ifconfig -a: 

```
wlan0     Link encap:Ethernet  HWaddr 00:1e:8c:01:53:5f  

          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::21e:8cff:fe01:535f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:51238 (50.0 KiB)  TX bytes:32297 (31.5 KiB)
```

iwconfig: 

```
wlan0     IEEE 802.11bg  ESSID:"NETGEARHOME"  

          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:14:6C:15:84:18   

          Bit Rate=9 Mb/s   Tx-Power=27 dBm   

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

          Encryption key:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx   Security mode:open

          Power Management:off

          Link Quality=96/100  Signal level:-38 dBm  Noise level=-68 dBm

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

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

wpa_cli status: 

```
Selected interface 'wlan0'

bssid=00:14:6c:15:84:18

ssid=NETGEARHOME

id=0

pairwise_cipher=WEP-104

group_cipher=WEP-104

key_mgmt=NONE

wpa_state=COMPLETED

ip_address=192.168.1.2
```

dmesg | tail : 

```
[  452.895051] ADDRCONF(NETDEV_UP): wlan0: link is not ready

[  452.979049] b43-phy0: Radio turned on by software

[  453.692202] b43-phy0 debug: Using hardware based encryption for keyidx: 0, mac: ff:ff:ff:ff:ff:ff

[  453.692435] wlan0: authenticate with AP 00:14:6c:15:84:18

[  453.694610] wlan0: authenticated

[  453.694614] wlan0: associate with AP 00:14:6c:15:84:18

[  453.697070] wlan0: RX AssocResp from 00:14:6c:15:84:18 (capab=0x431 status=0 aid=2)

[  453.697075] wlan0: associated

[  453.697540] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

[  464.286042] wlan0: no IPv6 routers present
```

I can ping the wireless router, but if I disconnect the ethernet cable, it still won't ping anything outside.

----------

## DaggyStyle

have you tried ndiswrapper?

which driver do you use? b43 or broadcom-sta?

----------

## Xamien

haven't tried ndiswrapper.  my experience with mixing windows in with anything more than a fake windows directory is that it causes nothing but problems for me.  Thus, I figure if I can stick with linux-only, it's worth some of the potential downsides.  I'll use it as a last resort, though.

Using the b43 compiled into the kernel, b43-fwcutter as well, of course.  I tried broadcom-sta but for some reason it didn't work.  It'd add the wl module in but the machine flatout doesn't see the card if that's all I use (which if I'm not mistaken is the point of the broadcom-sta; so you don't have to use anything else).  I could have been doing it wrong but I can't tell.  there's no explicit step-by-step howto for broadcom-sta and the nature of it seems to suggest that there shouldn't have to be.  Am I wrong and missing something?

----------

## DaggyStyle

well I guess you have the old broadcom chips, don't try the sta driver.

have to tried to change the encryption method to check how it is working?

----------

## d2_racing

Can you repost this :

```

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```

----------

## Xamien

cat /etc/conf.d/net: 

```
modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" )
```

cat /etc/wpa_supplicant/wpa_supplicant.conf: 

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

network={

  ssid="NETGEARHOME"

  key_mgmt=NONE

  wep_key0=CDC01853781B49CD1A99086B23

  wep_tx_keyidx=0

  priority=5

} 

```

----------

## d2_racing

Ok, can you try that :

```

# /etc/init.d/net.wlan0 start

# ping www.google.ca

```

Can you post this too :

```

# cat /etc/resolv.conf

```

----------

## Xamien

/etc/init.d/wlan start:

```
* Starting wlan0

 *   Loading networking modules for wlan0

 *     modules: apipa arping ccwgroup macchanger macnet rename wpa_supplicant essidnet iptunnel ifconfig system dhcpcd ip6to4

 *       wpa_supplicant provides wireless

 *       ifconfig provides interface

 *       dhcpcd provides dhcp

 *   Configuring wlan0 for MAC address 00:1E:8C:01:53:5F ...                                                                                                                                                  [ ok ]

 *   Starting wpa_supplicant on wlan0 ...                                                                                                                                                                     [ ok ]

 *   Starting wpa_cli on wlan0 ...                                                                                                                                                                            [ ok ]

 *     Waiting for association                                                                                                                                                                                [ ok ]

 *     Backgrounding ...

```

ping -c 3 google.com

```
ping: unknown host google.com

```

cat /etc/resolv.conf:

```

search ok.cox.net

nameserver 68.105.28.11

nameserver 68.105.29.11

nameserver 68.12.16.25

nameserver 68.12.16.30

```

[/code]

----------

## DaggyStyle

I have a setup for a wep based wireless, it is the same like yours and it works, try ndiswrapper just to see if you have wireless connection

----------

