rtl8188eu icon indicating copy to clipboard operation
rtl8188eu copied to clipboard

Doesn't work in AP mode

Open ukleinek opened this issue 2 years ago • 2 comments

Hello,

it might be a PEBKAC problem, but I stare at my work for quite some time and don't see the problem.

I installed 775137f273ed on an i.MX25 running Linux 5.15. It can operate the wifi stick in STA mode (i.e. iwlist wlan0 scan sees the wifi networks available nearby), but when starting hostapd, I get:

root@CI4xx0:~ hostapd -dd -B /etc/hostapd/hostapd-lwfinger.conf 
random: getrandom() support available
Configuration file: /etc/hostapd/hostapd-lwfinger.conf
ctrl_interface_group=0
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=6 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 6 iftype 2 (STATION)
nl80211: Failed to set interface 6 to mode 2: -19 (No such device)
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0xd3a958)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0xd3a958)
wlan0: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss wlan0
wlan0: AP-DISABLED 
hostapd_cleanup(hapd=0xd3e280 (wlan0))
wlan0: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0xd3a958)
hostapd_interface_free: free hapd 0xd3e280
hostapd_cleanup_iface(0xd3a958)
hostapd_cleanup_iface_partial(0xd3a958)
hostapd_cleanup_iface: free iface=0xd3a958

The hostapd config file content is based on the stuff the control_ap script uses. (However I dropped driver= which makes me doubt if control_ap is a good source to copy from).

root@CI4xx0:~ cat /etc/hostapd/hostapd-lwfinger.conf
auth_algs=1
beacon_int=100
country_code=US
ctrl_interface_group=0
ctrl_interface=/var/run/hostapd
dtim_period=2
fragm_threshold=2346
#ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935][DSSS_CCK-40]
#ieee80211d=1
#ieee80211n=1
ignore_broadcast_ssid=0
logger_stdout=-1
logger_stdout_level=2
logger_syslog=-1
logger_syslog_level=2
macaddr_acl=0
max_num_sta=255
rts_threshold=2347
wmm_ac_be_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmax=10
wmm_ac_be_cwmin=4
wmm_ac_be_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_bk_aifs=7
wmm_ac_bk_cwmax=10
wmm_ac_bk_cwmin=4
wmm_ac_bk_txop_limit=0
wmm_ac_vi_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmax=4
wmm_ac_vi_cwmin=3
wmm_ac_vi_txop_limit=94
wmm_ac_vo_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_cwmin=2
wmm_ac_vo_txop_limit=47
wmm_enabled=1
interface=wlan0
ssid=test
hw_mode=g
channel=11
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
wpa_passphrase=87654321

Up to now I didn't look into the driver code, so cannot say where the -19 (= ENODEV) comes from. Any debug hints are appreciated.

Thanks

ukleinek avatar Apr 13 '22 10:04 ukleinek

I have not forgotten about this issue, but I have relatively little news.

In branch v5.2.2.4 using the nl80211 driver interface, the control_ap script creates an AP that is issuing beacons, but no STA (at least not my phone) can connect.

In branch master, the script runs OK, but I see no beacons. I will continue to work on the issue.

lwfinger avatar Apr 17 '22 19:04 lwfinger

At some point in time this was working for me. However I have problems reconstructing the involved kernel and driver versions.

I wonder if there is something I can sensibly do here to bring this topic forward.

ukleinek avatar Apr 20 '22 08:04 ukleinek