[BUG]softap 5g band 不能被其他设备搜索到

查看log

12-31 09:17:06.617 D/HostapdHal( 1273): Successfully triggered start of hostapd using HIDL
12-31 09:17:06.681 E/hostapd (11587): debug, set loglevel
12-31 09:17:06.682 I/hostapd (11587): Processing hidl events on FD 5
12-31 09:17:06.684 I/HostapdHal( 1273): IServiceNotification.onRegistration for: android.hardware.wifi.hostapd@1.0::IHostapd, default preexisting=false
12-31 09:17:06.687 I/android_os_HwBinder( 1273): HwBinder: Starting thread pool for getting: android.hardware.wifi.hostapd@1.0::IHostapd/default
12-31 09:17:06.693 I/android_os_HwBinder( 1273): HwBinder: Starting thread pool for getting: vendor.qti.hardware.wifi.hostapd@1.0::IHostapdVendor/default
12-31 09:17:06.999 D/hostapd (11587): qsap command: softap qccmd set ssid2=5a7a7a7a3134323335
12-31 09:17:07.004 D/hostapd (11587): qsap command: softap qccmd set security_mode=3
12-31 09:17:07.025 D/hostapd (11587): qsap command: softap qccmd set wpa_key_mgmt=WPA-PSK
12-31 09:17:07.027 D/hostapd (11587): qsap command: softap qccmd set wpa_passphrase=12345678
12-31 09:17:07.029 D/hostapd (11587): qsap command: softap qccmd set rsn_pairwise=CCMP
12-31 09:17:07.033 D/hostapd (11587): qsap command: softap qccmd set acs_exclude_dfs=0
12-31 09:17:07.035 D/hostapd (11587): qsap command: softap qccmd set channel=0
12-31 09:17:07.037 D/hostapd (11587): qsap command: softap qccmd set ht_capab=[SHORT-GI-20] [GF] [DSSS_CCK-40] [LSIG-TXOP-PROT]
12-31 09:17:07.040 D/hostapd (11587): qsap command: softap qccmd set vht_oper_chwidth=0
12-31 09:17:07.042 D/hostapd (11587): qsap command: softap qccmd set hw_mode=a
12-31 09:17:07.052 D/hostapd (11587): qsap command: softap qccmd set ht_capab=[HT40+]
12-31 09:17:07.054 D/hostapd (11587): qsap command: softap qccmd set vht_oper_chwidth=1
12-31 09:17:07.056 D/hostapd (11587): qsap command: softap qccmd set interface=wlan0
12-31 09:17:07.059 D/hostapd (11587): qsap command: softap qccmd set driver=nl80211
12-31 09:17:07.059 D/hostapd (11587): qsap command: softap qccmd set ctrl_interface=/data/vendor/wifi/hostapd/ctrl
12-31 09:17:07.059 D/QCSDK   (11587): argv[3] (ctrl_interface=/data/vendor/wifi/hostapd/ctrl)
12-31 09:17:07.059 D/QCSDK   (11587): CMD INPUT  [ set ctrl_interface=/data/vendor/wifi/hostapd/ctrl][256]
12-31 09:17:07.060 E/QCSDK   (11587): Cmd: ctrl_interface Argument :/data/vendor/wifi/hostapd/ctrl
12-31 09:17:07.060 D/QCSDK   (11587): cmd=ctrl_interface, Val:/data/vendor/wifi/hostapd/ctrl, INI:0
12-31 09:17:07.060 D/QCSDK   (11587): Updated:ctrl_interface=/data/vendor/wifi/hostapd/ctrl
12-31 09:17:07.062 D/hostapd (11587): qsap command: softap qccmd set ieee80211n=1
12-31 09:17:07.065 D/hostapd (11587): qsap command: softap qccmd set ieee80211ac=1
12-31 09:17:07.067 D/hostapd (11587): qsap command: softap qccmd set ignore_broadcast_ssid=0
12-31 09:17:07.069 D/hostapd (11587): qsap command: softap qccmd set wowlan_triggers=any
12-31 09:17:07.071 D/hostapd (11587): qsap command: softap qccmd set accept_mac_file=/data/vendor/wifi/hostapd/hostapd.accept
12-31 09:17:07.071 D/QCSDK   (11587): argv[3] (accept_mac_file=/data/vendor/wifi/hostapd/hostapd.accept)
12-31 09:17:07.071 D/QCSDK   (11587): CMD INPUT  [ set accept_mac_file=/data/vendor/wifi/hostapd/hostapd.accept][256]
12-31 09:17:07.071 E/QCSDK   (11587): Cmd: accept_mac_file Argument :/data/vendor/wifi/hostapd/hostapd.accept
12-31 09:17:07.071 D/QCSDK   (11587): cmd=accept_mac_file, Val:/data/vendor/wifi/hostapd/hostapd.accept, INI:0
12-31 09:17:07.072 D/QCSDK   (11587): Updated:accept_mac_file=/data/vendor/wifi/hostapd/hostapd.accept
12-31 09:17:07.073 D/hostapd (11587): qsap command: softap qccmd set deny_mac_file=/data/vendor/wifi/hostapd/hostapd.deny
12-31 09:17:07.073 D/QCSDK   (11587): argv[3] (deny_mac_file=/data/vendor/wifi/hostapd/hostapd.deny)
12-31 09:17:07.073 D/QCSDK   (11587): CMD INPUT  [ set deny_mac_file=/data/vendor/wifi/hostapd/hostapd.deny][256]
12-31 09:17:07.073 E/QCSDK   (11587): Cmd: deny_mac_file Argument :/data/vendor/wifi/hostapd/hostapd.deny
12-31 09:17:07.073 D/QCSDK   (11587): cmd=deny_mac_file, Val:/data/vendor/wifi/hostapd/hostapd.deny, INI:0
12-31 09:17:07.074 D/QCSDK   (11587): Updated:deny_mac_file=/data/vendor/wifi/hostapd/hostapd.deny
12-31 09:17:07.075 D/hostapd (11587): qsap command: softap qccmd set country_code=CN
12-31 09:17:07.078 I/hostapd (11587): Line 60: DEPRECATED: 'dump_file' configuration variable is not used anymore
12-31 09:17:07.080 I/hostapd (11587): Add interface 'wlan0'
12-31 09:17:07.080 D/hostapd (11587): Enable interface wlan0
12-31 09:17:07.082 D/hostapd (11587): nl80211: Using driver-based roaming
12-31 09:17:07.082 D/hostapd (11587): nl80211: TDLS supported
12-31 09:17:07.082 D/hostapd (11587): nl80211: TDLS external setup
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-0f-ac:1
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-0f-ac:5
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-0f-ac:2
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-40-96:254
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-40-96:255
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-0f-ac:4
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-14-72:1
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-0f-ac:6
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-0f-ac:11
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-0f-ac:12
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-0f-ac:8
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supported cipher 00-0f-ac:9
12-31 09:17:07.082 D/hostapd (11587): nl80211: Supports Probe Response offload in AP mode
12-31 09:17:07.082 D/hostapd (11587): nl80211: Using driver-based off-channel TX
12-31 09:17:07.083 D/hostapd (11587): nl80211: Supported vendor command: vendor_id=0x1374 subcmd=11

