Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #2068 (new defect)

Opened 13 years ago

Last modified 13 years ago

PCI TRENDnet TEW-443PI in AP mode doesn't associate

Reported by: xio@ungrund.org Assigned to:
Priority: major Milestone:
Component: madwifi: driver Version: trunk
Keywords: Cc:
Patch is attached: 0 Pending:

Description

I'm trying to get PCI TRENDnet TEW-443PI card in AP mode to work on Debian Lenny (kernel 2.6.25-2-686).

On a client side I have a laptop with bcm4311 chip: 03:00.0 Network controller [0280]: Broadcom Corporation BCM94311MCG wlan mini-PCI [14e4:4311] (rev 01). It works with native b43 kernel module, or through ndiswrapper, and it does work with other APs, so I'm almost sure the problem is on madwifi side.

The problem is that, after a recent upgrade of madwifi-* packages, my wireless network is almost dead: sometimes I can connect to the AP, but performance is very poor: speed is around 1Mbit, it may start to grow, but then drops to very low values (feels like packet loss); sometimes I can associate with the AP, but then got a disconnect; and this morning the AP even rarely appears in iwlist wlan0 scan results :(

The card worked fine the first time it was installed, unfortunately, I can't tell the exact driver version, perhaps it was the previous one.

AP side

  • lspci: 04:01.0 Ethernet controller [0200]: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor [168c:0013] (rev 01)
  • madwifi-tools version: 1:0.9.4+r3685.20080531+dfsg-1
  • madwifi-source version: 1:0.9.4+r3698.20080604.hal20080528-1
  • madwifi-modules-2.6.25-2-686: 1:0.9.4+r3698.20080604.hal20080528-1+2.6.25-7

/etc/network/interfaces:

iface wlan0 inet static
        address 192.168.2.1
        netmask 255.255.255.0
        broadcast 192.168.2.255
        network 192.168.2.0
        # AP
        madwifi-base wifi0
        madwifi-mode ap
        wireless-essid orion

Loading module:

betelgeuse-2 : xio [~] $ lsmod | grep 'wlan\|ath'
betelgeuse-2 : xio [~] $ sudo modprobe ath_pci
betelgeuse-2 : xio [~] $

dmesg output:

Jul 24 13:25:21 betelgeuse kernel: [ 1525.070480] ath_hal: 0.10.5.6 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, RF2417)
Jul 24 13:25:21 betelgeuse kernel: [ 1180.153260] wlan: svn r3698
Jul 24 13:25:21 betelgeuse kernel: [ 1180.157259] ath_pci: svn r3698
Jul 24 13:25:21 betelgeuse kernel: [ 1180.157347] ACPI: PCI Interrupt 0000:04:01.0[A] -> GSI 19 (level, low) -> IRQ 19
Jul 24 13:25:21 betelgeuse kernel: [ 1180.737900] MadWifi: ath_attach: HAL managed transmit power control (TPC) disabled.
Jul 24 13:25:21 betelgeuse kernel: [ 1180.737975] MadWifi: ath_attach: Interference mitigation is supported.  Currently disabled.
Jul 24 13:25:21 betelgeuse kernel: [ 1180.738589] MadWifi: ath_attach: Switching rfkill capability off.
Jul 24 13:25:21 betelgeuse kernel: [ 1525.674039] ath_rate_sample: 1.2 (svn r3698)
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751232] wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751287] wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751384] wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751455] wifi0: H/W encryption support: WEP AES AES_CCM TKIP
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751497] wifi0: Atheros AR2414 chip found (MAC 7.9, PHY 2112A 4.5, Radio 5.6)
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751561] wifi0: Use hw queue 1 for WME_AC_BE traffic
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751594] wifi0: Use hw queue 0 for WME_AC_BK traffic
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751628] wifi0: Use hw queue 2 for WME_AC_VI traffic
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751661] wifi0: Use hw queue 3 for WME_AC_VO traffic
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751700] wifi0: Use hw queue 4 for XR traffic
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751735] wifi0: Use hw queue 7 for UAPSD traffic
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751767] wifi0: Use hw queue 8 for CAB traffic
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751799] wifi0: Use hw queue 9 for beacons
Jul 24 13:25:21 betelgeuse kernel: [ 1180.751832] ath_pci: wifi0: Atheros 5212: mem=0xf2200000, irq=19

Setting wlan0 up:

