# TP-LINK TL-WN823N v2 device strange driver problems and not able to handshake



## mcjames (Jun 24, 2020)

Hello;
    Under `FreeBSD  12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC  amd64`, I am trying to setup my WiFi network with my TP-Link WN823N usb dongle.





according to *dmesg* and the WikiDevi website I am running a device with *RTL8192EU *chipset.


```
ugen7.2: <Realtek 802.11n NIC> at usbus7

rtwn0 on uhub0

rtwn0: <802.11n NIC > on usbus7

rtwn0: MAC/BB RTL8192EU, RF 6052 2T2R

wlan0: Ethernet address: d4:6e:0e:7f:51:67
```

and this is what I have in my /boot/loader.conf :

```
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
if_rtwn_usb_load="YES"
if_rtwn_pci_load="YES"
if_urtwn_load="YES"
wlan_wpa_load="YES"
wlan_wpa2_load="YES"
wlan_scan_ap_load="YES"

legal.realtek.license_ack=1
```

It seems that I can't get the device to be picked up during the boot time.
and `ifconfig wlan0 create wlandev rtwn0` returns `SIOCIFCREATE2: Device not configured.`
detaching and reattaching the device bring wlan0 to ifconfig .
And it seems the USB device gets disconnected when I try to handshake with wpa_supplicant


```
usb_alloc_device: set address 2 failed (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
ugen5.2: <Unknown > at usbus5 (disconnected)
uhub_reattach_port: could not allocate new device
ugen7.2: <Realtek 802.11n NIC> at usbus7
rtwn0 on uhub0
rtwn0: <802.11n NIC > on usbus7
rtwn0: MAC/BB RTL8192EU, RF 6052 2T2R
wlan0: Ethernet address: d4:6e:0e:7f:51:67
ugen7.2: <Realtek 802.11n NIC> at usbus7 (disconnected)
rtwn0: at uhub0, port 3, addr 2 (disconnected)
rtwn0: r92e_power_off: failed to block Tx queues
rtwn0: detached >>!!! I unpluged the dongle at this point !!!
usb_alloc_device: set address 2 failed (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
ugen5.2: <Unknown > at usbus5 (disconnected)
uhub_reattach_port: could not allocate new device
```



AND MORE STRANGE THINGS:

DMESG:


```
uhub_reattach_port: could not allocate new device
ugen7.2: <Realtek 802.11n NIC> at usbus7
rtwn0 on uhub0
rtwn0: <802.11n NIC > on usbus7
rtwn0: MAC/BB RTL8192EU, RF 6052 2T2R
wlan0: Ethernet address: d4:6e:0e:7f:51:67
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
wlan0: ieee80211_new_state_locked: pending SCAN -> AUTH transition lost
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
wlan0: ieee80211_new_state_locked: pending SCAN -> AUTH transition lost
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
wlan0: ieee80211_new_state_locked: pending SCAN -> AUTH transition lost
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
wlan0: ieee80211_new_state_locked: pending SCAN -> AUTH transition lost
wlan0: ieee80211_new_state_locked: pending SCAN -> AUTH transition lost
```



wpa_supplicant from the packages and not the base system since it crashes at the beginning:

