2013-06-19 16:35:58

by Larry Finger

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

On 06/19/2013 11:09 AM, Chris Adams wrote:
> I have a MacBook Pro 8,2 with the BCM4331 wireless chip. I pulled the
> firmware (666.2, 2011-02-23 01:15:07) using b43-fwcutter, and am running
> Fedora 18 (tried up to kernel 3.9.6-200.fc18.x86_64 from updates/testing
> with the same results).
>
> My problem is that it deauthenticates from the AP every 5 minutes (it
> then immediately reconnects). From what I've read, it looks like this
> chip is a little "different"; any ideas/suggestions to help get this
> working better?
>
> Example dmesg chunk:
>
> [ 948.115374] wlan0: associated
> [ 1249.636655] wlan0: deauthenticated from 00:a0:c8:xx:xx:xx (Reason: 1)

My table shows that a "Reason 1" deauthentication is for "unspecified reasons".
Does anyone know why these might occur?

What type of encryption are you using? If it is a re-keying type such as TKIP,
what is the interval? You should find that on the setup page of the access point.

BTW, your mailer is set up strangely. I get your address when I do a plain
Reply, but a Reply All from Thunderbird only got the b43-dev mailing list. I had
to add your address manually.

I also added the linux-wireless ML to the reply as some of my questions are more
likely to be answered there.

Larry





2013-06-19 16:57:46

by Rafał Miłecki

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

2013/6/19 Chris Adams <[email protected]>:
> Once upon a time, Larry Finger <[email protected]> said:
>> What type of encryption are you using? If it is a re-keying type
>> such as TKIP, what is the interval? You should find that on the
>> setup page of the access point.
>
> I don't have access to the management of this particular AP (work
> environment), but "iw dev wlan0 scan dump" says CCMP.

I think some key interval applies not only to the TKIP, but also other
keys. For example GTK (which is part of WPA2 with it's 4-way
handshake). GTK is Group Temporal Key, and Broadcom's router have a
setting called "GTK rotation interval". I guess PMK/PTK also can have
some intervals.

I don't know how/if driver can be responsible for such reconnects.
Over all it just TX and RX packets, right? Loosing a signal is
something different, that can be related to the driver's bug. But as
this happens every 5 minutes... I don't know.

Did you try connecting to this AP with any other card and using
similar kernel? I wonder if this can be some supplicant / mac80211
stack issue...

--
Rafał

2013-06-19 20:58:51

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