...

12-31 09:17:07.085 D/hostapd (11587): nl80211: Enable multi-channel concurrent (driver advertised support)
12-31 09:17:07.085 D/hostapd (11587): nl80211: interface wlan0 in phy phy0
12-31 09:17:07.085 D/hostapd (11587): nl80211: Set mode ifindex 30 iftype 3 (AP)
12-31 09:17:07.104 D/hostapd (11587): nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0
12-31 09:17:07.105 D/hostapd (11587): nl80211: Subscribe to mgmt frames with AP handle 0x76d8611c80 (device SME)

...

12-31 09:17:07.106 D/hostapd (11587): nl80211: Enable Probe Request reporting nl_preq=0x76d8611cc0
12-31 09:17:07.106 D/hostapd (11587): nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x76d8611cc0 match=
12-31 09:17:07.106 I/hostapd (11587): rfkill: Cannot open RFKILL control device
12-31 09:17:07.106 D/hostapd (11587): nl80211: RFKILL status not available
12-31 09:17:07.107 D/hostapd (11587): nl80211: Add own interface ifindex 30 (ifidx_reason -1)
12-31 09:17:07.107 D/hostapd (11587): nl80211: if_indices[16]: 30(-1)
12-31 09:17:07.107 D/hostapd (11587): nl80211: Setting wowlan
12-31 09:17:07.107 D/hostapd (11587): phy: phy0
12-31 09:17:07.107 D/hostapd (11587): BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
12-31 09:17:07.107 D/hostapd (11587): ctrl_iface already exists!
12-31 09:17:07.107 I/hostapd (11587): wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
12-31 09:17:07.107 D/hostapd (11587): Previous country code CN, new country code CN
12-31 09:17:07.107 D/hostapd (11587): nl80211: Regulatory information - country=CN
12-31 09:17:07.107 D/hostapd (11587): nl80211: 2402-2482 @ 40 MHz 20 mBm
12-31 09:17:07.107 D/hostapd (11587): nl80211: 5170-5250 @ 80 MHz 23 mBm
12-31 09:17:07.107 D/hostapd (11587): nl80211: 5250-5330 @ 80 MHz 23 mBm (DFS)
12-31 09:17:07.107 D/hostapd (11587): nl80211: 5735-5835 @ 80 MHz 33 mBm
12-31 09:17:07.107 D/hostapd (11587): nl80211: Added 802.11b mode based on 802.11g information
12-31 09:17:07.107 D/hostapd (11587): nl80211: Mode IEEE 802.11g: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484[DISABLED]
12-31 09:17:07.108 D/hostapd (11587): nl80211: Mode IEEE 802.11a: 5180 5200 5220 5240 5260[RADAR] 5280[RADAR] 5300[RADAR] 5320[RADAR] 5500[DISABLED] 5520[DISABLED] 5540[DISABLED] 5560[DISABLED] 5580[DISABLED] 5600[DISABLED] 5620[DISABLED] 5640[DISABLED]
12-31 09:17:07.108 D/hostapd (11587): nl80211: Mode IEEE 802.11b: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484[DISABLED]
12-31 09:17:07.108 I/hostapd (11587): ACS: Automatic channel selection started, this may take a bit
12-31 09:17:07.108 I/hostapd (11587): ACS: Offloading to driver
12-31 09:17:07.108 D/hostapd (11587): nl80211: ACS Params: HW_MODE: 2 HT: 1 HT40: 1 VHT: 1 BW: 80 CH_LIST_LEN: 13
12-31 09:17:07.109 D/hostapd (11587): nl80211: Ignored event (cmd=103) for foreign interface (ifindex -1 wdev 0x0)
12-31 09:17:07.109 D/hostapd (11587): nl80211: Drv Event 7 (NL80211_CMD_NEW_INTERFACE) received for wlan0
12-31 09:17:07.109 D/hostapd (11587): wlan0: nl80211: Ignored unknown event (cmd=7)
12-31 09:17:07.109 D/hostapd (11587): Interface initialization will be completed in a callback (ACS)
12-31 09:17:07.137 D/MiuiWifiNative( 1273): doBoolean: SET deny_mac_file /data/misc/wifi/miui_hostapd.deny
12-31 09:17:07.138 I/miuiWifiNative( 1273): command 'SET deny_mac_file /data/misc/wifi/miui_hostapd.deny' returned '
12-31 09:17:07.138 D/MiuiWifiNative( 1273): SET deny_mac_file /data/misc/wifi/miui_hostapd.deny: returned false
12-31 09:17:07.912 D/hostapd (11587): nl80211: Drv Event 103 (NL80211_CMD_VENDOR) received for wlan0
12-31 09:17:07.913 D/hostapd (11587): nl80211: Vendor event: wiphy=0 vendor_id=0x1374 subcmd=54
12-31 09:17:07.913 D/hostapd (11587): nl80211: ACS channel selection vendor event received
12-31 09:17:07.913 I/hostapd (11587): nl80211: ACS Results: PCH: 60 SCH: 64 BW: 80 VHT0: 58 VHT1: 0 HW_MODE: 2
12-31 09:17:07.913 D/hostapd (11587): wlan0: Event ACS_CHANNEL_SELECTED (49) received
12-31 09:17:07.913 I/hostapd (11587): wlan0: ACS-COMPLETED freq=5300 channel=60
12-31 09:17:07.913 D/hostapd (11587): hw vht capab: 0x391fbfa, conf vht capab: 0x0
12-31 09:17:07.913 I/hostapd (11587): wlan0: interface state COUNTRY_UPDATE->HT_SCAN
12-31 09:17:07.913 D/hostapd (11587): Scan for neighboring BSSes prior to enabling 40 MHz channel
12-31 09:17:07.913 D/hostapd (11587): 40 MHz affected channel range: [5290,5330] MHz
12-31 09:17:07.913 D/hostapd (11587): wlan0: nl80211: vendor scan request
12-31 09:17:07.914 D/hostapd (11587): nl80211: Vendor scan requested (ret=0) - scan timeout 30 seconds, scan cookie:0xffffffe0707ef800
12-31 09:17:07.914 D/hostapd (11587): Interface initialization will be completed in a callback
12-31 09:17:07.914 D/hostapd (11587): nl80211: Drv Event 103 (NL80211_CMD_VENDOR) received for wlan0
12-31 09:17:07.915 D/hostapd (11587): nl80211: Vendor event: wiphy=0 vendor_id=0x1374 subcmd=106
12-31 09:17:07.915 D/hostapd (11587): wlan0: Event SCAN_STARTED (46) received
12-31 09:17:07.915 D/hostapd (11587): Unknown event 46
12-31 09:17:08.152 D/hostapd (11587): nl80211: Drv Event 103 (NL80211_CMD_VENDOR) received for wlan0
12-31 09:17:08.152 D/hostapd (11587): nl80211: Vendor event: wiphy=0 vendor_id=0x1374 subcmd=107
12-31 09:17:08.153 D/hostapd (11587): nl80211: Scan included frequencies: 5300 5320
12-31 09:17:08.153 D/hostapd (11587): wlan0: Event SCAN_RESULTS (3) received
12-31 09:17:08.154 D/hostapd (11587): nl80211: Received scan results (45 BSSes)
12-31 09:17:08.157 D/hostapd (11587): HT40: control channel: 60  secondary channel: 64
12-31 09:17:08.157 D/hostapd (11587): Completing interface initialization
12-31 09:17:08.157 D/hostapd (11587): Mode: IEEE 802.11a  Channel: 60  Frequency: 5300 MHz
12-31 09:17:08.157 D/hostapd (11587): hostapd_handle_dfs_offload: iface->cac_started: 0
12-31 09:17:08.157 D/hostapd (11587): hostapd_handle_dfs_offload: freq 5300 MHz requires DFS
12-31 09:17:08.157 D/hostapd (11587): nl80211: Set freq 5300 (ht_enabled=1, vht_enabled=1, bandwidth=80 MHz, cf1=5290 MHz, cf2=0 MHz)12-31 09:17:08.157 D/hostapd (11587):   * freq=5300
12-31 09:17:08.157 D/hostapd (11587):   * vht_enabled=1
12-31 09:17:08.157 D/hostapd (11587):   * ht_enabled=1
12-31 09:17:08.157 D/hostapd (11587):   * bandwidth=80
12-31 09:17:08.157 D/hostapd (11587):   * channel_width=3
12-31 09:17:08.157 D/hostapd (11587):   * center_freq1=5290
12-31 09:17:08.157 D/hostapd (11587):   * center_freq2=0
12-31 09:17:08.158 D/hostapd (11587): RATE[0] rate=60 flags=0x1
12-31 09:17:08.158 D/hostapd (11587): RATE[1] rate=90 flags=0x0
12-31 09:17:08.158 D/hostapd (11587): RATE[2] rate=120 flags=0x1
12-31 09:17:08.158 D/hostapd (11587): RATE[3] rate=180 flags=0x0
12-31 09:17:08.158 D/hostapd (11587): RATE[4] rate=240 flags=0x1
12-31 09:17:08.158 D/hostapd (11587): RATE[5] rate=360 flags=0x0
12-31 09:17:08.158 D/hostapd (11587): RATE[6] rate=480 flags=0x0
12-31 09:17:08.158 D/hostapd (11587): RATE[7] rate=540 flags=0x0
12-31 09:17:08.158 D/hostapd (11587): hostapd_setup_bss(hapd=0x76d863ec00 (wlan0), first=1)
12-31 09:17:08.158 D/hostapd (11587): wlan0: Flushing old station entries
12-31 09:17:08.158 D/hostapd (11587): nl80211: flush -> DEL_STATION wlan0 (all)
12-31 09:17:08.158 D/hostapd (11587): wlan0: Deauthenticate all stations
12-31 09:17:08.159 D/hostapd (11587): nl80211: sta_remove -> DEL_STATION wlan0 ff:ff:ff:ff:ff:ff --> 0 (Success)
12-31 09:17:08.162 D/hostapd (11587): wpa_driver_nl80211_set_key: ifindex=30 (wlan0) alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0
12-31 09:17:08.162 D/hostapd (11587): wpa_driver_nl80211_set_key: ifindex=30 (wlan0) alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
12-31 09:17:08.163 D/hostapd (11587): wpa_driver_nl80211_set_key: ifindex=30 (wlan0) alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
12-31 09:17:08.163 D/hostapd (11587): wpa_driver_nl80211_set_key: ifindex=30 (wlan0) alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
12-31 09:17:08.164 E/hostapd (11587): Using interface wlan0 with hwaddr 3a:13:c1:9b:d2:5f and ssid "Zzzz14235"
12-31 09:17:08.164 D/hostapd (11587): Deriving WPA PSK based on passphrase
12-31 09:17:08.164 D/hostapd (11587): SSID - hexdump(len=9): 5a 7a 7a 7a 31 34 32 33 35
12-31 09:17:08.164 D/hostapd (11587): PSK (ASCII passphrase) - hexdump(len=8): [REMOVED]
12-31 09:17:08.181 D/hostapd (11587): PSK (from passphrase) - hexdump(len=32): [REMOVED]
12-31 09:17:08.183 D/hostapd (11587): GMK - hexdump(len=32): [REMOVED]
12-31 09:17:08.183 D/hostapd (11587): Key Counter - hexdump(len=32): [REMOVED]
12-31 09:17:08.183 D/hostapd (11587): WPA: Delay group state machine start until Beacon frames have been configured
12-31 09:17:08.184 D/hostapd (11587): nl80211: Set beacon (beacon_set=0)
12-31 09:17:08.184 D/hostapd (11587): nl80211: Beacon head - hexdump(len=60): 80 00 00 00 ff ff ff ff ff ff 3a 13 c1 9b d2 5f 3a 13 c1 9b d2 5f 00 00 00 00 00 00 00 00 00 00 ...
12-31 09:17:08.184 D/hostapd (11587): nl80211: Beacon tail - hexdump(len=152): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 3b 02 80 00 2d 1a 0e 00 1f ff ...
12-31 09:17:08.184 D/hostapd (11587): nl80211: ifindex=30
12-31 09:17:08.184 D/hostapd (11587): nl80211: beacon_int=100
12-31 09:17:08.184 D/hostapd (11587): nl80211: beacon_rate=0
12-31 09:17:08.184 D/hostapd (11587): nl80211: rate_type=0
12-31 09:17:08.184 D/hostapd (11587): nl80211: dtim_period=2
12-31 09:17:08.184 D/hostapd (11587): nl80211: ssid=Zzzz14235
12-31 09:17:08.185 D/hostapd (11587):   * beacon_int=100
12-31 09:17:08.185 D/hostapd (11587):   * dtim_period=2
12-31 09:17:08.185 D/hostapd (11587): nl80211: proberesp (offload) - hexdump(len=212): 50 00 00 00 00 00 00 00 00 00 3a 13 c1 9b d2 5f 3a 13 c1 9b d2 5f 00 00 00 00 00 00 00 00 00 00 ...
12-31 09:17:08.185 D/hostapd (11587): nl80211: hidden SSID not in use
12-31 09:17:08.185 D/hostapd (11587): nl80211: privacy=1
12-31 09:17:08.185 D/hostapd (11587): nl80211: auth_algs=0x3
12-31 09:17:08.185 D/hostapd (11587): nl80211: wpa_version=0x2
12-31 09:17:08.185 D/hostapd (11587): nl80211: key_mgmt_suites=0x2
12-31 09:17:08.185 D/hostapd (11587): nl80211: pairwise_ciphers=0x10
12-31 09:17:08.185 D/hostapd (11587): nl80211: group_cipher=0x10
12-31 09:17:08.185 D/hostapd (11587): nl80211: SMPS mode - off
12-31 09:17:08.185 D/hostapd (11587): nl80211: beacon_ies - hexdump(len=21): dd 07 50 6f 9a 16 65 01 09 dd 0a 00 17 f2 06 01 01 03 01 00 00
12-31 09:17:08.185 D/hostapd (11587): nl80211: proberesp_ies - hexdump(len=21): dd 07 50 6f 9a 16 65 01 09 dd 0a 00 17 f2 06 01 01 03 01 00 00
12-31 09:17:08.185 D/hostapd (11587): nl80211: assocresp_ies - hexdump(len=9): dd 07 50 6f 9a 16 65 01 09
12-31 09:17:08.185 D/hostapd (11587): nl80211: ap_max_inactivity=300
12-31 09:17:08.217 D/hostapd (11587): WPA: Start group state machine to set initial keys
12-31 09:17:08.217 D/hostapd (11587): WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
12-31 09:17:08.217 D/hostapd (11587): GTK - hexdump(len=16): [REMOVED]
12-31 09:17:08.217 D/hostapd (11587): WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
12-31 09:17:08.217 D/hostapd (11587): wpa_driver_nl80211_set_key: ifindex=30 (wlan0) alg=3 addr=0x623040c170 key_idx=1 set_tx=1 seq_len=0 key_len=16
12-31 09:17:08.217 D/hostapd (11587): nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
12-31 09:17:08.217 D/hostapd (11587):    broadcast key
12-31 09:17:08.218 D/hostapd (11587): nl80211: Set wlan0 operstate 0->1 (UP)
12-31 09:17:08.218 D/hostapd (11587): netlink: Operstate: ifindex=30 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
12-31 09:17:08.218 D/hostapd (11587): nl80211: TX queue param set: queue=0 aifs=1 cw_min=3 cw_max=7 burst_time=15 --> res=0
12-31 09:17:08.218 D/hostapd (11587): nl80211: TX queue param set: queue=1 aifs=1 cw_min=7 cw_max=15 burst_time=30 --> res=0
12-31 09:17:08.218 D/hostapd (11587): nl80211: TX queue param set: queue=2 aifs=3 cw_min=15 cw_max=63 burst_time=0 --> res=0
12-31 09:17:08.218 D/hostapd (11587): nl80211: TX queue param set: queue=3 aifs=7 cw_min=15 cw_max=1023 burst_time=0 --> res=0
12-31 09:17:08.218 D/hostapd (11587): nl80211: Set Deny ACL (num_mac_acl=0)
12-31 09:17:08.218 D/hostapd (11587): hostapd_setup_interface_complete_sync: Wait for CAC to complete
12-31 09:17:08.218 D/hostapd (11587): nl80211: Drv Event 88 (NL80211_CMD_CH_SWITCH_NOTIFY) received for wlan0
12-31 09:17:08.218 D/hostapd (11587): nl80211: Channel switch event
12-31 09:17:08.218 D/hostapd (11587): wlan0: Event CH_SWITCH (38) received
12-31 09:17:08.218 I/hostapd (11587): wlan0: IEEE 802.11 driver had channel switch: freq=5300, ht=1, vht_ch=0x0, offset=1, width=3 (80 MHz), cf1=5290, cf2=0
12-31 09:17:08.218 I/hostapd (11587): wlan0: IEEE 802.11 driver had channel switch: freq=5300, ht=1, vht_ch=0x0, offset=1, width=3 (80 MHz), cf1=5290, cf2=0
12-31 09:17:08.219 I/hostapd (11587): wlan0: AP-CSA-FINISHED freq=5300 dfs=1
12-31 09:17:08.219 D/hostapd (11587): nl80211: Drv Event 103 (NL80211_CMD_VENDOR) received for wlan0
12-31 09:17:08.219 D/hostapd (11587): nl80211: Vendor event: wiphy=0 vendor_id=0x1374 subcmd=165
12-31 09:17:08.219 D/hostapd (11587): nl80211: Ignore unsupported QCA vendor event 165
12-31 09:17:08.219 D/hostapd (11587): nl80211: Drv Event 103 (NL80211_CMD_VENDOR) received for wlan0
12-31 09:17:08.219 D/hostapd (11587): nl80211: Vendor event: wiphy=0 vendor_id=0x1374 subcmd=56
12-31 09:17:08.219 D/hostapd (11587): nl80211: DFS offload radar vendor event received
12-31 09:17:08.219 D/hostapd (11587): nl80211: DFS event on freq 5300 MHz
12-31 09:17:08.219 D/hostapd (11587): nl80211: DFS event on freq 5300 MHz, ht: 0, offset: 0, width: 0, cf1: 0MHz, cf2: 0MHz
12-31 09:17:08.219 D/hostapd (11587): wlan0: Event DFS_CAC_STARTED (50) received
12-31 09:17:08.219 D/hostapd (11587): DFS offload CAC started on 5300 MHz
12-31 09:17:08.219 I/hostapd (11587): wlan0: interface state HT_SCAN->DFS
12-31 09:17:08.219 I/hostapd (11587): wlan0: DFS-CAC-START freq=5300 chan=60 chan_offset=0 width=0 seg0=0 seg1=0 cac_time=60s
12-31 09:17:08.225 D/hostapd (11587): RTM_NEWLINK: ifi_index=30 ifname=wlan0 wext ifi_family=0 ifi_flags=0x11003 ([UP][LOWER_UP])
12-31 09:17:08.225 D/hostapd (11587): nl80211: Set IF_OPER_UP again based on ifi_flags and expected operstate
12-31 09:17:08.225 D/hostapd (11587): netlink: Operstate: ifindex=30 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
12-31 09:17:08.226 D/hostapd (11587): RTM_NEWLINK: ifi_index=30 ifname=wlan0 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])