betelgeuse-2 : xio [~] $ sudo ifup wlan0
betelgeuse-2 : xio [~] $ iwconfig wlan0
wlan0     IEEE 802.11g  ESSID:"orion"  Nickname:""
          Mode:Master  Frequency:2.412 GHz  Access Point: 06:18:E7:33:5F:53   
          Bit Rate:0 kb/s   Tx-Power:18 dBm   Sensitivity=1/1  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

betelgeuse-2 : xio [~] $ ip addr show wlan0
31: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 06:18:e7:33:5f:53 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.1/24 brd 192.168.2.255 scope global wlan0
    inet6 fe80::418:e7ff:fe33:5f53/64 scope link 
       valid_lft forever preferred_lft forever

Looks good so far AFAIU.

dmesg again

Jul 24 13:26:39 betelgeuse kernel: [ 1526.896786] wifi0: ath_bstuck_tasklet: Stuck beacon; resetting (beacon miss count: 11)

Oops, missed beacon. I'm aware of "The Infamous Stuck Beacon Problem", but I usually get only one or two such messages in dmesg and sometimes not at all, but never more than ~10.

Sta side

Ndiswrapper

Loading module:

xio@galea:~$ lsmod | grep 'ssb\|b43\|b44\|ndiswrapper'
xio@galea:~$ sudo modprobe ndiswrapper

dmesg output:

Jul 24 13:33:53 galea kernel: [ 3921.140673] ndiswrapper version 1.52 loaded (smp=yes, preempt=no)
Jul 24 13:33:53 galea kernel: [ 3921.187913] ndiswrapper: driver bcmwl5 (Broadcom,10/12/2006, 4.100.15.5) loaded
Jul 24 13:33:53 galea kernel: [ 3921.192844] ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 17 (level, low) -> IRQ 16
Jul 24 13:33:53 galea kernel: [ 3921.192933] PCI: Setting latency timer of device 0000:03:00.0 to 64
Jul 24 13:33:53 galea kernel: [ 3921.198755] ndiswrapper: using IRQ 16
Jul 24 13:33:54 galea kernel: [ 3921.399973] wlan0: ethernet device 00:19:7d:f7:d5:66 using NDIS driver: bcmwl5, version: 0x4640f05, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4311.5.conf
Jul 24 13:33:54 galea kernel: [ 3921.400440] wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
Jul 24 13:33:54 galea NetworkManager: <debug> [1216892034.185904] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/net_00_19_7d_f7_d5_66').
Jul 24 13:33:54 galea kernel: [ 3921.446935] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Jul 24 13:33:54 galea NetworkManager: <info>  wlan0: Device is fully-supported using driver 'ndiswrapper'.
Jul 24 13:33:54 galea NetworkManager: <info>  wlan0: driver does not support SSID scans (scan_capa 0x00).
Jul 24 13:33:54 galea kernel: [ 3921.472474] usbcore: registered new interface driver ndiswrapper
Jul 24 13:33:54 galea NetworkManager: <info>  nm_device_init(): waiting for device's worker thread to start
Jul 24 13:33:54 galea NetworkManager: <info>  nm_device_init(): device's worker thread started, continuing.
Jul 24 13:33:54 galea NetworkManager: <info>  Now managing wireless (802.11) device 'wlan0'.
Jul 24 13:33:54 galea NetworkManager: <info>  Deactivating device wlan0.
Jul 24 13:33:54 galea NetworkManager: <WARN>  nm_device_802_11_wireless_set_essid(): error setting ESSID to '' for device wlan0: Invalid argument

Scanning for ESSIDs

xio@galea:~$ sudo iwlist wlan0 scan
wlan0     No scan results

xio@galea:~$ sudo iwlist wlan0 scan
wlan0     No scan results

xio@galea:~$ sudo iwlist wlan0 scan
wlan0     No scan results

xio@galea:~$ sudo iwlist wlan0 scan
wlan0     No scan results

xio@galea:~$ sudo iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: 06:18:E7:33:5F:53
                    ESSID:"orion"
                    Protocol:IEEE 802.11g
                    Mode:Managed
                    Frequency:2.412 GHz (Channel 1)
                    Quality:26/100  Signal level:-79 dBm  Noise level:-96 dBm
                    Encryption key:off
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Extra:bcn_int=100
                    Extra:atim=0

xio@galea:~$ sudo iwlist wlan0 scan
wlan0     No scan results

Very bad. I've noticed, that setting AP to use another channel helps and the client get higher signal quality and the AP appears more frequently in scan results.

Trying to associate:

