# TP-Link TL-WN727N v5.21 works successfully



## Viktor G. (May 11, 2020)

TP-Link TL-WN727N v5.21 (RTL8188EUS) able to work with *urtwn(4)* driver:







my adapter version is v5.20, but it should also work with v5.21, see:
https://elinux.org/RPi_USB_Wi-Fi_Adapters#Working_USB_Wi-Fi_Adapters

What I did:
1) fetched 12.1 sys src
2) changed sys/dev/usb/usbdevs by adding:

```
/* TP-Link products */
product TPLINK WN727NV5         0x0111  TL-WN727N v5
```
3) changed sys/dev/rtwn/usb/rtwn_usb_attach.h by adding:

```
/* RTL8188EU */
#define RTWN_RTL8188EU_DEV(v,p) \
        { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, RTWN_CHIP_RTL8188EU) }
        RTWN_RTL8188EU_DEV(ABOCOM,              RTL8188EU),
        RTWN_RTL8188EU_DEV(DLINK,               DWA123D1),
        RTWN_RTL8188EU_DEV(DLINK,               DWA125D1),
        RTWN_RTL8188EU_DEV(ELECOM,              WDC150SU2M),
        RTWN_RTL8188EU_DEV(TPLINK,              WN722NV2),
        RTWN_RTL8188EU_DEV(TPLINK,              WN727NV5),
```
4) recompiled kernel
5) added to /boot/loader.conf:

```
if_rtwn_usb_load="YES"
legal.realtek.license_ack=1
rtwn-rtl8188eufw_load="YES"
```
6) added to /etc/rc.conf:

```
wlans_rtwn0="wlan0"
```

Now I see it in dmesg:

```
rtwn0 on uhub0
rtwn0: <Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 2> on usbus0
rtwn0: MAC/BB RTL8188EU, RF 6052 1T1R
```

Done!

Currently I only test WPA2-PSK client, and it works fine!


```
wpa_supplicant[1526]: wlan0: Trying to associate with 70:3a:51:90:11:11 (SSID='test' freq=2462 MHz)
wpa_supplicant[1526]: Failed to add supported operating classes IE
wpa_supplicant[1526]: wlan0: Associated with 70:3a:51:90:11:11
wpa_supplicant[1526]: wlan0: WPA: Key negotiation completed with 70:3a:51:90:11:11 [PTK=CCMP GTK=CCMP]
wpa_supplicant[1526]: wlan0: CTRL-EVENT-CONNECTED - Connection to 70:3a:51:90:11:11 completed [id=0 id_str=]
```


----------



## Viktor G. (May 12, 2020)

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246417


----------