从log中可以看出以下几个有用的log:

12-31 09:17:06.999 D/hostapd (11587): qsap command: softap qccmd set ssid2=5a7a7a7a3134323335
12-31 09:17:07.004 D/hostapd (11587): qsap command: softap qccmd set security_mode=3
12-31 09:17:07.025 D/hostapd (11587): qsap command: softap qccmd set wpa_key_mgmt=WPA-PSK
12-31 09:17:07.027 D/hostapd (11587): qsap command: softap qccmd set wpa_passphrase=12345678
12-31 09:17:07.029 D/hostapd (11587): qsap command: softap qccmd set rsn_pairwise=CCMP
12-31 09:17:07.033 D/hostapd (11587): qsap command: softap qccmd set acs_exclude_dfs=0
12-31 09:17:07.035 D/hostapd (11587): qsap command: softap qccmd set channel=0
12-31 09:17:07.037 D/hostapd (11587): qsap command: softap qccmd set ht_capab=[SHORT-GI-20] [GF] [DSSS_CCK-40] [LSIG-TXOP-PROT]
12-31 09:17:07.040 D/hostapd (11587): qsap command: softap qccmd set vht_oper_chwidth=0
12-31 09:17:07.042 D/hostapd (11587): qsap command: softap qccmd set hw_mode=a
12-31 09:17:07.052 D/hostapd (11587): qsap command: softap qccmd set ht_capab=[HT40+]
12-31 09:17:07.054 D/hostapd (11587): qsap command: softap qccmd set vht_oper_chwidth=1
12-31 09:17:07.056 D/hostapd (11587): qsap command: softap qccmd set interface=wlan0
12-31 09:17:07.059 D/hostapd (11587): qsap command: softap qccmd set driver=nl80211
12-31 09:17:07.059 D/hostapd (11587): qsap command: softap qccmd set 

