ivanovborislav / rtl8188eu

Realtek RTL8188EU v5.13.3 (2021-06-15) Wireless Lan Driver for Linux
GNU General Public License v2.0
113 stars 29 forks source link

OpenWrt handshake timeout problem (Reason 15) #14

Open uberf0x opened 1 year ago

uberf0x commented 1 year ago

Hi again, i ran into another problem while using my adapter in client mode on OpenWrt 21.02.0 r16279-5cc0535800. Initial AP connection works fine but an attempt to change station (Edit->Save/Apply) leads to wireless authentication error and disconnection. The same goes to Restart or Disable/Enable radio via LuCI interface.

RTW: rtw_cfg80211_unlink_bss(): cfg80211_unlink AP-name!! RTW: rtw_cfg80211_indicate_disconnect(wlan2) ,reason = 15 RTW: rtw_cfg80211_indicate_disconnect(wlan2) call cfg80211_disconnected, reason:15

Reason 15 means 4-way handshake timeout. But the same connection goes back online after reboot, so WPA key is valid. Also it's possible to revive a connection by reloading the module rmmod 8188eu insmod 8188eu. Nevertheless, the situation when a client connection successfully established and its AP restarted does not lead to the issue.

Besides, there is no signal strength and bitrate shows up for the radio in LuCI Wireless Overview regardless of connection state. Though this is a minor compared to handshake timeout issue.

uberf0x commented 1 year ago

I've tested the driver in AP mode on OpenWrt and found the issue is present too. Also my tests showed that the issue in its turn caused by iw dev del issue. For example, you can connect via ssh as client using wpa supplicant, then сhange its config and reconnect as much as you want. But if you delete/add interface using iw (what OpenWrt does internally when you edit settings via LuCI) the next connection will fail with reason 15. The same with AP mode. So even if you use OpenWrt version which does not hang on iw dev wlanN del you'll encounter some weird usage behavior later on. The only way to avoid this at the moment is to patch mac80211.sh as described here: https://github.com/ivanovborislav/rtl8188eu/issues/12#issuecomment-1462164617