Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB3 issue #1

Open
kimocoder opened this issue Aug 13, 2018 · 5 comments
Open

USB3 issue #1

kimocoder opened this issue Aug 13, 2018 · 5 comments

Comments

@kimocoder
Copy link

As for the USB3 (modeswitch) issue you might wan't to der what we did om our repo.
Take a look at some lf these commits

USB3 modeswitch commit below
aircrack-ng/rtl8812au@cfdf854

And also the Realtek switch was changed
aircrack-ng/rtl8812au@d6fe516

The one below is for 8814au
aircrack-ng/rtl8812au@6b80d73

We now have all chipsets, 8812/8814 and 8821 working with USB3.

@ulli-kroll
Copy link
Owner

For USB3 modeswitch in general
The code for this is already there for rtl8812bu (*)
And Realtek changed this schematic/hardware for (newer) JAGUAR2 devices.

Anyway
Currently I have two issues with this device or driver

  • modeswitch can't detect if the device an a USB 2.0 only hub. In this case the driver will stop after restart the device.
  • with USB 3.0 the device will not work properly and the driver do some endless probe loop. Maybe I'm facing with one of my USB hubs.

(*)
This was the first thing I've looked after.

@cnlohr
Copy link

cnlohr commented May 26, 2019

Any way you can give me some example code for how I would actually try to test a mode switch on USB3? I can't seem to go past ~115 Mbps using the USB 2.0 interface, even if I do monitor mode and force a super high VHT MCS.

I've tried applying the changes here, and the adapter does enumerate with superspeed:

  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat         287 micro seconds
Device Status:     0x000c
  (Bus Powered)
  U1 Enabled
  U2 Enabled

But, the actual transfer rate doesn't seem to be effected.

@raplin
Copy link

raplin commented Oct 17, 2020

Can confirm superspeed works fine :-)

Tested against a R7800 (Qualcomm) which is 4x4ac, on 5.8, 80mhz channel

Modeswitch to SS works same as it does on 8812AU:

Before:
|__ Port 3: Dev 4, If 2, Class=Vendor Specific Class, Driver=rtl88x2bu, 480M

With USB HS TX was clamped at 30MBytes/sec
iperf3 transmit:
[ 4] 16.00-17.00 sec 39.0 MBytes 327 Mbits/sec
iperf3 receive:
[ 4] 3.00-4.00 sec 29.2 MBytes 245 Mbits/sec

SWITCH
echo '1' >/sys/module/88x2bu/parameters/rtw_switch_usb_mode

{replug}

After:
|__ Port 3: Dev 2, If 2, Class=Vendor Specific Class, Driver=rtl88x2bu, 5000M

Speed does increase (greatly):

Transmit

cat /proc/net/rtl88x2bu/*/sta_tp_info
====== mac_id : 0 [08:02:8e:9e:ba:e9] ======
BCN counts : 10 (per-1 second), DTIM Period:2
tx_rate : VHTSS2MCS9(S) rx_rate : VHTSS2MCS7, rx_rate_bmc : OFDM_6M, rssi : 55
%
RTW: [TP] Tx : 533(Mbps) Rx : 1(Mbps) Total : 534(Mbps)
RTW: [Smooth TP] Tx : 528(Mbps) Rx : 1(Mbps) Total : 529(Mbps)

iperf3
[ 4] 4.00-5.00 sec 61.1 MBytes 513 Mbits/sec 0 1.84 MBytes

iperf3 receive

====== mac_id : 0 [08:02:8e:9e:ba:e9] ======
BCN counts : 10 (per-1 second), DTIM Period:2
tx_rate : VHTSS2MCS9(S) rx_rate : VHTSS2MCS8, rx_rate_bmc : OFDM_6M, rssi : 57
%
RTW: [TP] Tx : 1(Mbps) Rx : 327(Mbps) Total : 328(Mbps)
RTW: [Smooth TP] Tx : 6(Mbps) Rx : 321(Mbps) Total : 327(Mbps)

iperf3
[ 4] 2.00-3.00 sec 46.3 MBytes 388 Mbits/sec

@raplin
Copy link

raplin commented Oct 17, 2020

Side note: bluetooth on this dongle is not great when you use wifi,

When connected to AP at 2.4ghz,
hcitool lescan --duplicates
reports a ton more BLE devices when the adapter is idle.

..in fact BT/BLE appears to just stops working when you are connected to a 5.8ghz AP

@ulli-kroll
Copy link
Owner

USB3 was meant for me ;-)

currently 8822bu in pre alpha
ulli-kroll/rtw88-usb#11 (comment)

don't ask !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants