ivanovborislav/rtl8188eu

OpenWrt handshake timeout problem (Reason 15)

uberf0x opened this issue · 1 comments

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.

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:
#12 (comment)