aircrack-ng / rtl8812au

RTL8812AU/21AU and RTL8814AU driver with monitor mode and frame injection
GNU General Public License v2.0
3.56k stars 782 forks source link

Is this driver suitable for TP-LINK Archer T2U Nano? #368

Closed niXman closed 5 years ago

niXman commented 5 years ago

Hi,

I'm trying to use this driver for TP-LINK Archer T2U Nano, USB ID 2357:011e. After installing the driver, I still do not see the wlan0 network interface.

Ideas?

kimocoder commented 5 years ago

lsusb & airmon-ng output thanks

niXman commented 5 years ago

lsusb output:

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 04d9:1702 Holtek Semiconductor, Inc. Keyboard LKS02
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0eef:0005 D-WAV Scientific Co., Ltd 
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 003: ID 2357:011e  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

airmon-ng output:

PHY Interface   Driver      Chipset

dmesg output when I plug the device:

[ 7680.896257] usb 5-1: new high-speed USB device number 3 using ehci-platform
[ 7681.031274] usb 5-1: New USB device found, idVendor=2357, idProduct=011e
[ 7681.031308] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7681.031329] usb 5-1: Product: 802.11ac WLAN Adapter 
[ 7681.031349] usb 5-1: Manufacturer: Realtek 
[ 7681.031369] usb 5-1: SerialNumber: 00e04c000001

I use this SBC: https://www.pine64.org/rockpro64/ The driver configured as for RPI+ 64

niXman commented 5 years ago

