Solved Issues connecting to internet, Wlan0 no carrier

Hi guys, I'm having trouble getting my TP-Link 822n Version 5 (with the RTL8192EU chipset) to get connected to the internet. The driver has been loaded and the Wireless Network program detects wireless networks but on boot up, I get no carrier when I do:

ifconfig

Code:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 50:3e:aa:5d:6f:71
    groups: wlan
    ssid "" channel 11 (2462 MHz 11g ht/20)
    regdomain FCC country US 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 wme roaming MANUAL
    media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
    status: no carrier
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Here are my conf files;

/etc/wpa_supplicant.conf

Code:
network={
        ssid="network"
        psk="mypass"       
}

/boot/loader.conf

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

/etc/rc.conf

Code:
wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"

dmesg

Code:
rtwn0 on uhub0
rtwn0: <802.11n NIC > on usbus0
rtwn0: MAC/BB RTL8192EU, RF 6052 2T2R

uname -a

Code:
FreeBSD NomadBSD 12.0-RELEASE-p3 FreeBSD 12.0-RELEASE-p3 r346458 NOMADBSD  amd64
 
Hi I've tried in Vanilla FreeBSD using the installer. The installer detects networks but is unable to connect them, this was FreeBSD 13 I think.
 
ifconfig

ssid "" channel 11 (2462 MHz 11g ht/20)
There is no ssid displayed.

In /etc/wpa_supplicant.conf
Code:
network={
        ssid="network"
        psk="mypass"       
}
have you on purpose set "network" and "mypass" to conceal the real settings while posting here or are these actual settings?

If they are actual settings, replace “network” with the ssid provided/set on the router, “mypass" with the password of the network. Take notice the ssid is case sensitive, set it as is set on the router, if you are not sure run ifconfig wlan0 list scan and check how your wlan network ssid is displayed . You might want to conceal the password if you plan to post the wpa_supplicant.conf file here again.
 
Yeah that's done on purpose to conceal my password. It's strange how it's not showing my ssid on ifconfig. The right ssid and password is definitely in my /etc/wpa_supplicant.conf

When I do;

service netif restart

Code:
Created wlan(4) interfaces: wlan0.
wpa_supplicant already running? (pid=2980).
Starting dhclient.
Cannot open or create pidfile: No such file or directory
wlan0: no link .............. giving up
/etc/rc.d/dhclient: WARNING: failed to start dhclient

and

ifconfig wlan0 list scan

Code:
SSID/MESH ID                      BSSID              CHAN RATE    S:N     INT CAPS
SKY1552D                          90:21:06:15:7e:91    1   54M  -87:-95   100 EP   RSN BSSLOAD HTCAP WPS WME
VM4597734                         48:d3:43:74:c0:e9    6   54M  -90:-95   100 EPS  HTCAP WME ATH WPA RSN WPS
ubnt                              78:8a:20:f4:45:30   11   54M  -83:-95   100 EPS  BSSLOAD HTCAP WME ATH RSN WPA
 
Does it make a difference when setting in /etc/rc.conf

Code:
ifconfig_wlan0="WPA DHCP"
or
ifconfig_wlan0="DHCP
instead of “WPA SYNCDHCP”? (After modification run service netif restart.)
 
I'll have a try and see if I have any luck with that fix and I'll report back. Thanks T-Daemon :).
 
You could also experiment with these settings in /etc/wpa_supplicant.conf.
Code:
eapol_version=2

network={

...
scan_ssid=1

}
 