```
BSS: last_scan_res_used=4/32
Add randomness: count=57 entropy=56
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=5): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
Add randomness: count=58 entropy=57
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=5): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
Add randomness: count=59 entropy=58
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=5): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
Add randomness: count=60 entropy=59
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=5): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
wlan0: New scan results available (own=0 ext=0)
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: AP[0] 1c:15:1f:38:f2:f3 type=0 tries=0 last_attempt=-1 sec ago blacklist=0
WPS: AP[1] 74:da:da:e1:e4:b0 type=0 tries=0 last_attempt=-1 sec ago blacklist=0
WPS: AP[2] 18:d6:c7:d3:2a:42 type=0 tries=0 last_attempt=-1 sec ago blacklist=0
wlan0: Authentication with 1c:15:1f:38:f2:f3 timed out.
Added BSSID 1c:15:1f:38:f2:f3 into blacklist
wlan0: WPA: Clear old PMK and PTK
wlan0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=1c:15:1f:38:f2:f3 reason=3 (DEAUTH_LEAVING) state=ASSOCIATING
wlan0: Event DEAUTH (11) received
wlan0: Deauthentication notification
wlan0:  * reason 3 (DEAUTH_LEAVING) locally_generated=1
Deauthentication frame IE(s) - hexdump(len=0): [NULL]
wlan0: CTRL-EVENT-DISCONNECTED bssid=1c:15:1f:38:f2:f3 reason=3 locally_generated=1
wlan0: Auto connect enabled: try to reconnect (wps=0/0 wpa_state=5)
wlan0: Setting scan request: 0.100000 sec
wlan0: Radio work 'connect'@0x800ca6320 done in 10.006021 seconds
wlan0: radio_work_free('connect'@0x800ca6320): num_active_works --> 0
BSSID 1c:15:1f:38:f2:f3 blacklist count incremented to 2
Continuous association failures - consider temporary network disabling
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="DINO(" auth_failures=5 duration=60 reason=CONN_FAILED
wlan0: Blacklist count 12 --> request scan in 10000 ms
wlan0: Ignore new scan request for 10.000000 sec since an earlier request is scheduled to trigger sooner
wlan0: WPA: Clear old PMK and PTK
wlan0: Disconnect event - remove keys
wlan0: State: ASSOCIATING -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
wlan0: State: DISCONNECTED -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wlan0: Ignore new scan request for 1.000000 sec since an earlier request is scheduled to trigger sooner
wlan0: State: DISCONNECTED -> SCANNING
Scan SSID - hexdump_ascii(len=5):
     44 49 4e 4f 28                                    DINO(       
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0x800ca6320
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0x800ca6320 after 0.000012 second wait
wpa_driver_bsd_set_wpa: enabled=1
wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
wlan0: Event SCAN_RESULTS (3) received
Received 1080 bytes of scan results (4 BSSes)
Sorted scan results
74:da:da:e1:e4:b0 freq=2452 qual=53 noise=-95 level=-69 flags=0x0 age=0 est=1000
IEs - hexdump(len=266): 00 03 73 6c 6d 01 0c 82 84 8b 96 12 24 48 6c 0c 18 30 60 2a 01 04 00 03 73 6c 6d 01 08 82 84 8b 96 12 24 48 6c 03 01 09 32 04 0c 18 30 60 07 06 41 45 20 01 0d 14 33 08 20 01 02 03 04 05 06 07 33 08 21 05 06 07 08 09 0a 0b 05 04 00 01 00 00 30 18 01 00 00 0f ac 02 02 00 00 0f ac 02 00 0f ac 04 01 00 00 0f ac 02 00 00 dd 31 00 50 f2 04 10 4a 00 01 10 10 44 00 01 02 10 47 00 10 bc 32 9e 00 1d d8 11 b2 86 01 74 da da e1 e4 b0 10 3c 00 01 01 10 49 00 06 00 37 2a 00 01 20 2a 01 04 2d 1a 6e 10 17 ff ff 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 0c 00 00 00 00 00 3d 16 09 04 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4a 0e 14 00 0a 00 2c 01 c8 00 14 00 05 00 19 00 7f 01 01 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 dd 07 00 0c 43 04 00 00 00
18:d6:c7:d3:2a:42 freq=2462 qual=21 noise=-95 level=-85 flags=0x0 age=0 est=1000
IEs - hexdump(len=285): 00 00 01 0c 82 84 8b 96 12 24 48 6c 0c 18 30 60 2a 01 00 00 00 01 08 82 84 8b 96 12 24 48 6c 03 01 0b 32 04 0c 18 30 60 07 06 55 53 00 01 0b 14 33 08 20 01 02 03 04 05 06 07 33 08 21 05 06 07 08 09 0a 0b 05 04 00 01 00 00 dd 1a 00 50 f2 01 01 00 00 50 f2 02 02 00 00 50 f2 02 00 50 f2 04 01 00 00 50 f2 02 30 18 01 00 00 0f ac 02 02 00 00 0f ac 02 00 0f ac 04 01 00 00 0f ac 02 00 00 dd 27 00 50 f2 04 10 4a 00 01 10 10 44 00 01 02 10 47 00 10 bc 32 9e 00 1d d8 11 b2 86 01 18 d6 c7 d3 2a 42 10 3c 00 01 01 2a 01 00 2d 1a ec 11 17 ff ff 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 0b 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4a 0e 14 00 0a 00 2c 01 c8 00 14 00 05 00 19 00 7f 08 00 00 00 01 00 00 00 00 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 dd 07 00 0c 43 00 00 00 00
c0:4a:00:d2:7a:ab freq=2422 qual=21 noise=-95 level=-85 flags=0x0 age=0 est=1000
IEs - hexdump(len=214): 00 04 53 61 62 61 01 0c 82 84 8b 96 12 24 48 6c 0c 18 30 60 2a 01 04 00 04 53 61 62 61 01 08 82 84 8b 96 12 24 48 6c 03 01 03 32 04 0c 18 30 60 07 06 55 53 00 01 0b 14 33 08 20 01 02 03 04 05 06 07 33 08 21 05 06 07 08 09 0a 0b 05 04 00 01 00 00 2a 01 04 2d 1a 6e 11 17 ff 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 0c 00 00 00 00 00 3d 16 03 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4a 0e 14 00 0a 00 2c 01 c8 00 14 00 05 00 19 00 30 18 01 00 00 0f ac 02 02 00 00 0f ac 02 00 0f ac 04 01 00 00 0f ac 02 00 00 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 dd 07 00 0c 43 04 00 00 00
be:2f:a0:4e:ac:88 freq=2412 qual=13 noise=-95 level=-89 flags=0x0 age=0 est=1000
IEs - hexdump(len=227): 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 0c 82 84 8b 96 24 30 48 6c 0c 12 18 60 2a 01 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 08 82 84 8b 96 24 30 48 6c 03 01 01 05 04 00 01 00 00 07 06 55 53 20 01 0d 1e 20 01 00 23 02 11 00 2a 01 00 32 04 0c 12 18 60 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 2d 1a 2d 00 17 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 01 00 15 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 08 04 00 00 00 00 00 00 40 dd 0a 00 17 f2 06 01 01 03 01 00 00 dd 09 00 10 18 02 01 00 1c 00 00 dd 18 00 50 f2 02 01 01 80 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
wlan0: BSS: Start scan result update 15
wlan0: BSS: Add new id 8 BSSID 18:d6:c7:d3:2a:42 SSID '' freq 2462
wlan0: BSS: Add new id 9 BSSID be:2f:a0:4e:ac:88 SSID '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' freq 2412
BSS: last_scan_res_used=4/32
Add randomness: count=61 entropy=60
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=5): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
Add randomness: count=62 entropy=61
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=5): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
Add randomness: count=63 entropy=62
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=5): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
Add randomness: count=64 entropy=63
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=5): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
wlan0: New scan results available (own=0 ext=0)
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x1049 len=6
WPS: WFA subelement id=0 len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: attr type=0x104a len=1
WPS: attr type=0x1044 len=1
WPS: attr type=0x1047 len=16
WPS: attr type=0x103c len=1
WPS: AP[0] 1c:15:1f:38:f2:f3 type=0 tries=0 last_attempt=-1 sec ago blacklist=2
WPS: AP[1] 74:da:da:e1:e4:b0 type=0 tries=0 last_attempt=-1 sec ago blacklist=0
WPS: AP[2] 18:d6:c7:d3:2a:42 type=0 tries=0 last_attempt=-1 sec ago blacklist=0
wlan0: Radio work 'scan'@0x800ca6320 done in 1.881858 seconds
wlan0: radio_work_free('scan'@0x800ca6320): num_active_works --> 0
wlan0: Postpone network selection by 58 seconds sinc
```


----------



## patovm04 (Jun 25, 2020)

I had that same usb dongle and unfortunately it wasn't supported ☹
So I bought a TL-WN725N and have been using it since


----------



## mcjames (Jun 25, 2020)

I doubt that it is not supported.
as I can see wlan0 in my ifconfig result and every time I connect the dongle I get :

```
rtwn0: detached
ugen7.2: <Realtek 802.11n NIC> at usbus7
rtwn0 on uhub0
rtwn0: <802.11n NIC > on usbus7
rtwn0: MAC/BB RTL8192EU, RF 6052 2T2R
wlan0: Ethernet address: d4:6e:0e:7f:51:67
```

But there is something serously wrong with this driver as I can't do any handshake with any AP.


`~ % ifconfig
msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8010a<TXCSUM,VLAN_MTU,TSO4,LINKSTATE>
    ether 00:25:64:4d:b2:be
    inet 192.168.0.113 netmask 0xffffff00 broadcast 192.168.0.255
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
    inet 127.0.0.1 netmask 0xff000000
    groups: lo
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether d4:6e:0e:7f:51:67
    groups: wlan
    ssid "" channel 2 (2417 MHz 11g)
    regdomain FCC country US authmode WPA1+WPA2/802.11i privacy ON
    deftxkey UNDEF txpower 30 bmiss 7 scanvalid 60 protmode CTS wme
    roaming MANUAL
    media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
    status: no carrier
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>`