12-31 09:17:07.085 D/hostapd (11587): nl80211: interface wlan0 in phy phy0
12-31 09:17:07.085 D/hostapd (11587): nl80211: Set mode ifindex 30 iftype 3 (AP)
12-31 09:17:07.104 D/hostapd (11587): nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0

12-31 09:17:07.107 I/hostapd (11587): wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
12-31 09:17:07.107 D/hostapd (11587): Previous country code CN, new country code CN
12-31 09:17:07.107 D/hostapd (11587): nl80211: Regulatory information - country=CN
12-31 09:17:07.107 D/hostapd (11587): nl80211: 2402-2482 @ 40 MHz 20 mBm
12-31 09:17:07.107 D/hostapd (11587): nl80211: 5170-5250 @ 80 MHz 23 mBm
12-31 09:17:07.107 D/hostapd (11587): nl80211: 5250-5330 @ 80 MHz 23 mBm (DFS)
12-31 09:17:07.107 D/hostapd (11587): nl80211: 5735-5835 @ 80 MHz 33 mBm

12-31 09:17:07.108 I/hostapd (11587): ACS: Automatic channel selection started, this may take a bit
12-31 09:17:07.108 I/hostapd (11587): ACS: Offloading to driver
12-31 09:17:07.108 D/hostapd (11587): nl80211: ACS Params: HW_MODE: 2 HT: 1 HT40: 1 VHT: 1 BW: 80 CH_LIST_LEN: 13