:(. No luck still. I'm still getting no carrier on wlan0. Any suggestions; perhaps with this particular USB, FreeBSD doesn't like it.
 
Try what the handbook in 31.3.8. Troubleshooting suggests:
  1. If using a security protocol such as WPA or WEP, configure the access point for open authentication and no security to see if traffic will pass. If you get no results:
  2. Run wpa_supplicant(8) with debugging enabled (for better overview record the debugging messages with script(1). There used to be -f option for log output to file in wpa_supplicant(8), but not anymore):
script wpa-dbg.txt
wpa_supplicant -i wlan0 -d -c /etc/wpa_supplicant.conf

(if necessary, -dd will give more verbose debugging)
Let it run like 30 seconds or more,
kill wpa_supplicant debugging with ctrl+C,
kill script with ctrl+D,
post a copy of the debugging.
 
I have a D-Link DWA-131 E1 it uses the same chipset.

Added
Code:
wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"

To /etc/rc.conf

Nothing added to /boot/loader.conf

And configured it using net-mgmt/wifimgr/ I see it comes preinstalled in NomadBSD. Have you tried it,?

After using it my /etc/wpa_supplicant.conf:

Code:
# /etc/wpa_supplicant.conf written by wifimgr(8)

network={
        ssid="IN...."
        bssid=f4:...
        key_mgmt=WPA-PSK
        proto=RSN
        psk="To..."
}
 
Thanks for all your help guys, really appreciate it. I'm still having problems and no carrier :(. Output from ;
script wpa-dbg.txt

wpa_supplicant -i wlan0 -d -c /etc/wpa_supplicant.conf

Code:
Script started on Mon Apr 29 22:14:25 2019
root@NomadBSD:/home/nomad # wpa_suppkl  [K  [Klicant -i wlan0 -d -c /etc/wpa_supplki  [K  [Kicant.co  nf
wpa_supplicant v2.6
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
wpa_driver_bsd_capa: drivercaps=0x0591c541,cryptocaps=0x0000000b
Add interface wlan0 to a new radio N/A
wlan0: Own MAC address: 50:3e:aa:5d:6f:71
bsd_set_key: alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=0
bsd_set_key: alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=1
bsd_set_key: alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=2
bsd_set_key: alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=3
wpa_driver_bsd_set_countermeasures: enabled=0
wlan0: RSN: flushing PMKID list in the driver
wlan0: State: DISCONNECTED -> INACTIVE
wlan0: WPS: UUID based on MAC address: d17a653f-a2cf-570c-a935-79bc2c577dc2
ENGINE: Loading dynamic engine
ENGINE: Loading dynamic engine
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
wlan0: Added interface wlan0
wlan0: State: INACTIVE -> DISCONNECTED
EAPOL: disable timer tick
^Cwlan0: Removing interface wlan0
wlan0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=00:00:00:00:00:00 reason=3 state=DISCONNECTED
wlan0: State: DISCONNECTED -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_bsd_set_countermeasures: enabled=0
wlan0: WPA: Clear old PMK and PTK
wlan0: Cancelling scan request
wlan0: Cancelling authentication timeout
HS20: Delete all stored icons
Remove interface wlan0 from radio
Remove radio
wpa_driver_bsd_set_wpa: enabled=0
wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
bsd_set_opt_ie: set WPA+RSN ie (len 0)
wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
bsd_set_opt_ie: set WPA+RSN ie (len 0)
wlan0: CTRL-EVENT-TERMINATING
root@NomadBSD:/home/nomad # ^D  exit

Script done on Mon Apr 29 22:16:01 2019

My updated /etc/wpa_supplicant.conf:;

Code:
network={
        ssid="ubnt"
        bssid=
        key_mgmt=WPA-PSK
        proto=RSN
        psk="password"
}
 
I've found the the issue. By the looks of it the TP-link 822n v5, although it's chipset is supported; it's unable to use WPA-PSK. This happened with a similar NIC, the TP-link 821 v5. It was recognised but would not authenticate using WPA-PSK. This is where I found it;

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

A quote from the bug report;

I just found out that the WN821NV5 is unable to connect with WPA-PSK. I only tested with an unencrypted access point. The WN722N connects without problems with the same configuration files. I get no error reports in dmesg, ifconfig shows

wlan0: flags=8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 18:d6:c7:15:6e:42
inet6 fe80::1ad6:c7ff:fe15:6e42%wlan0 prefixlen 64 scopeid 0x3
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g (autoselect)
status: no carrier
ssid "" channel 6 (2437 MHz 11g ht/20)
regdomain ETSI country DE 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 wme roaming MANUAL
groups: wlan

ifconfig shows the desired network at S:N -65:-95 but wpa_cli is unable to connect: Authentication timed out.

I will try to get some debug info and play with hardware crypto, etc.

Kai-Uwe

I'm going to mark this issue as resolved and see if I can file a bug report 😃.

Plus under rtwn_usb(4), the TP-link 822n v5 is not listed but the TP-link 821n v5 is.
 
Back
Top