xio@galea:~$ sudo iwconfig wlan0 essid orion
xio@galea:~$ iwconfig wlan0
wlan0     IEEE 802.11g  ESSID:off/any  
          Mode:Managed  Frequency:2.462 GHz  Access Point: Not-Associated   
          Bit Rate:54 Mb/s   Tx-Power:32 dBm   
          RTS thr:2347 B   Fragment thr:2346 B   
          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

dmesg is silent, and since we are not associated, there is no reason to try to obtain an IP / ping the AP.

ssb+b43

Loading module:

xio@galea:~$ sudo modprobe -r ndiswrapper
xio@galea:~$ sudo modprobe b43
xio@galea:~$

dmesg output:

Jul 24 13:36:44 galea kernel: [ 3942.590276] ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 17 (level, low) -> IRQ 16
Jul 24 13:36:44 galea kernel: [ 3942.590310] PCI: Setting latency timer of device 0000:03:00.0 to 64
Jul 24 13:36:44 galea kernel: [ 3942.593543] ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x11, vendor 0x4243)
Jul 24 13:36:44 galea kernel: [ 3942.593574] ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0A, vendor 0x4243)
Jul 24 13:36:44 galea kernel: [ 3942.593597] ssb: Core 2 found: USB 1.1 Host (cc 0x817, rev 0x03, vendor 0x4243)
Jul 24 13:36:44 galea kernel: [ 3942.593619] ssb: Core 3 found: PCI-E (cc 0x820, rev 0x01, vendor 0x4243)
Jul 24 13:36:44 galea kernel: [ 3942.597132] ssb: Sonics Silicon Backplane found on PCI device 0000:03:00.0
Jul 24 13:36:44 galea kernel: [ 3942.609027] b43-phy0: Broadcom 4311 WLAN found
Jul 24 13:36:44 galea kernel: [ 3942.652923] b43-phy0 debug: Found PHY: Analog 4, Type 2, Revision 8
Jul 24 13:36:44 galea kernel: [ 3942.652945] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 2
Jul 24 13:36:44 galea kernel: [ 3942.693474] phy0: Selected rate control algorithm 'simple'
Jul 24 13:36:44 galea NetworkManager: <debug> [1216892204.804512] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/ssb__null_').
Jul 24 13:36:44 galea NetworkManager: <debug> [1216892204.825344] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/ssb__null_').
Jul 24 13:36:44 galea NetworkManager: <debug> [1216892204.848206] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/net_00_19_7d_f7_d5_66').
Jul 24 13:36:44 galea NetworkManager: <debug> [1216892204.911472] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/net_00_19_7d_f7_d5_66_0').
Jul 24 13:36:44 galea kernel: [ 3942.876808] input: b43-phy0 as /devices/virtual/input/input12
Jul 24 13:36:45 galea kernel: [ 3943.049442] b43-phy0 debug: Loading firmware version 351.126 (2006-07-29 05:54:02)
Jul 24 13:36:46 galea kernel: [ 3944.577232] b43-phy0 debug: Chip initialized
Jul 24 13:36:46 galea kernel: [ 3944.577779] b43-phy0 debug: 32-bit DMA initialized
Jul 24 13:36:46 galea kernel: [ 3944.582113] Registered led device: b43-phy0:tx
Jul 24 13:36:46 galea kernel: [ 3944.582349] Registered led device: b43-phy0:rx
Jul 24 13:36:46 galea kernel: [ 3944.582508] Registered led device: b43-phy0:radio
Jul 24 13:36:46 galea kernel: [ 3944.582591] b43-phy0 debug: Wireless interface started
Jul 24 13:36:46 galea kernel: [ 3944.592955] b43-phy0 debug: Adding Interface type 2
Jul 24 13:36:46 galea kernel: [ 3944.593441] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Jul 24 13:36:46 galea NetworkManager: <info>  wlan0: Device is fully-supported using driver 'b43'.
Jul 24 13:36:46 galea NetworkManager: <info>  wlan0: driver supports SSID scans (scan_capa 0x01).
Jul 24 13:36:46 galea NetworkManager: <info>  nm_device_init(): waiting for device's worker thread to start
Jul 24 13:36:46 galea NetworkManager: <info>  nm_device_init(): device's worker thread started, continuing.
Jul 24 13:36:46 galea NetworkManager: <info>  Now managing wireless (802.11) device 'wlan0'.
Jul 24 13:36:46 galea NetworkManager: <info>  Deactivating device wlan0.
Jul 24 13:36:46 galea NetworkManager: <debug> [1216892206.868353] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/computer_logicaldev_input_5').

