RinCat / RTL88x2BU-Linux-Driver

Realtek RTL88x2BU WiFi USB Driver for Linux
GNU General Public License v2.0
1.25k stars 196 forks source link

Unable to connect reliably to WPA2/PEAP university network #110

Open ZakSN opened 2 years ago

ZakSN commented 2 years ago

I have a generic RLT88x2BU based USB Wi-Fi adapter Amazon link, and I can't get it to reliably connect to my university's WPA2/PEAP network.

some context:

System information:

# output of uname -a
Linux zaks-laptop 5.14.16-arch1-1 #1 SMP PREEMPT Tue, 02 Nov 2021 22:22:59 +0000 x86_64 GNU/Linux

attached are the tail of the output of the commands:

sudo dmesg --human -P

and

journalctl -x -n100 NM_CONNECTION=ab7ac2d7-8d07-4b30-be5e-fd6c0c7a5bf9 + NM_DEVICE=wlan1

respectively [EDIT]: see new logs below ~dmesg.log~ ~journal.log~

Note that the above logs were collected after unplugging a working Wi-Fi adapter, and then plugging in the RTL88x2BU based adapter. As such there may be some garbage at the beginning of these files. (hopefully all of the relevant context is included)

What should I try as a next debugging step? [edit] I read the README, and I think I should've turned up the debug level before capturing logs, so I re ran the commands above, but this time after running echo 5 > /proc/net/rtl88x2bu/log_level

the new logs are here: dmesg_debug_5.log journal_debug_5.log

RinCat commented 2 years ago

Looks like you are trying to connect restricted WiFi channels, and got timeout. You can try use 2.4GHz WiFi or use common available channel like 36 for 5GHz.

ZakSN commented 2 years ago

changing the network manager connection configuration to specify a frequency and a band doesn't seem to allow me to connect.

I ran nmcli -f ALL dev wifi, and looked for a 5GHz channel with with a high signal strength, and then modified my network manager connection to use that frequency and channel. This produced the same result as before. the Journal still has the messages about wifi association taking too long

RinCat commented 2 years ago

Which 5G channel you are using?

ZakSN commented 2 years ago

I saw that ~channel 11~ had a high signal strength so I tried to connect to that. does the chipset only support some 5GHz channels?

EDIT: I meant 2.4GHz channel 11. I tried with 5 GHz channel 104, see below

RinCat commented 2 years ago

No, it support both 2.4G and 5G.

ZakSN commented 2 years ago

that's what I thought. scanning with nmcli seems to pick up both 5GHz and 2.4GHz connections

RinCat commented 2 years ago

But some 5G channels are restricted by regulations, which you may not able to use them if you are in some countries.

ZakSN commented 2 years ago

here's a screen cap of the output of nmcli -f ALL dev wifi, showing some of the channels that the RTL88xBU2 dongle can see 2021-11-06-212607_1363x664_scrot

There are some 5GHz and some 2.4GHz channels.

attempting to connect to e.g. 5GHz channel 104 doesn't work.

(In my previous comment I mentioned connecting to 5GHz channel 11, this was a mistake, I meant 2.4GHz channel 11. I've tried again with 5GHz channel 104, and got the same result)

RinCat commented 2 years ago

You should try connect to channel 11. If that failed, there may be an issue in PEAP. But I current do not have eduroam nearby, so I cannot test that.

ZakSN commented 2 years ago

I tried again with 2.4GHz channel 11, and was not able to connect, despite being able to see the connection in nmcli.

I'm sure that the PEAP credentials are correct since I can connect to the network using those credential and a different wifi adapter.

the other wifi adapter does not see 2.4GHz channel 11, so I can't connect to it with the other adapter.

ZakSN commented 2 years ago

it seems to always fail in the activation phase with the message [1636261340.5003] device (wlan1): Activation: (wifi) association took too long, I'm not sure which end controls that timeout. i.e. can I change the timeout in network manager, or is the access point (which I don't control) deciding to reset the timer

RinCat commented 2 years ago

That timeout usually means something incompatible, like try to use a different channel or use unsupported encryption or handshake. You may try get wpa_supplicant logs.