----------



## Phishfry (Jun 25, 2020)

Last time I used a USB Wifi stick I had to load an additional module. wlan_amrr.ko
So try and load it and see if it helps.
`kldload wlan-amrr`


----------



## mcjames (Jun 25, 2020)

Phishfry said:


> Last time I used a USB Wifi stick I had to load an additional module. wlan_amrr.ko
> So try and load it and see if it helps.
> `kldload wlan-amrr`


`kldload: can't load wlan-amrr: No such file or directory`


----------



## a6h (Jun 25, 2020)

WN823N and bunch of other wireless USB adapter, reminds me of *Winmodems*_ (_Softmodems). They didn't even install on Linux Mint.


----------



## Phishfry (Jun 25, 2020)

mcjames said:


> kldload: can't load wlan-amrr: No such file or directory


sorry that was a typo
`kldload wlan_amrr`

This module should be built in the kernel but it is worth trying to load it.


----------



## mcjames (Jun 25, 2020)

Well I tested this dongle on OpenBSD and all linux distros you could think of. Worked perfectly.


----------



## mcjames (Jun 25, 2020)

Phishfry said:


> sorry that was a typo
> `kldload wlan_amrr`
> 
> This module should be built in the kernel but it is worth trying to load it.


didn't help. but huge thanks. cause you share your knowledge here.


----------



## Zinnia (May 23, 2021)

mcjames did you finally solve the problem?
I use the same TP-LINK TL-WN823N on freebsd 12.2 release and get the same problem.


----------



## Bogdan Vătavu (Nov 6, 2021)

I know this is an old thread, but I see no reason for starting a new one since I get the same problem on 13.0 release. Any update would be very appreciated, since this dongle is my only way to connect to the internet. Thanks!


----------



## grahamperrin@ (Nov 20, 2021)

Bogdan Vătavu said:


> … the same problem on 13.0 release. Any update would be very appreciated, …𡀦



If not yet supported in a RELEASE, then please be aware of what's on the roadmap for this year and 2022. 









						Technology Roadmap
					

https://freebsdfoundation.org/blog/technology-roadmap/  Enjoy.




					forums.freebsd.org


----------



## riemannesco (Jan 4, 2022)

Same problem here. Any solution ? The driver required seems to be available in the kernel by default. Depending on the /etc/rc.conf settings, the dongle disconnects if the parameter "SYNDHCP" or "DHCP" is given to ifconfig_wlan0.


----------



## grahamperrin@ (Jan 4, 2022)

`grep wlan0 /etc/rc.conf`

What's reported?


----------



## covacat (Jan 4, 2022)

i have a WN725N and works
performance is not great but good enough for my use (pi zero)
less than $10


----------



## grahamperrin@ (Jan 4, 2022)

covacat said:


> WN725N



Thanks, more suggestions here:









						FreeBSD: Wi-Fi: suggested adapters
					

FreeBSD: Wi-Fi: suggested adapters. GitHub Gist: instantly share code, notes, and snippets.




					gist.github.com
				




For any additional suggestion, please leave a comment in GitHub. Thanks.


----------



## riemannesco (Jan 4, 2022)

grahamperrin said:


> `grep wlan0 /etc/rc.conf`
> 
> What's reported?


it reports :


> ifconfig_wlan0="WPA SYNCDHCP"


There is a video where a guy configure this dongle, so theoretically, it should be supported. The stranger thing is that some parameters work for some people and not for other ones.


----------



## Vull (Jan 4, 2022)

riemannesco said:


> it reports :
> 
> There is a video where a guy configure this dongle, so theoretically, it should be supported. The stranger thing is that some parameters work for some people and not for other ones.


You need something more like this in your /etc/rc.conf file:

```
wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
ifconfig_wlan0_ipv6="inet6 accept_rtadv"
create_args_wlan0="country US"
```

Please try following this guide:








						Chapter 33. Advanced Networking
					

Advanced networking in FreeBSD:  basics of gateways and routes, CARP, how to configure multiple VLANs on FreeBSD, etc




					docs.freebsd.org


----------



## Andriy (Jan 5, 2022)

Please check its USB device descriptor with something like `usbconfig -d ugen4.3 dump_device_desc` where _ugenX.Y_ should correspond to the device.


