New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.1.5 for 8812au and 8814au cannot authorise on Ubuntu 17.04 #36

Open
paspro opened this Issue May 19, 2017 · 12 comments

Comments

Projects
None yet
5 participants
@paspro

paspro commented May 19, 2017

I have a problem with the v5.1.5 driver using either an 8812au or an 8814au device on Ubuntu 17.04. The authorisation process when WPA2 is enabled fails and the system keeps asking for the password. If I disable the authorisation on the router then there is no such problem. The driver worked on Ubuntu 16.10 before I upgraded.

@kcdtv

This comment has been minimized.

Show comment
Hide comment
@kcdtv

kcdtv May 19, 2017

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?

kcdtv commented May 19, 2017

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?

@paspro

This comment has been minimized.

Show comment
Hide comment
@paspro

paspro May 19, 2017

@kcdtv I don't know how to do that. Could you please give me detailed instructions?

paspro commented May 19, 2017

@kcdtv I don't know how to do that. Could you please give me detailed instructions?

@kcdtv

This comment has been minimized.

Show comment
Hide comment
@kcdtv

kcdtv May 20, 2017

😺 It is not something that is not documented...

  1. turn off network manager
    sudo systemctl stop network-mamnager
  2. kill any potentially conflictive process
    sudo kill wpa_supplicant
    sudo kill dhclient
  3. 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
}

  1. 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
  2. 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>
  3. 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

kcdtv commented May 20, 2017

😺 It is not something that is not documented...

  1. turn off network manager
    sudo systemctl stop network-mamnager
  2. kill any potentially conflictive process
    sudo kill wpa_supplicant
    sudo kill dhclient
  3. 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
}

  1. 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
  2. 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>
  3. 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
@paspro

This comment has been minimized.

Show comment
Hide comment
@paspro

paspro May 22, 2017

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.

paspro commented May 22, 2017

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.

@kcdtv

This comment has been minimized.

Show comment
Hide comment
@kcdtv

kcdtv Jun 18, 2017

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.

kcdtv commented Jun 18, 2017

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.

@astsam

This comment has been minimized.

Show comment
Hide comment
@astsam

astsam Jun 23, 2017

Owner

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

Owner

astsam commented Jun 23, 2017

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

@kimocoder

This comment has been minimized.

Show comment
Hide comment
@kimocoder

kimocoder Jun 24, 2017

  • NetworkManager just got updated in Kali, btw

kimocoder commented Jun 24, 2017

  • NetworkManager just got updated in Kali, btw
@kcdtv

This comment has been minimized.

Show comment
Hide comment
@kcdtv

kcdtv Jun 25, 2017

The automatic mac change done by network manager (for scanning and connecting) goes well in Kali. since quite a while:
seleccion_405
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.

kcdtv commented Jun 25, 2017

The automatic mac change done by network manager (for scanning and connecting) goes well in Kali. since quite a while:
seleccion_405
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.

@kcdtv

This comment has been minimized.

Show comment
Hide comment
@kcdtv

kcdtv Jul 7, 2017

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

kcdtv commented Jul 7, 2017

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

@astsam

This comment has been minimized.

Show comment
Hide comment
@astsam

astsam Jul 18, 2017

Owner

There is a race condition between wpa_supplicant and the NetworkManager for hotplugged devices. It has no relations to the driver.

Owner

astsam commented Jul 18, 2017

There is a race condition between wpa_supplicant and the NetworkManager for hotplugged devices. It has no relations to the driver.

@astsam astsam closed this Jul 18, 2017

@tdaitx

This comment has been minimized.

Show comment
Hide comment
@tdaitx

tdaitx Jul 18, 2017

@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.

tdaitx commented Jul 18, 2017

@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.

@astsam

This comment has been minimized.

Show comment
Hide comment
@astsam

astsam Jul 30, 2017

Owner

After inserting an USB WIFI:

  1. Driver is loaded, interface is created.
  2. The NetworkManager set a random MAC for the interface to scan APs.
  3. 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.
  4. The NwtworkManager complete scan an restore the orignal MAC.
  5. 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.

Owner

astsam commented Jul 30, 2017

After inserting an USB WIFI:

  1. Driver is loaded, interface is created.
  2. The NetworkManager set a random MAC for the interface to scan APs.
  3. 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.
  4. The NwtworkManager complete scan an restore the orignal MAC.
  5. 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.

@astsam astsam reopened this Jul 30, 2017

ShotTard pushed a commit to ShotTard/rtl8812au that referenced this issue Nov 9, 2017

Merge pull request #36 from kimocoder/v5.1.5
* Added VHT capabilities and HT Greenfield capability
* Removed some spaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment