web-dev-qa-db-ja.com

wpa_supplicantを使用したAPモード

Ubuntu 16.10のカーネルv4.8でWi_Fiアダプタ(Qualcomm Atheros Sparrow 802.11ad)をwpa_supplicant v2.4を使用してAPモードで動作するように設定しようとしています。次の手順を実行します。

  1. 構成ファイルを/etc/wpa_supplicant.confに作成し、 wil6210 Webサイト から取得した次の構成を使用します。

    ap_scan=2
    
    network={
            frequency=60480
            ssid="the_ssid_string"
            mode=2
            key_mgmt=NONE
    }
    
  2. 次のコマンドを実行して、wpa_supplicantを初期化します。

    wpa_supplicant -Dnl80211 -iwlp2s0 -c/etc/wpa_supplicant.conf

    wpa_supplicantap_scanを解析できないことを示すエラーが表示されるため、テストのためにこの行を省略した後、再度実行すると、次の新しいエラーが表示されます。

    Successfully initialized wpa_supplicant
    Failed to create interface p2p-dev-wlp2s0: -22 (Invalid argument)
    nl80211: Failed to create a P2P Device interface p2p-dev-wlp2s0
    P2P: Failed to enable P2P Device interface
    wlp2s0: Failed to start AP functionality
    

この問題を解決する手がかりはありますか?

詳細なデバッグ出力は次のとおりです。

wpa_supplicant v2.4
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlp2s0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ap_scan=2
Line: 3 - start of a new network block
frequency=60480 (0xec40)
ssid - hexdump_ascii(len=15):
     74 68 65 5f 73 73 69 64 5f 73 74 72 69 6e 67      the_ssid_string 
mode=2 (0x2)
key_mgmt: 0x4
Priority group 0
   id=0 ssid='the_ssid_string'
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=1 hard=0
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=3 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:8
nl80211: Supports Probe Response offload in AP mode
nl80211: use P2P_DEVICE support
nl80211: interface wlp2s0 in phy phy0
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x5625e3623270
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=040a
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=040b
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=040c
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=040d
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=090a
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=090b
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=090c
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=090d
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=0409506f9a09
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=6): 04 09 50 6f 9a 09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=7f506f9a09
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=5): 7f 50 6f 9a 09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=0801
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 08 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=06
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=0a07
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 0a 07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=0a11
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 0a 11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=1101
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 11 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=1102
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 11 02
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=0505
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 05 05
nl80211: Failed to register Action frame processing - ignore for now
netlink: Operstate: ifindex=3 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
nl80211: driver param='(null)'
Add interface wlp2s0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
wlp2s0: Own MAC address: 04:ce:14:07:59:21
wpa_driver_nl80211_set_key: ifindex=3 (wlp2s0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlp2s0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlp2s0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlp2s0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlp2s0) alg=0 addr=(nil) key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlp2s0) alg=0 addr=(nil) key_idx=5 set_tx=0 seq_len=0 key_len=0
wlp2s0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlp2s0: Setting scan request: 0.100000 sec
TDLS: TDLS operation not supported by driver
TDLS: Driver uses internal link setup
TDLS: Driver does not support TDLS channel switching
wlp2s0: WPS: UUID based on MAC address: 17fb72f2-8ee9-50b3-829b-3b29e77dfa2b
ENGINE: Loading dynamic engine
ENGINE: Loading dynamic engine
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
wlp2s0: Added interface wlp2s0
wlp2s0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlp2s0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
nl80211: Create interface iftype 10 (P2P_DEVICE)
nl80211: New P2P Device interface p2p-dev-wlp2s0 (0x2) created
Initializing interface 'p2p-dev-wlp2s0' conf '/etc/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ap_scan=2
Line: 3 - start of a new network block
frequency=60480 (0xec40)
ssid - hexdump_ascii(len=15):
     74 68 65 5f 73 73 69 64 5f 73 74 72 69 6e 67      the_ssid_string 
mode=2 (0x2)
key_mgmt: 0x4
Priority group 0
   id=0 ssid='the_ssid_string'
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=1 hard=0
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=3 type=1 op=0 soft=0 hard=0
Could not read interface p2p-dev-wlp2s0 flags: No such device
nl80211: Supported cipher 00-0f-ac:8
nl80211: Supports Probe Response offload in AP mode
nl80211: use P2P_DEVICE support
nl80211: interface p2p-dev-wlp2s0 in phy phy0
nl80211: Set mode ifindex 0 iftype 10 (P2P_DEVICE)
nl80211: Failed to set interface 0 to mode 10: -22 (Invalid argument)
nl80211: Subscribe to mgmt frames with non-AP handle 0x5625e36437a0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=040a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=040b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=040c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=040d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=090a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=090b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=090c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=090d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=0409506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=7f506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=0801
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=0a07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=0a11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=1101
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=1102
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e36437a0 match=0505
nl80211: Start P2P Device p2p-dev-wlp2s0 (0x2): Success
nl80211: driver param='(null)'
Add interface p2p-dev-wlp2s0 to existing radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
p2p-dev-wlp2s0: Own MAC address: 04:ce:14:07:59:21
p2p-dev-wlp2s0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
p2p-dev-wlp2s0: State: DISCONNECTED -> INACTIVE
p2p-dev-wlp2s0: WPS: UUID from the first interface: 17fb72f2-8ee9-50b3-829b-3b29e77dfa2b
ENGINE: Loading dynamic engine
ENGINE: Loading dynamic engine
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
P2P: Add operating class 180
P2P: Channels - hexdump(len=3): 01 02 03
P2P: Own listen channel: 180:2
P2P: Random operating channel: 180:2
P2P: initialized
P2P: channels: 180:1,2,3
P2P: cli_channels:
p2p-dev-wlp2s0: Added interface p2p-dev-wlp2s0
p2p-dev-wlp2s0: State: INACTIVE -> DISCONNECTED
nl80211: Set p2p-dev-wlp2s0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=0 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
random: Got 20/20 bytes from /dev/random
wlp2s0: State: DISCONNECTED -> SCANNING
Setting up AP (SSID='the_ssid_string')
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Unsubscribe mgmt frames handle 0x8888dead6beabaf9 (start AP)
nl80211: Setup AP(wlp2s0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x5625e3623270 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5625e3623270 match=
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Remove monitor interface: refcount=0
wlp2s0: Failed to start AP functionality
wlp2s0: State: SCANNING -> DISCONNECTED
nl80211: Set wlp2s0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
EAPOL: disable timer tick
EAPOL: disable timer tick
3
IoT

問題が見つかりました。wpa_supplicantの別のインスタンスが実行中で、リクエストをブロックしていました。プロセスを強制終了し、ワイヤレスアダプターをアクセスポイントモードで実行できました。

1
IoT