STA断线配置WIFI AP模式失败

STA断线配置WIFI AP模式失败

我正在开发一个嵌入式Linux(5.10.21)系统,其中有一个WIFI接口可以配置为AP模式。

设置/etc/hostapd.conf和/etc/udhcpd.conf后,AP模式运行hostapd -B /etc/hostapd.conf

[   53.862708] dhd_bus_devreset: == WLAN ON ==
[   53.870238] F1 signature read @0x18000000=0x15294345
[   53.878139] F1 signature OK, socitype:0x1 chip:0x4345 rev:0x9 pkg:0x2
[   53.885492] DHD: dongle ram size is set to 819200(orig 819200) at 0x198000
[   53.892658] dhd_bus_set_default_min_res_mask: Unhandled chip id
[   53.899577] [dhd] dhd_conf_read_config : Ignore config file /firmware/config.txt
[   53.907252] [dhd] dhd_conf_set_path_params : Final fw_path=/firmware/fw_bcm43456c5_ag.bin
[   53.915717] [dhd] dhd_conf_set_path_params : Final nv_path=/firmware/nvram_ap6256.txt
[   53.923811] [dhd] dhd_conf_set_path_params : Final clm_path=/firmware/clm_bcm43456c5_ag.blob
[   53.932533] [dhd] dhd_conf_set_path_params : Final conf_path=/firmware/config.txt
[   53.941073] dhd_os_open_image: /firmware/fw_bcm43456c5_ag.bin (579388 bytes) open success
[   54.069928] dhd_os_open_image: /firmware/nvram_ap6256.txt (2440 bytes) open success
[   54.078099] NVRAM version: AP6256_NVRAM_V1.3_10092019.txt
[   54.084272] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[   54.170222] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[   54.176423] bcmsdh_oob_intr_register: HW_OOB irq=82 flags=0x4
[   54.183023] Disable tdls_auto_op failed. -1
[   54.187349] dhd_tcpack_suppress_set: TCP ACK Suppress mode 0 -> mode 1
[   54.194372] dhd_apply_default_clm: Ignore clm file /firmware/clm_bcm43456c5_ag.blob
[   54.203589] Firmware up: op_mode=0x0005, MAC=d4:9c:dd:nn:nn:nn
[   54.212310] dhd_preinit_ioctls Set scancache failed -23
[   54.225036]   Driver: 1.579.77.41.26 (r-20200429-2)
[   54.225036]   Firmware: wl0: Sep 27 2019 15:21:10 version 7.45.96.53 (5a84613@shgit) (r745790) FWID 01-54faa385 es7.c5.n4.a3
[   54.225036]   CLM: 9.2.9 (2016-02-03 04:34:31)
[   54.246510] dhd_txglom_enable: enable 1
[   54.250486] [dhd] dhd_conf_set_txglom_params : txglom_mode=multi-desc
[   54.257137] [dhd] dhd_conf_set_txglom_params : txglomsize=36, deferred_tx_len=0
[   54.264701] [dhd] dhd_conf_set_txglom_params : txinrx_thres=128, dhd_txminmax=-1
[   54.272351] [dhd] dhd_conf_set_txglom_params : tx_max_offset=0, txctl_tmo_fix=300
[   54.280106] [dhd] dhd_conf_get_disable_proptx : fw_proptx=1, disable_proptx=-1
[   54.288324] dhd_wlfc_hostreorder_init(): successful bdcv2 tlv signaling, 64
[   54.296789] dhd_pno_init: Support Android Location Service
[   54.302467] dhd_preinit_ioctls: SensorHub diabled 0
[   54.308015] dhd_preinit_ioctls failed to set ShubHub disable
[   54.314785] dhd_wl_ioctl_get_intiovar: get int iovar wnm_bsstrans_resp failed, ERR -23
[   54.322974] failed to get wnm_bsstrans_resp
[   54.327792] failed to set WNM capabilities
[   54.351658] [dhd] dhd_conf_map_country_list : CN/38
[   54.351661] [dhd] CFG80211-ERROR) wl_cfg80211_event : Event handler is not created
[   54.364522] [dhd] dhd_conf_set_country : set country CN, revision 38
[   54.376026] [dhd] dhd_conf_set_country : Country code: CN (CN/38)
[   54.386391] [dhd-wlan0] wl_android_wifi_on : Success
[   54.429838] dhd_open : the lock is released.
[   54.434265] dhd_open: Exit ret=0
[   54.448120] [dhd-wlan0] wl_cfg80211_del_station : Disconnect STA ff:ff:ff:ff:ff:ff scb_val.val 3
Using interface wlan0 with hwaddr d4:9c:dd:nn:nn:nn and ssid "test"
[   54.505831] [dhd-wlan0] wl_cfg80211_set_channel : netdev_ifidx(3), chan_type(1) target channel(1)
[   54.539449] [dhd-wlan0] wl_cfg80211_bcn_bringup_ap : Creating AP with sec=open/mfpn/none
[   54.600599] [dhd-wlan0] wl_ext_iapsta_event : [A] Link up w/o creating? (etype=16)
[   54.608417] [dhd-wlan0] wl_notify_connect_status_ap : AP/GO Link up
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED

然后我跑了ifconfig wlan0 192.168.0.1,然后udhcpd -f /etc/udhcpd.conf。然后我用手机连接了AP的SSID,但我得到了以下日志。

# [  388.690110] [dhd-wlan0] wl_ext_iapsta_event : [A] connected device 7e:93:21:xx:xx:xx
[  388.698119] [dhd-wlan0] wl_notify_connect_status_ap : connected device 7e:93:21:xx:xx:xx
[  388.706876] [dhd] CFG80211-ERROR) wl_cfg80211_change_station : WLC_SCB_AUTHORIZE sta_flags_mask not set
udhcpd: sending OFFER to 192.168.0.20
udhcpd: sending OFFER to 192.168.0.20
udhcpd: sending OFFER to 192.168.0.20
udhcpd: sending OFFER to 192.168.0.20
[  406.745381] [dhd-wlan0] wl_ext_iapsta_event : [1 times] [A] disconnected device 7e:93:21:e9:b4:38, WLC_E_DEAUTH_IND(6), reason=3
[  406.757382] [dhd-wlan0] wl_notify_connect_status_ap : [1 times] event WLC_E_DEAUTH_IND(6) status 0 reason 3
[  406.767508] [dhd-wlan0] wl_notify_connect_status_ap : [0 times] deauthenticated device 7e:93:21:xx:xx:xx
[  406.777353] [dhd-wlan0] wl_notify_connect_status_ap : disassociated device 7e:93:21:xx:xx:xx
[  406.786320] [dhd-wlan0] wl_cfg80211_del_station : Disconnect STA 7e:93:21:xx:xx:xx scb_val.val 3

udhcpd好像已经给我的手机分配了IP地址,但是出了问题,导致我的手机无法连接到AP。

我检查了目标 Linux 中的防火墙,没有启用任何内容。
如何修复这个错误?

答案1

它需要wpa=2在 /etc/hostapd.conf 中启用。
这样手机就可以连接到嵌入式Linux系统中的AP了。

相关内容