rt61 drops connections after a few minutes

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4382

candlerb

26-10-2007 13:20:28

I'm having difficulties getting a reliable connection between rt61 (wireless client) and a Cisco 877W (access point) with WPA2PSK. In summary, if I manage to establish a connection, it drops to signal quality 0/100 after a few minutes; at other times it won't establish, and occasionally it panics.

Platform
* Soekris net4501 (a small 486 board)
* miniPCI card labelled "Pluscom WL-RT2561-ST", "54Mbps Wireless 802.11 a/b/g"
* OpenWrt Kamikaze 7.09, kernel 2.6.22
* OpenWrt stock rt61 package, which is kmod-rt61_cvs-2007060307
* Access point Cisco 877W ADSL router, running c870-advipservicesk9-mz.124-11.XJ3.bin, configured for AES and WPA2-PSK only (config below)

If I install pciutils and run lspci -v, it tells me
[code81g4lrxk]
...
00:10.0 Network controller: RaLink Unknown device 0301
Subsystem: Abocom Systems Inc Unknown device abe3
Flags: bus master, slow devsel, latency 63, IRQ 10
Memory at a0000000 (32-bit, non-prefetchable) [size=32K]
Capabilities: [40] Power Management version 2
...
[/code81g4lrxk]

Anyway, the rt61 kernel module loads up just fine, and dmesg shows

[code81g4lrxk]
rt61 1.1.0 CVS 2007060307 http://rt2x00.serialmonkey.com
RT61: RfIcType= 1
[/code81g4lrxk]

I then configure it with the following script:

[code81g4lrxk]
ifconfig wlan0 up
iwconfig wlan0 mode managed
iwpriv wlan0 set AuthMode=WPA2PSK
iwpriv wlan0 set EncrypType=AES
iwconfig wlan0 essid "MySSID"
iwpriv wlan0 set "WPAPSK=MySecretKey"
iwconfig wlan0 essid "MySSID"
[/code81g4lrxk]

Sometimes I can get a connection up just fine, in which case I can pick up an IP address via DHCP and send pings. iwconfig reports

[code81g4lrxk]
root@SBRouter:/# iwconfig wlan0
wlan0 RT61 Wireless ESSID:"MySSID" Nickname:""
Mode:Managed Frequency:2.412 GHz Access Point: 00:17:DF:11:F5:91
Bit Rate=11 Mb/s
RTS thr:off Fragment thr:off
Encryption key:6AAE-9346-5519-2FCF-9480-4AF3-1A5A-1CF4
Link Quality=56/100 Signal level:-79 dBm Noise level:-111 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[/code81g4lrxk]

But after a few minutes the connection fails, and iwconfig reports

[code81g4lrxk]
root@SBRouter:/# iwconfig wlan0
wlan0 RT61 Wireless ESSID:"MySSID" Nickname:""
Mode:Managed Frequency:2.412 GHz Bit Rate=11 Mb/s
RTS thr:off Fragment thr:off
Encryption key:6AAE-9346-5519-2FCF-9480-4AF3-1A5A-1CF4
Link Quality=0/100 Signal level:-81 dBm Noise level:-79 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[/code81g4lrxk]

The significant things I notice there are "Link Quality=0/100", and also the access point's MAC address has vanished frmo the iwconfig output.

"iwlist wlan0 scan" still works, but every visible AP still shows 0/100 as the quality. It's quite a noisy wireless environment here, but here's what I get if I extract just my own AP's entry from the scan

[code81g4lrxk]
# iwlist wlan0 scan
...
Cell 02 - Address: 00:17:DF:11:F5:91
ESSID:"MySSID"
Mode:Managed
Channel:1
Encryption key:on
Bit Rates:5 Mb/s
Quality:0/100 Signal level:-78 dBm Noise level:-256 dBm
...
[/code81g4lrxk]

Searching the forums, I found that someone had suggested nailing the client to a single AP mac address. If I type "iwconfig wlan0 ap 0017df11f591" after the connection has been lost, it remains lost.

In other cases, I can configure the interface, but dhcp doesn't work. iwconfig wlan0 now shows

[code81g4lrxk]
root@SBRouter:/# iwconfig wlan0
wlan0 RT61 Wireless ESSID:"MySSID" Nickname:""
Mode:Managed Frequency:2.412 GHz Bit Rate=54 Mb/s
RTS thr:off Fragment thr:off
Encryption key:off
Link Quality=58/100 Signal level:-79 dBm Noise level:-79 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[/code81g4lrxk]

This time it shows a link quality (although not the AP MAC), but has no encryption key. At these times I tend to get logs like this on the Cisco's console too

[code81g4lrxk]
Oct 26 13:03:54.939: DOT11 EVENT:(adding)client->key_details.encrypt_type is 200
Oct 26 13:03:55.067: %DOT11-4-MAXRETRIES: Packet to client 0012.0e61.8094 reached max retries, removing the client
Oct 26 13:03:55.067: Client 0012.0e61.8094 failed: reached maximum retries
[/code81g4lrxk]