12-31 09:17:07.913 D/hostapd (11587): nl80211: ACS channel selection vendor event received
12-31 09:17:07.913 I/hostapd (11587): nl80211: ACS Results: PCH: 60 SCH: 64 BW: 80 VHT0: 58 VHT1: 0 HW_MODE: 2
12-31 09:17:07.913 D/hostapd (11587): wlan0: Event ACS_CHANNEL_SELECTED (49) received
12-31 09:17:07.913 I/hostapd (11587): wlan0: ACS-COMPLETED freq=5300 channel=60

hostapd通过qsap command对热点进行配置,然后查看国家码,通过ACS(AutoMatic channel selection)进行信道自动协商,最后协商在60信道。

分析

我重复抓了几次log后发现,有很大的几率协商在60信道,这时候搜索不到。而60信道处于DFS信道,故怀疑是由于softap未屏蔽DFS信道导致。

通过hostapd.conf修改相应的参数固定信道,看问题是否解决。

/data/vendor/wifi/hostapd/hostapd.conf

其中有一个参数为channel,将channel = 149修改后重新push到手机中验证。从log中看到仍然协商在60信道,继而查看刚导入的hostapd.conf,发现此值被重写为0了。之后再查询此文件时发现了一个参数

Exclude DFS channels from ACS

