lwfinger/rtl8192cu

Problem with hostapd (rtl8188cus, Linux kernel 3.20 32bit)

ChangmingTian opened this issue · 1 comments

I've built and insmod the driver without any problems with linux kernel 3.20 32bit
AP is visible but I can't connect to it If WPA is enabled.
It works well in AP mode with an unencrypted network.

I have followed this advice,but It is not work
lwfinger/rtl8188eu#94
ajeet17181 commented on 7 Apr 2015
I encountered the same issue and found that the sizeof struct ieee_param in kernel driver is 60 where as in hostapd it is 64. if I comment out following lines in rtw_set_encryption in os_dep/ioctl_linux.c (line number 4880) file everything works fine. I am able to connect with wpa2 and with WEP too.

if (param_len != sizeof(struct ieee_param) + param->u.crypt.key_len) {
ret = -EINVAL;
goto exit;
}

insmod driver
root@SBC8600:# rmmod rtl8192cu
usbcore: deregistering interface driver rtl8192cu
rtw_cmd_thread: DriverStopped(1) SurpriseRemoved(0) break at line 482
root@SBC8600:
# insmod /mnt/rtl8192cu.ko
usbcore: registered new interface driver rtl8192cu
root@SBC8600:# usb 1-1.2: USB disconnect, device number 4
usb 1-1.2: new high-speed USB device number 7 using musb-hdrc
usb 1-1.2: New USB device found, idVendor=0bda, idProduct=8176
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.2: Product: 802.11n WLAN Adapter
usb 1-1.2: Manufacturer: Realtek
usb 1-1.2: SerialNumber: 00e04c000001
hostapd start
root@SBC8600:
# /mnt/hostapd /mnt/hostapd.conf
Configuration file: /mnt/hostapd.conf
drv->ifindex=10
l2_sock_recv==l2_sock_xmit=0x0x67630
Failed to request a scan of neighboring BSSes
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
Using interface wlan0 with hwaddr 00:1d:43:e0:28:ad and ssid 'test'
rtl871x_set_wps_assoc_resp_ie
rtl871x_set_wps_beacon_ie
rtl871x_set_wps_probe_resp_ie
rtl871x_set_beacon_ops
rtl871x_set_hidden_ssid_ops
ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument

As you learned, struct ieee_param is not wrong in this driver.

This driver is provided as a service. My only guarantee is that it will compile. If you want/need this driver to work in encrypted AP mode, you will need to find someone that you can pay to debug it. I have no time for such efforts.