I added the USB ID of my device here(https://github.com/aircrack-ng/rtl8812au/blob/v5.3.4/os_dep/linux/usb_intf.c#L221) and now I can see the wlx503eaae7d39e interface.

Does anyone have any idea how I can switch this device to 5.8 Ghz?

niXman commented 5 years ago

Also I was able to create a Access Point, but I need to switch it to 5.8

3ternalDeath commented 5 years ago

From Issue #335 The wrong usb code was provided for this device

niXman commented 5 years ago

@3ternalDeath Why do you think so? How to correctly get the code?

3ternalDeath commented 5 years ago

Disregard, looks like you fixed it locally after cloning

niXman commented 5 years ago

Ah, understood.

Maybe someone knows how I can find out if this device supports the creation of an AP for 5.8?

output for iw phy phy1 info cmd:

Wiphy phy1
    max # scan SSIDs: 9
    max scan IEs length: 2304 bytes
    max # sched scan SSIDs: 0
    max # match sets: 0
    max # scan plans: 1
    max scan plan interval: -1
    max scan plan iterations: 0
    Retry short limit: 7
    Retry long limit: 4
    Coverage class: 0 (up to 0m)
    Supported Ciphers:
        * WEP40 (00-0f-ac:1)
        * WEP104 (00-0f-ac:5)
        * TKIP (00-0f-ac:2)
        * CCMP-128 (00-0f-ac:4)
    Available Antennas: TX 0 RX 0
    Supported interface modes:
         * IBSS
         * managed
         * AP
         * monitor
         * P2P-client
         * P2P-GO
    Band 1:
        Capabilities: 0x1972
            HT20/HT40
            Static SM Power Save
            RX Greenfield
            RX HT20 SGI
            RX HT40 SGI
            RX STBC 1-stream
            Max AMSDU length: 7935 bytes
            DSSS/CCK HT40
        Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
        Minimum RX AMPDU time spacing: 16 usec (0x07)
        HT Max RX data rate: 150 Mbps
        HT TX/RX MCS rate indexes supported: 0-7
        Bitrates (non-HT):
            * 1.0 Mbps
            * 2.0 Mbps
            * 5.5 Mbps
            * 11.0 Mbps
            * 6.0 Mbps
            * 9.0 Mbps
            * 12.0 Mbps
            * 18.0 Mbps
            * 24.0 Mbps
            * 36.0 Mbps
            * 48.0 Mbps
            * 54.0 Mbps
        Frequencies:
            * 2412 MHz [1] (20.0 dBm)
            * 2417 MHz [2] (20.0 dBm)
            * 2422 MHz [3] (20.0 dBm)
            * 2427 MHz [4] (20.0 dBm)
            * 2432 MHz [5] (20.0 dBm)
            * 2437 MHz [6] (20.0 dBm)
            * 2442 MHz [7] (20.0 dBm)
            * 2447 MHz [8] (20.0 dBm)
            * 2452 MHz [9] (20.0 dBm)
            * 2457 MHz [10] (20.0 dBm)
            * 2462 MHz [11] (20.0 dBm)
            * 2467 MHz [12] (20.0 dBm) (no IR)
            * 2472 MHz [13] (20.0 dBm) (no IR)
            * 2484 MHz [14] (20.0 dBm) (no IR)
    Band 2:
        Capabilities: 0x1972
            HT20/HT40
            Static SM Power Save
            RX Greenfield
            RX HT20 SGI
            RX HT40 SGI
            RX STBC 1-stream
            Max AMSDU length: 7935 bytes
            DSSS/CCK HT40
        Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
        Minimum RX AMPDU time spacing: 16 usec (0x07)
        HT Max RX data rate: 150 Mbps
        HT TX/RX MCS rate indexes supported: 0-7
        VHT Capabilities (0x03c03222):
            Max MPDU length: 11454
            Supported Channel Width: neither 160 nor 80+80
            short GI (80 MHz)
            SU Beamformee
            +HTC-VHT
        VHT RX MCS set:
            1 streams: MCS 0-9
            2 streams: not supported
            3 streams: not supported
            4 streams: not supported
            5 streams: not supported
            6 streams: not supported
            7 streams: not supported
            8 streams: not supported
        VHT RX highest supported: 434 Mbps
        VHT TX MCS set:
            1 streams: MCS 0-9
            2 streams: not supported
            3 streams: not supported
            4 streams: not supported
            5 streams: not supported
            6 streams: not supported
            7 streams: not supported
            8 streams: not supported
        VHT TX highest supported: 434 Mbps
        Bitrates (non-HT):
            * 6.0 Mbps
            * 9.0 Mbps
            * 12.0 Mbps
            * 18.0 Mbps
            * 24.0 Mbps
            * 36.0 Mbps
            * 48.0 Mbps
            * 54.0 Mbps
        Frequencies:
            * 5180 MHz [36] (20.0 dBm) (no IR)
            * 5200 MHz [40] (20.0 dBm) (no IR)
            * 5220 MHz [44] (20.0 dBm) (no IR)
            * 5240 MHz [48] (20.0 dBm) (no IR)
            * 5260 MHz [52] (20.0 dBm) (no IR, radar detection)
            * 5280 MHz [56] (20.0 dBm) (no IR, radar detection)
            * 5300 MHz [60] (20.0 dBm) (no IR, radar detection)
            * 5320 MHz [64] (20.0 dBm) (no IR, radar detection)
            * 5500 MHz [100] (20.0 dBm) (no IR, radar detection)
            * 5520 MHz [104] (20.0 dBm) (no IR, radar detection)
            * 5540 MHz [108] (20.0 dBm) (no IR, radar detection)
            * 5560 MHz [112] (20.0 dBm) (no IR, radar detection)
            * 5580 MHz [116] (20.0 dBm) (no IR, radar detection)
            * 5600 MHz [120] (20.0 dBm) (no IR, radar detection)
            * 5620 MHz [124] (20.0 dBm) (no IR, radar detection)
            * 5640 MHz [128] (20.0 dBm) (no IR, radar detection)
            * 5660 MHz [132] (20.0 dBm) (no IR, radar detection)
            * 5680 MHz [136] (20.0 dBm) (no IR, radar detection)
            * 5700 MHz [140] (20.0 dBm) (no IR, radar detection)
            * 5720 MHz [144] (20.0 dBm) (no IR, radar detection)
            * 5745 MHz [149] (20.0 dBm) (no IR)
            * 5765 MHz [153] (20.0 dBm) (no IR)
            * 5785 MHz [157] (20.0 dBm) (no IR)
            * 5805 MHz [161] (20.0 dBm) (no IR)
            * 5825 MHz [165] (20.0 dBm) (no IR)
            * 5845 MHz [169] (disabled)
            * 5865 MHz [173] (disabled)
            * 5885 MHz [177] (disabled)
    Supported commands:
         * new_interface
         * set_interface
         * new_key
         * start_ap
         * new_station
         * set_bss
         * join_ibss
         * set_pmksa
         * del_pmksa
         * flush_pmksa
         * remain_on_channel
         * frame
         * set_channel
         * connect
         * disconnect
    Supported TX frame types:
         * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
         * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
         * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
         * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
         * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
         * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    Supported RX frame types:
         * IBSS: 0xd0
         * managed: 0x40 0xd0
         * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
         * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
         * P2P-client: 0x40 0xd0
         * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
    WoWLAN support:
         * wake up on anything (device continues operating normally)
    software interface modes (can always be added):
         * monitor
    interface combinations are not supported
    Device supports scan flush.

what does no IR mean?

kimocoder commented 5 years ago

NO_IR is from the wifi_regd.c (the regdom)

kimocoder commented 5 years ago

Make a PR with the correct VID/PID and I'll add it. Best you do it, so credits goes your way

niXman commented 5 years ago

@kimocoder I looked the wifi_regd.c file but I dont understand what should I add?

correct VID/PID

why you think 2357:011e is not correct?

niXman commented 5 years ago

another question is why the USB ID 2357:0122 here marked as TP Link - T2U Nano? Is it normal that the same device has two identifiers because my T2U Nano has USB ID 2357:011e?

niXman commented 5 years ago

can anyone help me?

sedlund commented 5 years ago

I also have a TP-Link T2U Nano shows as 2357:011e

kimocoder commented 5 years ago

I'll add it in some hours, which branch are you using?

niXman commented 5 years ago

@kimocoder v5.3.4, thank you!

kimocoder commented 5 years ago

Gone through the VID/PID's and added what where missing and "vice versa" (on branches)

Happy go fishing :+1:

niXman commented 5 years ago

@kimocoder Hi, about this commit: https://github.com/aircrack-ng/rtl8812au/commit/e3281319f663305c3ccc4d284ec379cbfec2e92b

I did it myself, and I wrote about this above. But my question was, what do I need to do to switch to 5.8(I wrote about this above also)? You told me NO_IR is from the wifi_regd.c (the regdom) but I still do not understand what should I do?