Solved Getting TP-LINK Archer T2U AC600 to Work

I have a TP-LINK Archer T2U AC600 Mini Wireless USB Adapter on FreeBSD 13 Release and I have tried everything in the https://wiki.freebsd.org/WiFi/FAQ but still nothing. And I noticed that this device is not specifically mentioned here https://www.freebsd.org/releases/13.0R/hardware/

I do see <Realtek 802.11ac WLAN Adapter> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

I thought I would just ask in case someone has worked with this device or can give me some pointers before I look for something that is more compatible.

Thanks
 
Thanks for replying!

It is definitely the TP-LINK Archer T2U AC600 micro dongle:


usbconfig 2.2 dump_all_desc
ugen2.2: <Realtek 802.11ac WLAN Adapter> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x0000 <Probed by interface class>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x2357
idProduct = 0x011f
bcdDevice = 0x0200
iManufacturer = 0x0001 <Realtek >
iProduct = 0x0002 <802.11ac WLAN Adapter >
iSerialNumber = 0x0003 <00e04c000001>
bNumConfigurations = 0x0001

Configuration index 0

bLength = 0x0009
bDescriptorType = 0x0002
wTotalLength = 0x003c
bNumInterfaces = 0x0001
bConfigurationValue = 0x0001
iConfiguration = 0x0000 <no string>
bmAttributes = 0x00e0
bMaxPower = 0x00fa

Interface 0
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0000
bAlternateSetting = 0x0000
bNumEndpoints = 0x0006
bInterfaceClass = 0x00ff <Vendor specific>
bInterfaceSubClass = 0x00ff
bInterfaceProtocol = 0x00ff
iInterface = 0x0002 <802.11ac WLAN Adapter >

Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0084 <IN>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0200
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000

Endpoint 1
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0005 <OUT>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0200
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000

Endpoint 2
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0006 <OUT>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0200
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000

Endpoint 3
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0087 <IN>
bmAttributes = 0x0003 <INTERRUPT>
wMaxPacketSize = 0x0040
bInterval = 0x0003
bRefresh = 0x0000
bSynchAddress = 0x0000

Endpoint 4
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0008 <OUT>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0200
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000

Endpoint 5
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0009 <OUT>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0200
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000



 
Another note to add - the box serial/number tag indicates that this is Model: Archer T2U(US) Ver 3.8. Based on the page you linked to https://wikidevi.wi-cat.ru/TP-LINK_Archer_T2U version 3 is a RealTek Chip?
Yes, Version 3 has a 'Realtek RTL8811AU' chip. Based on your information and this ubuntu forums post, the device with Vendor/Product ID 2357:011f needs a 'rtl8812au' driver.

idVendor = 0x2357
idProduct = 0x011f
That driver is provided on FreeBSD by rtwn(4) (see rtwn_usb(4) for supported chips).

Try /boot/loader.conf
Code:
if_rtwn_usb_load="YES"
reboot

After reboot: sysctl -n net.wlan.devices . It should return rtwn0
 
That is what I have in /boot/loader.conf

Code:
if_rtwn_usb_load="YES"
legal.realtek.license_ack=1

Code:
sysctl -n net.wlan.devices

Returns nothing (a blank line).

Code:
 kldstat
Id Refs Address                Size Name
 1   47 0xffffffff80200000  1f11ef8 kernel
 2    1 0xffffffff82112000     ae38 cryptodev.ko
 3    1 0xffffffff8211d000   67feb0 zfs.ko
 4    1 0xffffffff8279e000    1d6d0 if_rtwn_usb.ko
 5    2 0xffffffff827bc000    280c0 rtwn.ko
 6    1 0xffffffff82920000     3250 ichsmb.ko
 7    1 0xffffffff82924000     2180 smbus.ko
 8    1 0xffffffff82927000     2340 uhid.ko
 9    1 0xffffffff8292a000     4350 ums.ko
10    1 0xffffffff8292f000     3380 usbhid.ko
11    1 0xffffffff82933000     31f8 hidbus.ko
12    1 0xffffffff82937000     3320 wmt.ko

Looks like the kernel modules are loaded correctly.

Any other ideas?

Thanks
 
Looking at the case with more attention today I realize but now the device is a unsupported 802.11ac model. I was wondering the day before why tuxador was talking about 802.11ac not yet being supported but evidently couldn't connect the dots that he was referring to the device in question.

Concentrating on other details, that important piece of information totally escaped my notice. Even though that info appears multiple times, I was specifically told, and it's even written in big letters all over the models name: AC600.

My sincere apologies freetobsd. You need to look for a compatible model.
 
I appreciate the effort. What is odd is the box indicates Standards: IEEE 802.11 b/g/n 2.4 GHz and 802.11 a/n/ac 5 GHz. Not sure if that is meaningful - for about $20 I can just get a compatible model but it is always worth it to give these things a try.
Thanks again.
 
the box indicates Standards: IEEE 802.11 b/g/n 2.4 GHz and 802.11 a/n/ac 5 GHz. Not sure if that is meaningful ... but it is always worth it to give these things a try.
Right you are. I should have checked the product specifications myself. In this case we could try the initial plan: Adding vendor and product ID to the rtwn usb and usb devices source code. It might all what it needs. As it was in this case with a similar model:

Try the attached patch down below. Make sure to have the correct source of the FreeBSD branch you are running installed (i.e. releng/13.0 for 13.0-RELEASE), apply patch, build a new kernel. In case you are unfamiliar with getting the source and building the kernel:

Get the source with devel/git (or one of its flavors), net/gitup, extract from src.txz (downloaded or from installer media).

