Comments (12)
😺 It is not something that is not documented...
- turn off network manager
sudo systemctl stop network-mamnager
- kill any potentially conflictive process
sudo kill wpa_supplicant
sudo kill dhclient
- generate the configuration file to be used with wpa_supplicant
wpa_passphrase <eSSID> <Wireless_key> >> /tmp/test.conf
(eSSID is the name of your network and you have to put the wifi key you have configured.)
It will generate something like that
network={
ssid="WiFi_XXXX"
#psk="WiFilibr3!"
psk=3af35a94a429490ea2ae3e5fa6fd970516c45566255e0bd5c2094b93f3cfac0a
}
- Launch wpa_supplicant with the configuration file
sudo wpa_supplicant -i<interface> -c /tmp/test.conf
Instead of interface put the identifier of your wifi device - Open another shell (do not close the one you've just used right now; the process with wpa_suplicant is running) and get an IP
sudo dhclient <interface>
- You should be connected. Check it (ping google for example)
Once you checked you can close the first shell (or press ctrl+c to kill the process) and to restart network-manager simply do
sudo systemctl restart network-manager
from rtl8812au.
NM tries to change MAC on every connect but something goes wrong.
Add the following lines
[device]
wifi.scan-rand-mac-address=no
at the end of the /etc/NetworkManager/NetworkManager.conf
and restart NetworkManager
sudo service NetworkManager restart
from rtl8812au.
I tried in ubuntu tonight with the trick
[device] wifi.scan-rand-mac-address=no
and it worked!
I can connect.
I won't try to understand why it affects the USB devices only.... 😺
I guess this issue could be closed as the problem with ubuntu is clearly this.
Cheers
from rtl8812au.
I observed this kind of issue with some drivers and releases.
I could connect using wpa_supplicant directly so I would say this is more a network manager thing.
Can you connect in command line to your wpa network?
from rtl8812au.
@kcdtv I don't know how to do that. Could you please give me detailed instructions?
from rtl8812au.
Thank you for the instructions. I can confirm that this process does indeed work so there must be some problem with the Network Manager in Ubuntu 17.04 which causes the authentication process to fail. I also noticed that I need to keep the terminal with the wpa_supplicant command up and running for the network to work. If I terminate this process the network stops working. The following are the messages I see when the wpa_supplicant command is executed:
Successfully initialized wpa_supplicant
wlx2c4d54032d38: Trying to associate with 38:10:d5:9b:b9:53 (SSID='Cerberus-HF' freq=5240 MHz)
wlx2c4d54032d38: Associated with 38:10:d5:9b:b9:53
wlx2c4d54032d38: WPA: Key negotiation completed with 38:10:d5:9b:b9:53 [PTK=CCMP GTK=CCMP]
wlx2c4d54032d38: CTRL-EVENT-CONNECTED - Connection to 38:10:d5:9b:b9:53 completed [id=0 id_str=]
Now, if I then restart the network manager as you suggest wpa_supplicant attempts to authenticate again but it fails:
wlx2c4d54032d38: CTRL-EVENT-DISCONNECTED bssid=38:10:d5:9b:b9:53 reason=0 locally_generated=1
wlx2c4d54032d38: CTRL-EVENT-ASSOC-REJECT status_code=1
wlx2c4d54032d38: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
wlx2c4d54032d38: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlx2c4d54032d38: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlx2c4d54032d38: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlx2c4d54032d38: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlx2c4d54032d38: Trying to associate with c8:0e:14:a7:e9:db (SSID='Cerberus-HF' freq=5220 MHz)
wlx2c4d54032d38: Associated with c8:0e:14:a7:e9:db
wlx2c4d54032d38: CTRL-EVENT-DISCONNECTED bssid=c8:0e:14:a7:e9:db reason=0 locally_generated=1
wlx2c4d54032d38: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlx2c4d54032d38: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Cerberus-HF" auth_failures=1 duration=10 reason=WRONG_KEY
wlx2c4d54032d38: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
wlx2c4d54032d38: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlx2c4d54032d38: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlx2c4d54032d38: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlx2c4d54032d38: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlx2c4d54032d38: CTRL-EVENT-SSID-REENABLED id=0 ssid="Cerberus-HF"
wlx2c4d54032d38: Trying to associate with 38:10:d5:9b:b9:53 (SSID='Cerberus-HF' freq=5240 MHz)
wlx2c4d54032d38: Associated with 38:10:d5:9b:b9:53
wlx2c4d54032d38: CTRL-EVENT-DISCONNECTED bssid=38:10:d5:9b:b9:53 reason=0 locally_generated=1
wlx2c4d54032d38: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlx2c4d54032d38: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Cerberus-HF" auth_failures=2 duration=23 reason=WRONG_KEY
and the error message says that the key is wrong.
from rtl8812au.
Sorry for the delay, I bearly use ubuntu.
I had exactly the same issue than you when i tried with ubuntu 17.01.
Network manager see perfectly my PA, the connexion process start.... and fail.
I can see that it is not able to negotiate the handshake (the PA dot is not green, as if the key was incorrect and dmesg confirms it )
The thing is that the failure happens with... all my USB device! (tried with old ralink and atheros too)
It seems that ubuntu network manager has a big instability problems (I got many crashes when i manipulate interfaces and drivers) and does not handle properly the USB wifi interfaz (the internal card: no problems)
It is definitely something that has to do with network manager and Ubuntu.
from rtl8812au.
- NetworkManager just got updated in Kali, btw
from rtl8812au.
The automatic mac change done by network manager (for scanning and connecting) goes well in Kali. since quite a while:
I added random here too
[connection]
wifi.cloned-mac-address=random
Real mac is never used.
If that would be the reason of the fail in Ubuntu I guess we could not connect with the internal interface neither... But yeah, weird things can happens too, there is nothig to loose for trying.
from rtl8812au.
There is a race condition between wpa_supplicant and the NetworkManager for hotplugged devices. It has no relations to the driver.
from rtl8812au.
@astsam do you have more information on this issue? I would appreciate any pointers on other bugs/discussions about this race condition - when I searched google this bug report was the only reference that made any sense at all, I couldn't find any other reports about the race condition.
from rtl8812au.
After inserting an USB WIFI:
- Driver is loaded, interface is created.
- The NetworkManager set a random MAC for the interface to scan APs.
- The wpa_supplicant detect the new interface and got its MAC. At this point the interface already has the random MAC assigned by the NetworkManager. For the following operations the wpa_supplicant will use this (randomly assigned) MAC.
- The NwtworkManager complete scan an restore the orignal MAC.
- During the WPA handshake the wpa_suplicant use the random MAC instead of the original one.
For an internal WIFI adapter p.2 and 3 are swapped, the wpa_supplicant get the original MAC and all works smoothly.
from rtl8812au.
Related Issues (20)
- Ubuntu 18.04(Kernel 4.15) - Make Error HOT 8
- doesnt compile on arch xu4
- Questions on the adapter AWUS036ACH
- Doesnt MAKE in kernel 4.15.0-47-generic(Ubuntu 18.04) Driver 8812au HOT 3
- Support for RTL RTL8812BU
- error on make, Manjaro HOT 3
- proc_create_data takes "proc_ops" and not "file_operations" now
- Seems to be not working on the latest Manjaro KDE Plasma version
- monitor mode support
- Support for RTL 8811AU
- No 5G connection, no way to change frequency
- Some channels are blocked with the "no IR" flag.
- astsam: look at this HOT 2
- add
- rtl8812au work on Android 11 ?
- Kernel crash on Linux Mint 21.1 Cinnamon HOT 1
- cloning
- INFO TX-POWER sudo iw wlan0 set txpower fixed 1000
- 报错
- Error 2 during make
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtl8812au.