I've been trying this quite a few times, and occasionally I get a kernel panic here's one I just got. ("ifup wan" just starts the dhcp client on interface wlan0, it doesn't touch the radio)

[code81g4lrxk]
root@SBRouter:/# ifup wan
------------[ cut here ]------------
Kernel BUG at c48affe6 [verbose debug info unavailable]
invalid opcode: 0000 [#1]
Modules linked in: rt61 ne2k_pci 8390 ppp_async ppp_generic slhc crc_ccitt natsemi
CPU: 0
EIP: 0060:[<c48affe6>] Not tainted VLI
EFLAGS: 00010286 (2.6.22 #1)
eax: c3da9188 ebx: c3da0000 ecx: 00000000 edx: 00000068
esi: c3da9499 edi: c3da94bb ebp: 00000000 esp: c3e35eb8
ds: 007b es: 007b fs: 0000 gs: 0000 ss: 0068
Process ifconfig (pid: 835, ti=c3e34000 task=c10c3a70 task.ti=c3e34000)
Stack: c1375400 c3da0000 c1375400 c3c73bec c48a81d6 c1375400 00001042 00001003
c01f2957 c1375400 c01f1ed3 00000000 00000001 c3e35f50 c3c73bec c022f6db
c3c64080 00000000 c3e35f3c 00008913 c3e35f30 bfb4d868 00008914 c3c73be0
Call Trace:
[<c48a81d6>] <0> [<c01f2957>] <0> [<c01f1ed3>] <0> [<c022f6db>] <0> [<c01eabdc>] <0> [<c01eaa79>] <0> [<c01430b9>] <0> [<c01432b6>] <0> [<c01432f9>] <0> [<c01022c2>] <0> [<c0250000>] <0> =======================
Code: 01 75 09 c6 83 94 39 01 00 00 eb 2b a1 30 c4 29 c0 05 e8 03 00 00 89 83 90 91 00 00 8d 83 88 91 00 00 83 bb 88 91 00 00 00 74 04 <0f> 0b eb fe 8b 50 08 e8 9c 16 86 fb 8d 93 7b 94 00 00 8d 83 28
EIP: [<c48affe6>] SS:ESP 0068:c3e35eb8
[/code81g4lrxk]

Although eth0-eth2 exist and the natsemi driver knows about them, I'm not currently using them, and nothing is plugged into the RJ45 ports (I'm using serial console to talk to the Soekris).

So unfortunately I can't report one specific problem - just sometimes working, but a whole bunch of different failure modes -(

On sourceforge, the "official" release rt61-1.1.0-b2 is dated April 30, 2007, so the CVS snapshot in OpenWrt is newer than this. I've also looked at rt61-cvs-daily.tar.gz (rt61-cvs-2007102607) and diff'd it against the one OpenWrt is using (rt61-cvs-2007060307), but it doesn't look like anything significant has changed

[code81g4lrxk]
--- rt61-cvs-2007060307/CHANGELOG 2007-05-08 11:14:40.000000000 +0100
+++ rt61-cvs-2007102607/CHANGELOG 2007-08-20 21:16:27.000000000 +0100
@@ -23,6 +23,19 @@
Changelog for 802.11g rt61 driver

Version: CVS
+ * Fix 2.6 compile problem w/prev patch. Discovery/diagnosis/resolution
+ by xqterry.
+ * Fix Bug #1763773 - does not build on 2.6.5. Needed for early 2.6
+ series kernels.
+ * More forward compatibility macros for 2.6.22 and 64 bit compile.
+ Header consolidation.
+ * Fix amd64 compile. Fix "deprecated irqflag" message when compiling
+ for 2.6.22.
+ * Change debug handling to conform with rt2500/rt2570 drivers.
+ * Forward compatibility with kernel 2.6.22-rc4 skbuff changes. Put all
+ version compatibility macros in rt_config.h.
+ * Remove cruft (again).
+ * Fix default Makefile target.
* Import adapter startup detection updates from new Ralink (1.1.0.0)
driver.
* Import RTC/CTS frame sending updates from new Ralink (1.1.0.0)
[/code81g4lrxk]

So, any suggestions as to what I can try?

Thanks,

Brian.

P.S. Cisco wireless config
[code81g4lrxk]
dot11 ssid MySSID
vlan 3
authentication open
authentication key-management wpa
mbssid guest-mode
wpa-psk ascii MyPSK
! ...
interface Dot11Radio0
no ip address
no dot11 qos mode
no dot11 extension aironet
!
encryption vlan 3 mode ciphers aes-ccm
!
broadcast-key vlan 3 change 600
!
!
ssid MySSID
!
mbssid
speed basic-1.0 basic-2.0 basic-5.5 6.0 9.0 basic-11.0 12.0 18.0 24.0 36.0 48.0 54.0
no preamble-short
channel 2412
station-role root
world-mode dot11d country GB indoor
!
[/code81g4lrxk]

(actually I'm running an additional open SSID, but with the mbssid feature this should appear as a completely separate AP with a completely separate MAC address to the client)

Spy84464

27-10-2007 20:49:20

Hello,
Which version of the driver are you using? Have you tried the very latest CVS tarball? The "latest" beta is very outdated.
Even if a link quality is reported in iwconfig output, you should look for youe ap mac address in there, it is its presence that means if the device has associated or not.

Regards,
Romain

candlerb

28-10-2007 07:16:19

As I said in the original posting the driver is a cvs snapshot dated 2007060307. I have compared the source of this snapshot with the current cvs snapshot and I can't see anything functionally different (mostly additional debug output is enabled)