This option can be used to exclude all DFS channels from the ACS channel list

in cases where the driver supports DFS channels.

acs_exclude_dfs=0

按照描述此参数就是在ACS期间屏蔽DFS信道,我也修改此参数为1,重新push后,发现此参数也被重写为0了。那就说明上层对配置文件hostapd.conf进行了重写,所以改配置文件无效!

代码追踪

从acs_exclude_dfs开始

通过opengrok搜索acs_exclude_dfs,发现如下项:

->

加log

130|curtana:/ # logcat -vtime |grep liuqi:
12-30 09:26:38.917 I/hostapd (12662): liuqi:set acs_exclude_dfs 0
12-30 09:26:38.917 I/hostapd (12662): liuqi:ChannelParams.enableAcs = 1

->

所以channelParams.enableAcs = 1,而channelParams.acsShouldExcludeDfs = 0

追channelParams.acsShouldExcludeDfs

搜索acsShouldExcludeDfs

->

搜索mAcsShouldExcludeDfs

是通过这个config_wifi_softap_acs_should_exclude_dfs赋值的.

->

搜到这儿就很明显了,上层config.xml中默认为false,它会在热点开启时对hostapd.conf进行一个重写,然后配置hostapd。

修改为true后进行最后判断。

得到以下log:

12-30 09:36:47.726 D/hostapd (30380): qsap command: softap qccmd set wpa_passphrase=195db1aea83a                                         
12-30 09:36:47.727 D/hostapd (30380): qsap command: softap qccmd set rsn_pairwise=CCMP                                                   
12-30 09:36:47.728 D/hostapd (30380): qsap command: softap qccmd set acs_exclude_dfs=0                                                   
12-30 09:36:47.729 I/hostapd (30380): liuqi:set acs_exclude_dfs 0                                                                        
12-30 09:36:47.729 I/hostapd (30380): liuqi:ChannelParams.enableAcs = 1                                                                  
12-30 09:36:47.729 D/hostapd (30380): qsap command: softap qccmd set channel=0                                                           
12-30 09:36:47.729 I/hostapd (30380): liuqi:channelParams.acsShouldExcludeDfs = 1                                                        
12-30 09:36:47.729 D/hostapd (30380): qsap command: softap qccmd set acs_exclude_dfs=1                                                   
12-30 09:36:47.730 D/hostapd (30380): qsap command: softap qccmd set ht_capab=[SHORT-GI-20] [GF] [DSSS_CCK-40] [LSIG-TXOP-PROT]   
12-30 09:36:47.757 I/hostapd (30380): ACS: Automatic channel selection started, this may take a bit
12-30 09:36:47.757 I/hostapd (30380): ACS: Offloading to driver
12-30 09:36:47.757 D/hostapd (30380): nl80211: ACS Params: HW_MODE: 2 HT: 1 HT40: 1 VHT: 1 BW: 80 CH_LIST_LEN: 9

