web-dev-qa-db-ja.com

クライアントはラズベリーパイのhostapdに接続できません

貧乏人のワイヤレスアクセスポイント(Raspberry Pi + rtl8192cuチップセットUSBアダプター(Belkin N300 micro)+ hostapd + dnsmasq)に接続するデバイス(Win7、Win8、またはAndroid)を取得できません。 「接続」をクリック/タップした後、接続できないというエラーメッセージが表示されます。静的IPを割り当ててから接続することも失敗するため、IP/DHCP/dnsmasqの問題ではありません。 Sudo hostapd -dd /etc/hostapd/hostapd.conf手がかりはありません。クライアントが接続しようとしているときにエラーメッセージは表示されません。 /etc/hostapd/hostapd.confは非常にシンプルで、インターフェイス、ssid、チャネルのみが宣言されています。私はブリッジングを行っていません、NATまたはこの設定でインターネットに接続しています...アクセスポイントである必要があるので、Webブラウザを介して接続しますcar(my Androidは残念ながらアドホックではありません)。これがhostapdの出力です(これでプログラムは最後に終了します):

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x1f85648
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=14 freq=2484 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=52 freq=5260 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=56 freq=5280 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=60 freq=5300 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=64 freq=5320 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=100 freq=5500 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=104 freq=5520 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=108 freq=5540 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=112 freq=5560 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=116 freq=5580 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=120 freq=5600 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=124 freq=5620 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=128 freq=5640 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=132 freq=5660 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=136 freq=5680 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=140 freq=5700 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11b  Channel: 1  Frequency: 2412 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x0
RATE[3] rate=110 flags=0x0
Flushing old station entries
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
Using interface wlan0 with hwaddr 08:86:3b:f3:af:38 and ssid 'raspido'
rtl871x_set_wps_assoc_resp_ie
rtl871x_set_wps_beacon_ie
rtl871x_set_wps_probe_resp_ie
rtl871x_set_beacon_ops
rtl871x_set_hidden_ssid ignore_broadcast_ssid:0, raspido,7
rtl871x_set_acl
wlan0: Setup of interface done.
random: Got 20/20 bytes from /dev/random
Wireless event: cmd=0x8b15 len=20
Wireless event: cmd=0x8b15 len=20
Wireless event: cmd=0x8b19 len=8
Wireless event: cmd=0x8b19 len=8
Wireless event: cmd=0x8b19 len=8
Wireless event: cmd=0x8b19 len=8
Wireless event: cmd=0x8b19 len=8
Wireless event: cmd=0x8b19 len=8
Wireless event: cmd=0x8b19 len=8
Wireless event: cmd=0x8b19 len=8
Wireless event: cmd=0x8b19 len=8
Wireless event: cmd=0x8b19 len=8
Signal 2 received - terminating
Flushing old station entries
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
ELOOP: remaining socket: sock=6 eloop_data=0x1f856b8 user_data=(nil) handler=0x2a000

何か案は?

2
crashintoty

解決しました!これでAPに接続できます。問題は、wlan0が起動しておらず、IPとサブネットマスクが割り当てられていなかったことです。 dnsmasqとhostapdが起動する前に起動する必要があります。私はこのセットアップをスクリプトで実行していて、愚かなことにifconfig wlan0 10.1.1.1 netmask 255.255.255.0 updnsmasqとhostapdの前の最初のコマンドではなく最後のコマンドとして。

これが誰かを助けることを願っています。

5
crashintoty