OpenWrt Forum Archive

Topic: [Unresolved] Poor speeds with RT2800 drv and external wifi USB antenna

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all!

I get the internet from a wireless ISP with an external antenna. The signal keeps between -65dB and -69dB.

USB External Antenna --> TL-WR842NDV1 --> devices

I've been trying to improve my signal, but the RX always stays at 1Mbps-2Mbps (40kB/s ~ 100kB/s download rate) sometimes jumps to 11Mbps (300kb/s ~ 400kB/s download rate) for a few seconds then drop again.
Reconnecting gives me a nice boost for a minute, then the speed drops again.

https://r4to0img.azurewebsites.net/image-40D4_5950406B.jpg

Plugging the USB antenna directly into PC (Windows 10) I get better speeds and stability (stays at 48Mbps all the time, 500kB/s ~ 700kB/s download rate) than plugging into router USB.

My guesses are the drivers, since Windows drivers are different from *nix, or the router can't supply enough power to keep a stable signal.
I have to use a passive HUB to get the antenna working on the router since the router itself refuses to recognizes the antenna directly.

Any clue?

OpenWRT version:

Model            TP-Link TL-WR842N/ND v1
Firmware Version    OpenWrt Chaos Calmer 15.05.1 / LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55)
Kernel Version        3.18.23

USB Drivers:

kmod-lib-crc-itu-t
kmod-rt2x00-lib
kmod-rt2x00-usb
kmod-rt2800-lib
kmod-rt2800-usb

USB lsusb

root@OpenWrt:~# lsusb
Bus 001 Device 003: ID 148f:2070 Ralink Technology, Corp. RT2070 Wireless Adapter
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

USB dmesg

Thu Jun 25 18:41:17 2017 kern.info kernel: [  684.960000] usb 1-1: new high-speed USB device number 23 using ehci-platform
Thu Jun 25 18:41:18 2017 kern.info kernel: [  685.110000] hub 1-1:1.0: USB hub found
Thu Jun 25 18:41:18 2017 kern.info kernel: [  685.110000] hub 1-1:1.0: 4 ports detected
Thu Jun 25 18:41:22 2017 kern.info kernel: [  689.390000] usb 1-1.1: new high-speed USB device number 24 using ehci-platform
Thu Jun 25 18:41:22 2017 kern.info kernel: [  689.630000] usb 1-1.1: reset high-speed USB device number 24 using ehci-platform
Thu Jun 25 18:41:22 2017 kern.info kernel: [  689.760000] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
Thu Jun 25 18:41:22 2017 kern.info kernel: [  689.790000] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 0006 detected
Thu Jun 25 18:41:22 2017 kern.debug kernel: [  689.800000] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'

PHY Info

root@OpenWrt:~# iw phy phy2 info
Wiphy phy2
        max # scan SSIDs: 4
        max scan IEs length: 2285 bytes
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * WDS
                 * monitor
                 * mesh point
        Band 1:
                Frequencies:
                        * 2412 MHz [1] (30.0 dBm)
                        * 2417 MHz [2] (30.0 dBm)
                        * 2422 MHz [3] (30.0 dBm)
                        * 2427 MHz [4] (30.0 dBm)
                        * 2432 MHz [5] (30.0 dBm)
                        * 2437 MHz [6] (30.0 dBm)
                        * 2442 MHz [7] (30.0 dBm)
                        * 2447 MHz [8] (30.0 dBm)
                        * 2452 MHz [9] (30.0 dBm)
                        * 2457 MHz [10] (30.0 dBm)
                        * 2462 MHz [11] (30.0 dBm)
                        * 2467 MHz [12] (30.0 dBm)
                        * 2472 MHz [13] (30.0 dBm)
                        * 2484 MHz [14] (disabled)
        valid interface combinations:
                 * #{ managed, AP, mesh point } <= 8,
                   total <= 8, #channels <= 1
        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
root@OpenWrt:~#

Link info

