Solved Wireless USB adapter TP-Link TL-WN823N now detected, still fails, disappears after wpa_supplicant

Hi,

I'm trying to use a Mini Wireless USB adapter TP-Link TL-WN823N on my PC. At first it didn't seem to be detected at all. After some changes to my configuration following a similar (successful) thread it is now detected (see conf files attached), and detects the two Wifis in my house correctly, but still cannot get an IP from either one :
dhclient says :
wlan0: no link .............. giving up
wpa_supplicant (-Dbsd -c wpa_supplicant.conf -i wlan0) apparently fails to authenticate and times out (see messages.txt and daemon.txt, which contain the last 500 lines of both logs)
What is interesting is it seems wpa_supplicant make the interface "disappear" (confirmed with ifconfig) :
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]: Network is down
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Error reading packet, has device disappeared?
Error reading packet, has device disappeared?
wlan0: CTRL-EVENT-DSCP-POLICY clear_all
ioctl[SIOCS80211, op=25, val=0, arg_len=0]: Device not configured
wlan0: CTRL-EVENT-DSCP-POLICY clear_all
ioctl[SIOCS80211, op=95, val=208, arg_len=0]: Device not configured
ioctl[SIOCS80211, op=17, val=0, arg_len=0]: Device not configured
ioctl[SIOCS80211, op=26, val=0, arg_len=0]: Device not configured
ioctl[SIOCGIFFLAGS]: Device not configured
ioctl[SIOCS80211, op=17, val=1, arg_len=0]: Device not configured
ioctl[SIOCS80211, op=26, val=2, arg_len=0]: Device not configured
ioctl[SIOCS80211, op=16, val=2, arg_len=0]: Device not configured
wlan0: CTRL-EVENT-TERMINATING
After that, dhclient shows :
ifconfig: interface wlan0 does not exist
wlan0: not found
exiting.
I have had no luck with static IPs either (see commented lines in rc.conf)

Here is ifconfig output after booting (I have seen ALTICE_XXXX in "ssid" at some point, but I can't remember when)
em0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4e524bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,LRO,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS,MEXTPG>
ether 00:22:4d:99:f6:8d
media: Ethernet autoselect
status: no carrier
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=0
ether 24:2f:d0:8a:32:44
groups: wlan
ssid "" channel 3 (2422 MHz 11g ht/20)
regdomain ETSI country FR authmode WPA1+WPA2/802.11i privacy ON
deftxkey UNDEF txpower 30 bmiss 7 scanvalid 60 protmode CTS ht20
ampdulimit 8k ampdudensity 16 shortgi -stbc -ldpc -uapsd wme
roaming MANUAL
parent interface: rtwn0
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
I don't get what is the problem as my configuration seems correct on paper, and the dongle is detected and finds the Wifis now. Any idea would be welcome :)
 

Attachments

I gave up trying to setup a similar device some time ago(RTL8192EU chipset). I remember that when it disappeared it wouldn't work again until reboot and even when it worked it was very slow.

Try SYNCDHCP in rc.conf and key_mgmt=WPA-PSK in wpasupplicant.conf
 
your dmesg is showing the device stalling out and falling off the bus. Is it plugged into a hub? or directly into the machine?
Code:
Mar 18 19:03:31 fb33 kernel: rtwn0 on uhub4
Mar 18 19:03:31 fb33 kernel: rtwn0: <Realtek 802.11n NIC, class 0/0, rev 2.10/2.00, addr 4> on usbus2
Mar 18 19:03:31 fb33 kernel: rtwn0: MAC/BB RTL8192EU, RF 6052 2T2R
Mar 18 19:03:31 fb33 kernel: wlan0: Ethernet address: 24:2f:d0:8a:32:44
Mar 18 19:07:36 fb33 kernel: ugen2.4: <Realtek 802.11n NIC> at usbus2 (disconnected)
Mar 18 19:07:36 fb33 kernel: rtwn0: at uhub4, port 6, addr 4 (disconnected)
Mar 18 19:07:37 fb33 kernel: rtwn0: r92e_power_off: failed to block Tx queues
Mar 18 19:07:37 fb33 kernel: rtwn0: detached
Mar 18 19:07:37 fb33 kernel: usb_alloc_device: set address 4 failed (USB_ERR_STALLED, ignored)
Mar 18 19:07:39 fb33 kernel: usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_STALLED
Mar 18 19:07:39 fb33 kernel: usbd_req_re_enumerate: addr=4, set address failed! (USB_ERR_STALLED, ignored)
Mar 18 19:07:41 fb33 kernel: usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_STALLED
Mar 18 19:07:42 fb33 kernel: usbd_req_re_enumerate: addr=4, set address failed! (USB_ERR_STALLED, ignored)
Mar 18 19:07:44 fb33 kernel: usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_STALLED
Mar 18 19:07:44 fb33 kernel: usbd_req_re_enumerate: addr=4, set address failed! (USB_ERR_STALLED, ignored)
Mar 18 19:07:46 fb33 kernel: usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_STALLED
Mar 18 19:07:47 fb33 kernel: usbd_req_re_enumerate: addr=4, set address failed! (USB_ERR_STALLED, ignored)
Mar 18 19:07:49 fb33 kernel: usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_STALLED
Mar 18 19:07:49 fb33 kernel: ugen2.4: <Unknown > at usbus2 (disconnected)
Mar 18 19:07:49 fb33 kernel: uhub_reattach_port: could not allocate new device
 
Thanks for all your answers, I did :
- plug the dongle in another USB port (it was on the PC directly)
- add SYNCDHCP to rc.conf
And most importantly (I think) :
- redo my wpa_supplicant.conf with wpa_passphrase
I think it is probably the last one that solved it, since I removed SYNCDHCP later and it was still working. I'll double check later if it could be the port but I have plugged a keyboard and mouse in that port and it seemed to be working.
 
Back
Top