On 06/19/2013 07:58 PM, Chris Adams wrote:
> Once upon a time, Rafał Miłecki <[email protected]> said:
>> I don't know how/if driver can be responsible for such reconnects.
>> Over all it just TX and RX packets, right? Loosing a signal is
>> something different, that can be related to the driver's bug. But as
>> this happens every 5 minutes... I don't know.
>>
>> Did you try connecting to this AP with any other card and using
>> similar kernel? I wonder if this can be some supplicant / mac80211
>> stack issue...
>
> I just fired up my Thinkpad T510 with an Intel "Centrino Ultimate-N
> 6300" using iwlwifi, and it stays connected (does not appear to drop any
> packets). This is also Fedora 18 x86_64 (slightly older kernel, but
> I've had the problem on the MacBook since I installed it). There are
> other people in the office with the same MacBook hardware (but running
> OS X) that don't appear to be having any trouble either.
>
> The AP appears to be an Adtran (don't know the model).
>

Can you make a capture using a wireless sniffer (using your thinkpad maybe)?

Gr. AvS


2013-06-19 19:30:34

by Rafał Miłecki

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

2013/6/19 Chris Adams <[email protected]>:
> Once upon a time, Rafał Miłecki <[email protected]> said:
>> I don't know how/if driver can be responsible for such reconnects.
>> Over all it just TX and RX packets, right? Loosing a signal is
>> something different, that can be related to the driver's bug. But as
>> this happens every 5 minutes... I don't know.
>>
>> Did you try connecting to this AP with any other card and using
>> similar kernel? I wonder if this can be some supplicant / mac80211
>> stack issue...
>
> I just fired up my Thinkpad T510 with an Intel "Centrino Ultimate-N
> 6300" using iwlwifi, and it stays connected (does not appear to drop any
> packets). This is also Fedora 18 x86_64 (slightly older kernel, but
> I've had the problem on the MacBook since I installed it). There are
> other people in the office with the same MacBook hardware (but running
> OS X) that don't appear to be having any trouble either.
>
> The AP appears to be an Adtran (don't know the model).

Thanks for info/testing. I still wonder how driver's code can cause
any disconnections happening exactly every 5 minutes... Any idea
anyone?

One bug that was recently discovered and that sits in b43's code is
passive scanning. For some reason it seems b43 doesn't do passive
scanning, I didn't have time to debug that yet. I wonder if this can
affect connection stability anyhow.

Perhaps you could try performing manual scanning every ~minute? It's
really just a crazy guess, I don't have any idea why it could help.
But it's so trivial you may want to give it a try.

--
Rafał

2013-06-19 18:16:10

by Chris Adams

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

Once upon a time, Rafał Miłecki <[email protected]> said:
> I don't know how/if driver can be responsible for such reconnects.
> Over all it just TX and RX packets, right? Loosing a signal is
> something different, that can be related to the driver's bug. But as
> this happens every 5 minutes... I don't know.
>
> Did you try connecting to this AP with any other card and using
> similar kernel? I wonder if this can be some supplicant / mac80211
> stack issue...

I just fired up my Thinkpad T510 with an Intel "Centrino Ultimate-N
6300" using iwlwifi, and it stays connected (does not appear to drop any
packets). This is also Fedora 18 x86_64 (slightly older kernel, but
I've had the problem on the MacBook since I installed it). There are
other people in the office with the same MacBook hardware (but running
OS X) that don't appear to be having any trouble either.

The AP appears to be an Adtran (don't know the model).

--
Chris Adams <[email protected]>

2013-06-19 21:16:37

by Chris Adams

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

Once upon a time, Arend van Spriel <[email protected]> said:
> Can you make a capture using a wireless sniffer (using your thinkpad maybe)?

How would I go about doing that? I've done lots of network debugging
with tcpdump and such, but not much wireless stuff.
--
Chris Adams <[email protected]>

2013-06-20 08:36:54

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

On 06/20/2013 10:33 AM, Arend van Spriel wrote:
> On 06/19/2013 11:11 PM, Chris Adams wrote:
>> Once upon a time, Arend van Spriel <[email protected]> said:
>>> Can you make a capture using a wireless sniffer (using your thinkpad
>>> maybe)?
>>
>> How would I go about doing that? I've done lots of network debugging
>> with tcpdump and such, but not much wireless stuff.
>>
>
> I use wireshark these days. If you install that you can use the steps
> below and select the wireless interface in wireshark to capture. I use
> wlan0 as interface name, but it may be different for you.
>
> 1. disable network-manager so it won't interfere.
> 2. bring the interface down
> $ sudo ifconfig wlan0 down
> 3. change interface type to monitor
> $ sudo iw dev wlan0 set type monitor
> 4. bring up the interface
> $ sudo ifconfig wlan0 up
> 5. start wireshark and select wlan0
> $ gksudo wireshark
>
> It will complain that running wireshark as root is not secure. If you
> care about that, you should read [1].

Forgot a step. You need to select a channel. You can do that before
starting a capture in wireshark: $ sudo iw dev wlan0 set channel 5

> Regards,
> Arend
>
> [1]
> http://wiki.wireshark.org/Security#Administrator.2Froot_account_not_required.21
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>



2013-06-20 00:34:04

by Chris Adams

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

Once upon a time, Chris Adams <[email protected]> said:
> The AP appears to be an Adtran (don't know the model).

The issue appears to be specific to the Adtran AP combined with the b43
device. I have a D-Link DIR-625 at home (running OpenWRT 12.09, using
ath9k wireless driver), and the MacBook seems to stay connected to it
okay.

--
Chris Adams <[email protected]>

2013-06-24 13:28:27

by Chris Adams

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

Once upon a time, Chris Adams <[email protected]> said:
> Once upon a time, Chris Adams <[email protected]> said:
> > The AP appears to be an Adtran (don't know the model).
>
> The issue appears to be specific to the Adtran AP combined with the b43
> device. I have a D-Link DIR-625 at home (running OpenWRT 12.09, using
> ath9k wireless driver), and the MacBook seems to stay connected to it
> okay.

I haven't had a chance to do more debugging, but I did find one more bit
of possibly-useful information: the "deauthenticating" bit only seems to
happen when there is no traffic. I used the wireless in a meeting for a
couple of hours, and it didn't deauthenticate once. I got back to my
desk, plugged into the wired network, and the wireless started
deauthenticating again every five minutes.

--
Chris Adams <[email protected]>

2013-06-20 08:33:38

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

On 06/19/2013 11:11 PM, Chris Adams wrote:
> Once upon a time, Arend van Spriel <[email protected]> said:
>> Can you make a capture using a wireless sniffer (using your thinkpad maybe)?
>
> How would I go about doing that? I've done lots of network debugging
> with tcpdump and such, but not much wireless stuff.
>

I use wireshark these days. If you install that you can use the steps
below and select the wireless interface in wireshark to capture. I use
wlan0 as interface name, but it may be different for you.

1. disable network-manager so it won't interfere.
2. bring the interface down
$ sudo ifconfig wlan0 down
3. change interface type to monitor
$ sudo iw dev wlan0 set type monitor
4. bring up the interface
$ sudo ifconfig wlan0 up
5. start wireshark and select wlan0
$ gksudo wireshark

It will complain that running wireshark as root is not secure. If you
care about that, you should read [1].

Regards,
Arend

[1]
http://wiki.wireshark.org/Security#Administrator.2Froot_account_not_required.21


2013-06-19 17:01:11

by Chris Adams

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

Once upon a time, Larry Finger <[email protected]> said:
> What type of encryption are you using? If it is a re-keying type
> such as TKIP, what is the interval? You should find that on the
> setup page of the access point.

I don't have access to the management of this particular AP (work
environment), but "iw dev wlan0 scan dump" says CCMP.

> BTW, your mailer is set up strangely. I get your address when I do a
> plain Reply, but a Reply All from Thunderbird only got the b43-dev
> mailing list. I had to add your address manually.

I'm using Mutt, which sets "Mail-Followup-To: <listaddr>" for configured
mailing lists. If you were just replying to the b43-dev list, a CC to
me isn't really needed (I subscribed before sending; didn't know if
non-subscribers were allowed to send messages).

--
Chris Adams <[email protected]>

2013-06-20 15:23:55

by Dan Williams

[permalink] [raw]
Subject: Re: BCM4331 deauthenticates every five minutes

On Thu, 2013-06-20 at 10:33 +0200, Arend van Spriel wrote:
> On 06/19/2013 11:11 PM, Chris Adams wrote:
> > Once upon a time, Arend van Spriel <[email protected]> said:
> >> Can you make a capture using a wireless sniffer (using your thinkpad maybe)?
> >
> > How would I go about doing that? I've done lots of network debugging
> > with tcpdump and such, but not much wireless stuff.
> >
>
> I use wireshark these days. If you install that you can use the steps
> below and select the wireless interface in wireshark to capture. I use
> wlan0 as interface name, but it may be different for you.
>
> 1. disable network-manager so it won't interfere.

It should be enough run "nmcli nm wifi off" and then un-rfkill the
interface, and NM will leave it alone until you turn wifi back on. It
will also remove the interface from wpa_supplicant.

Dan

> 2. bring the interface down
> $ sudo ifconfig wlan0 down
> 3. change interface type to monitor
> $ sudo iw dev wlan0 set type monitor
> 4. bring up the interface
> $ sudo ifconfig wlan0 up
> 5. start wireshark and select wlan0
> $ gksudo wireshark
>
> It will complain that running wireshark as root is not secure. If you
> care about that, you should read [1].
>
> Regards,
> Arend
>
> [1]
> http://wiki.wireshark.org/Security#Administrator.2Froot_account_not_required.21
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html