Connected to xx:xx:xx:xx:xx:xx (on wlan2)
        SSID: [REDACTED]
        freq: 2412
        RX: 844269296 bytes (745511 packets)
        TX: 58334751 bytes (590279 packets)
        signal: -69 dBm
        tx bitrate: 24.0 MBit/s

        bss flags:      short-slot-time
        dtim period:    1
        beacon int:     100

Thanks in advance!

Edit Aug 15 2017: Added OpenWRT version and lsusb output.

(Last edited by rmacielalves on 26 Sep 2017, 08:57)

Update: Adding nohwcrypt=y in /etc/modules.d/rt2800 seems to improve a lot the connectivity.

https://i.imgur.com/ndCNmIP.png

Speeds are good now like in Windows with official drivers. smile

(Last edited by rmacielalves on 18 Aug 2017, 00:15)

Unfortunately I'm still getting low RX rate even with nohwcrypt. Just plugged the antenna on a computer and  I get 4-5Mbps on speedtest.net, while with the antenna plugged in into router USB I get 800kbps, odd...

https://r4to0img.azurewebsites.net/images/2017/08/15/f8466935b0e8c908edff47544b236a94.png

What about upgrading to LEDE 17.1.2 to see if any changes have bin made to the drivers?

you are having multiple problems with such a setup. you did not post your openwrt version/revision.

It appears that the AP you are connecting to does not support 802.11n, it may be g only hardware.  That is a situation that may not be well tested.

tapper wrote:

What about upgrading to LEDE 17.1.2 to see if any changes have bin made to the drivers?

Will check about LEDE builds, thanks!

anarchy99 wrote:

you are having multiple problems with such a setup. you did not post your openwrt version/revision.

Sorry, I missed that: Chaos Calmer 15.05.1, added to the first post.

mk24 wrote:

It appears that the AP you are connecting to does not support 802.11n, it may be g only hardware.  That is a situation that may not be well tested.

The AP is routerboard device, set to work with G rates. It's a not-so-long range link, approx. 70mts from main AP with visibility (only a tree in front). It's a public wifi offered by my city, which offers nice speeds (6Mbps/6Mbps, measured by speedtest.net) all the time when antenna is plugged on my computer.

Thank you all for the help!

Just to let anyone know:

I got bored and tried to test with latest trunk, unfortunately I couldn't get to install necessary packages (xsystem: wget: vfork: Out of memory), so I installed LEDE 17.01.2 instead as suggested by @tapper.

Minor difference, but not what I was expecting.

With the antenna plugged in into a computer (running Windows Server 2016) I get the maximum speed allowed from this access point:

https://r4to0img.azurewebsites.net/images/2017/09/26/872ca2895ba37844519ad38d9502b2d8.png

Here is the translated information from netsh:

    Name                   : Externo
    Description            : 802.11 USB Wireless LAN Card
    GUID                   : *snip*
    MAC Address       : *snip*
    Status                  : Connected
    SSID                   : *snip
    BSSID                  : *snip*
    Network type           : Infrastructure
    Radio type             : 802.11g
    Encryption         : Open
    Encoding                 : None
    Connection method        : Automatic
    Channel                : 11
    RX Rate (Mbps)    : 54
    TX Rate (Mbps)   : 54
    Signal                 : 90%
    Profile                : *snip*

However if plugged into router instead, and with LEDE now, I get:
https://r4to0img.azurewebsites.net/images/2017/09/26/f27ef302293359ba83487f427a787913.png

Speed starts at ~4Mbps and slowing down to 1Mbps.

Now you may ask: Why you don't keep your computer to route internet with your antenna? Well, power costs and the computer is a bit damaged (chipset needs reballing, keeps corrupting data/downloads and many other issues with its motherboard)

That's it! If the latest drivers can't solve this mystery, I don't know what can, since it works superb on Windows.


Thank you all who helped.

(Last edited by rmacielalves on 26 Sep 2017, 22:29)

The discussion might have continued from here.