12-30 09:36:48.155 D/hostapd (30380): nl80211: ACS channel selection vendor event received
12-30 09:36:48.155 I/hostapd (30380): nl80211: ACS Results: PCH: 48 SCH: 44 BW: 80 VHT0: 42 VHT1: 0 HW_MODE: 2
12-30 09:36:48.155 D/hostapd (30380): wlan0: Event ACS_CHANNEL_SELECTED (49) received
12-30 09:36:48.155 I/hostapd (30380): wlan0: ACS-COMPLETED freq=5240 channel=48

现在的流程就按照我们之后分析的那样走了,

12-30 09:36:47.729 I/hostapd (30380): liuqi:channelParams.acsShouldExcludeDfs = 1
12-30 09:36:48.155 I/hostapd (30380): wlan0: ACS-COMPLETED freq=5240 channel=48

解决方案

  1. hostapd是通过hostapd.conf对热点进行配置的
  2. 如果通过修改hostapd.conf 的参数 acs_exclude_dfs=1无效,就到config.xml中进行查询是否在上层对其进行了重写

剑气纵横三万里

“为什么要努力?” “想去的地方很远,想要的东西很贵,喜欢的人很优秀,父母的白发,朋友的约定,周围人的嘲笑,以及,天生傲骨。”

留下你的评论

*评论支持代码高亮<pre class="prettyprint linenums">代码</pre>

相关推荐