저는 AP 모드에서 구성할 수 있는 WIFI 인터페이스가 있는 임베디드 Linux(5.10.21) 시스템을 개발 중입니다.
/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에서 활성화 해야 합니다 .
이런 방식으로 휴대폰은 임베디드 리눅스 시스템의 AP에 연결할 수 있습니다.