----------



## Andriy (Jan 5, 2022)

To expand, problems like yours are sometimes caused by an incorrect firmware variant.
Are you sure that you have V2 version of the dongle?
It could be V3, for example.


----------



## riemannesco (Jan 5, 2022)

Indeed it is the version 3 that I got. It should be the firmware so. Just have to wait for an update I guess.


----------



## Andriy (Jan 6, 2022)

riemannesco said:


> Indeed it is the version 3 that I got. It should be the firmware so. Just have to wait for an update I guess.


So, can you share the usbconfig output?
Things don't happen by themselves if nothing is done.

P.S. According to some (not very reliable) sources V3 has RTL8192CU.


----------



## riemannesco (Jan 7, 2022)

Andriy said:


> So, can you share the usbconfig output?
> Things don't happen by themselves if nothing is done.
> 
> P.S. According to some (not very reliable) sources V3 has RTL8192CU.


yes of course.
The following command line 


> usbconfig -d ugen2.2 dump_device_desc


gives me :


> ugen2.2: <Realtek 802.11n WLAND Adapter> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
> 
> bLength = 0x0012
> bDescriptorType = 0x0001
> ...


----------



## grahamperrin@ (Jan 8, 2022)

Vull said:


> this guide:



Thanks; incidentally, FreeBSD bugs: 

261024 – regdomain.xml refers to non-existent http://ftp.ics.uci.edu/pub/ietf/http/related/iso3166.txt for a complete list of country/region codes
261025 – Advanced networking: the FreeBSD Handbook exemplifies a wrong code for setting the correct region


----------



## mark_j (Jan 8, 2022)

Some WiFi routers have a "tx power" setting with low, medium and high. Setting it to high could help.


----------



## Vull (Jan 8, 2022)

grahamperrin said:


> Thanks; incidentally, FreeBSD bugs:
> 
> 261024 – regdomain.xml refers to non-existent http://ftp.ics.uci.edu/pub/ietf/http/related/iso3166.txt for a complete list of country/region codes
> 261025 – Advanced networking: the FreeBSD Handbook exemplifies a wrong code for setting the correct region


Welcome. Also incidentally (*and perhaps too off-topic?*):

For me, `create_args_wlan0="country US"` and it has never been necessary (for me) to specify regdomain.
When I use the USB installer to configure wireless networking while installing 13.0-RELEASE, it allows me, but notably, _doesn't require me_, to specify regdomain.
regdomain is not case-sensitive. For country code US, /etc/regdomain.xml specifies rd id="fcc" but <rd id="fcc"> specifies <name>FCC</name>. I get the same results whether I use "FCC" or "fcc" for regdomain in my /etc/rc.conf file. I've tried it all three ways, just to be certain of this. Quoting from /etc/regdomain.xml, "Regdomain code gets this information with the IEEE80211_IOC_DRIVERCAPS ioctl."
At this moment in time, ftp.ics.uci.edu appears to be offline. I don't know why it's offline. ics.uci.edu is not offline. Perhaps their ftp host is down, perhaps they have taken out of service permanently, or maybe it's down for some other unknown reason. I simply don't know.
The file iso3166.txt is likely just a list of country codes, which doesn't reference any regdomain specs. https://www.iso.org/iso-3166-country-codes.html
All of this seems a bit off-topic. *Back on topic*, riemannesco's country code is probably "FR" for France so his regdomain, if specified, should be either "etsi" or "ETSI":

`country FR regdomain ETSI`



riemannesco said:


> yes of course.
> The following command line
> 
> gives me :


Far as I can tell, this device is not supported by FreeBSD, but Andriy would know better than me.





						FreeBSD Realtek 0x2357 0x0109 at DuckDuckGo
					

DuckDuckGo. Privacy, Simplified.




					duckduckgo.com


----------



## Andriy (Jan 8, 2022)

Vull said:


> Far as I can tell, this device is not supported by FreeBSD, but _*[FONT=monospace]Andriy[/FONT]*_ would know better than me.


FreeBSD does support idVendor 2357, idProduct 0109.
But it is always treated as V2. And it's possible that V2 and V3 require different firmware.
I suspect that V2 and V3 can be told apart based on bcdDevice.
But maybe V2 vs V3 difference is more subtle.
It would be great to have a descriptor dump for the V2 variant.


----------



## riemannesco (Jan 9, 2022)

Thank you everybody for your help


----------