Scanning:

xio@galea:~$ sudo iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: 06:18:E7:33:5F:53
                    ESSID:"orion"
                    Mode:Master
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=93/100  Signal level=-39 dBm  Noise level=-66 dBm
                    Encryption key:off
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Extra:tsf=0000000022476480

Quality=93/100, good!

Trying to associate:

xio@galea:~$ sudo iwconfig wlan0 essid orion
xio@galea:~$ iwconfig wlan0
wlan0     IEEE 802.11g  ESSID:"orion"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: 06:18:E7:33:5F:53   
          Tx-Power=27 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr=2346 B   
          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
xio@galea:~$ ip link show wlan0
24: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:19:7d:f7:d5:66 brd ff:ff:ff:ff:ff:ff

But it's NO-CARRIER :(

dmesg output:

Jul 24 13:39:58 galea kernel: [ 3972.842657] wlan0: Initial auth_alg=0
Jul 24 13:39:58 galea kernel: [ 3972.842665] wlan0: authenticate with AP 06:18:e7:33:5f:53
Jul 24 13:39:58 galea kernel: [ 3972.897161] wlan0: authenticate with AP 06:18:e7:33:5f:53
Jul 24 13:39:58 galea kernel: [ 3972.906771] wlan0: authenticate with AP 06:18:e7:33:5f:53
Jul 24 13:39:58 galea kernel: [ 3972.920983] wlan0: authentication with AP 06:18:e7:33:5f:53 timed out
<skip>
Jul 24 13:42:30 galea kernel: [ 3986.503510] wlan0: authentication frame received from 06:18:e7:33:5f:53, but not in authenticate state - ignored
Jul 24 13:42:30 galea kernel: [ 3986.503960] wlan0: authentication frame received from 06:18:e7:33:5f:53, but not in authenticate state - ignored
J

That's it. I've also played with several iwpriv options like dtim_period or bintval, with no significant success (maybe not enough).

Change History

07/24/08 12:44:39 changed by xio@ungrund.org

Gosh, I've done a typo in my email address, can it be fixed? s/,/./

07/24/08 12:51:39 changed by mrenzmann

  • reporter changed from xio@ungrund,org to xio@ungrund.org.

07/24/08 14:43:27 changed by xio@ungrund.org

OK, cool, I've downgraded to madwifi-source-1:0.9.4~rc2-1+2.6.25-7 and now I can connect to the AP, even using WEP encryption. However, Link Quality is ~70, which is not good, since I expect it to be ~95 :)

Also, I've measured speed by running nc -l -l 8888 < /dev/zero on AP side with different rate control modules and wget -O /dev/null 192.168.2.1:8888 on client side:

  • sample: varies from almost 3.5M/s (is it good?) to 1M/s and lower
  • amrr: ~2.5M/s +-40
  • minstrel: ~3.3M/s +-20
  • onoe: less then 1M/s

Packet loss probability is close to impossible, because I'm in a line of sight with the AP. Can it be the AP itself, sending packets on a low power or not frequently enough?

07/24/08 20:10:12 changed by xio@ungrund.org

I've found that there are 3 non-overlapping channels at 2.4Ghz range: 1, 6 and 11. Setting the AP to use the 6th channel increased bandwidth to about 3.6M/s. It holds almost constantly at that value using both simple and minstrel rate control mechanisms. b43 also works, but at ~2M/s.

So! My initial problem still remains, since I'm not able to bring the network up using madwifi driver version 0.9.4-r3685. However, there is a fresh package of madwifi-source in sid, version 0.9.4+r3698.20080604.hal20080528-1, that I hope to try tomorrow.

If anyone is following the ticket, is 3.6Mbyte/s (28Mbit/s) the theoretical maximum speed in one direction in 802.11g mode? Kind of half-duplex?

07/25/08 14:11:55 changed by xio@ungrund.org

Tried 0.9.4+r3772.20080716-1 this morinng. iwlist wlan0 scan now shows ~80/100 Signal Quality, but speed is actually lower, than when using 0.9.4~rc2-1+2.6.25-7 and is about 2.6M/s.

To summarize the expirience:

  • the initial problem of reassotiations and low signal quality was caused by interference with an unknown source of RF and switching to channel 6 fixed the problem.
  • SVN revision 3772 driver shows worse performance, then version 0.9.4~rc2. This can be the actual ticket name, I think :)