Build kernel:
Code:
# patch -p0 < archer-t2uv3.txt      # make sure there are no errors
                                    # in the message displayed
/usr/src # make buildkernel
/usr/src # make installkernel
# shutdown -r now
The original kernel will be renamed to kernel.old. In case there are problems with the new kernel you can choose in the FreeBSD boot menu the old kernel (Options: 6. Kernel).

When there is an system update and the kernel is updated too the custom kernel will be replaced, a new custom kernel needs to be build. Or, if the patch works out, one of us can file a bug report asking support for the device, and if the patch is approved it will be committed to main first then merged in time to the other supported branches.

You should also create /etc/src-env.conf with WITH_META_MODE=yes set. If there is the need of building the kernel again it will reduce the build time considerable. The first time building kernel after setting the src environment takes long, don't be alarmed.

If you encounter any problems please ask.
 

Attachments

  • archer-t2uv3.txt
    1.1 KB · Views: 153
Here is where I am at after the patching and rebuilt kernel:

dmesg:
Code:
rtwn0 on uhub4
rtwn0: <802.11ac WLAN Adapter > on usbus2
rtwn0: MAC/BB RTL8812AU, RF 6052 2T2R
wlan0: Ethernet address: ff:ff:ff:ff:ff:ff
rtwn0: r12a_power_off: failed to block Tx queues
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
rtwn0: r12a_power_off: failed to block Tx queues

sysctl net.wlan.devices returns:
Code:
net.wlan.devices: rtwn0

I ran:
Code:
ifconfig wlan0 create wlandev rtwn0

ifconfig returns:
Code:
wlan0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=200001<RXCSUM,RXCSUM_IPV6>
        ether ff:ff:ff:ff:ff:ff
        groups: wlan
        ssid myssid channel 1 (2412 MHz 11b)
        regdomain FCC country US authmode WPA1+WPA2/802.11i privacy MIXED
        deftxkey UNDEF txpower 30 bmiss 7 scanvalid 60 wme roaming MANUAL
        bintval 0
        parent interface: rtwn0
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Where myssid is my actual ssid.

Here are some other details:
Code:
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid argument
ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid argument
ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Device not configured
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1

Code:
 cat /etc/rc.conf
hostname="freeBSD"
ifconfig_bge0="DHCP"
wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
defaultrouter="192.168.1.1"

Code:
service netif restart
Created wlan(4) interfaces: wlan0.
Starting wpa_supplicant.
Starting dhclient.
wlan0: no link .............. giving up
/etc/rc.d/dhclient: WARNING: failed to start dhclient

Let me know if there is any other information you need.

Thanks
 
Try this patch. Apparently the 'RTL8811AU' chip belongs under 'RTL8821AU' not 'RTL8812AU' rtwn supported devices. The patch patches the patched /usr/src.
 

Attachments

  • archer-t2uv3v2.txt
    777 bytes · Views: 135
Well what can I say except it is always worth it to give these things a try and it would be impossible (at least with my limited knowledge) to do without the help of people like you T-Daemon - everything works as expected. I was having issues with my wpa_supplicant file and authenticating so if it helps someone else this worked for me:

Code:
wpa_passphrase ssid password > /etc/wpa_supplicant.conf

Please go ahead and file a bug report asking for support for the device, and if the patch is approved it will be committed to main first then merged in time to the other supported branches? Based on what you mentioned above.

Also is there a final patch that can be applied to the unpatched /usr/src? That way the patch could be applied once, if I understand correctly.

Again, thank you so much for all your help!
 
Well what can I say except it is always worth it to give these things a try and it would be impossible (at least with my limited knowledge) to do without the help of people like you T-Daemon - everything works as expected. I was having issues with my wpa_supplicant file and authenticating so if it helps someone else this worked for me:

Code:
wpa_passphrase ssid password > /etc/wpa_supplicant.conf

Please go ahead and file a bug report asking for support for the device, and if the patch is approved it will be committed to main first then merged in time to the other supported branches? Based on what you mentioned above.

Also is there a final patch that can be applied to the unpatched /usr/src? That way the patch could be applied once, if I understand correctly.

Again, thank you so much for all your help!
If I understand you can mark the thread as [solved] ?
 
Well what can I say except it is always worth it to give these things a try and it would be impossible (at least with my limited knowledge)
I'm no expert either, on the contrary. The start was a little bumpy, going back and forth. Also the existence of a similar model added to the supported devices list made it easy to identify the files to make the necessary modification (see link in post #15).

Please go ahead and file a bug report asking for support for the device
Alright, will do. Can you please provide dmesg | grep rtwn0 and uname -mr. That info would be helpful when filing the PR. It could be requested by a developer or committer.

Also is there a final patch that can be applied to the unpatched /usr/src? That way the patch could be applied once, if I understand correctly.
Yes, see attachments. To summarize, the patch adds support for the TP-Link Archer T2U v3 wireless adapter to rtwn(4) and updates the rtwn_usb(4) manual.
  1. patch-archer-t2uv3.txt to apply with patch(1).
  2. git-archer-t2uv3.txt to apply with GIT.
Again, thank you so much for all your help!
Glad I could be of help.
 

Attachments

  • patch-archer-t2uv3.txt
    1.7 KB · Views: 135
  • git-archer-t2uv3.txt
    1.6 KB · Views: 139
Here you go:

Code:
dmesg | grep rtwn0
rtwn0 on uhub2
rtwn0: <802.11ac WLAN Adapter > on usbus2
rtwn0: MAC/BB RTL8821AU, RF 6052 1T1R

and

Code:
uname -mr
13.0-RELEASE amd64

Thanks!
 
Back
Top