Raspberry Pi3 hostapd
Я пытаюсь сделать точку доступа Wi-Fi из Raspberry Pi3. Я использую Hypriot OS (Raspbian + Docker) и установил dnsmasq и hostapd (я пробовал их как в основной системе, так и в контейнере Docker). Вот мой dnsmasq.conf
:
interface=wlan0
listen-address=10.0.2.1
bind-interfaces
dhcp-range=10.0.2.20,10.0.2.50,12h
а также hostapd.conf
:
interface=wlan0
hw_mode=g
channel=11 #I've tried different
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
ssid=PI3-AP
wpa_passphrase=12345678
driver=nl80211 #I've tried with and without this line
#I've tried with and without options below
ieee80211n=1
wmm_enabled=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
ignore_broadcast_ssid=0
rsn_pairwise=CCMP
Потом я побежал hostapd -dd -f hostapd.log hostapd.conf
Показана точка доступа, некоторые устройства могут к ней подключаться, а некоторые другие нет. Подключенные становятся отключенными после aprox. 5 минут. Я не вижу ничего криминального в журнале и не знаю, что не так. Вот строки в журнале, которые выглядят как ошибки:
Failed to create interface mon.wlan0: -95 (Operation not supported)
nl80211: Driver does not support monitor interface type - try to run without it
nl80211: Failed to enable Probe Request frame reporting in AP mode
в начале, однако, создается AP:wlan0: AP-ENABLED
ctrl_iface not configured!
Клиент подключается:
wlan0: STA <MAC> IEEE 802.11: associated ap_sta_add: register ap_handle_timer timeout for <MAC> (300 seconds - ap_max_inactivity)
nl80211: Set STA flags - ifname=wlan0 addr=<MAC> total_flags=0x0 flags_or=0x0 flags_and=0xfffffff1 authori
zed=0
wlan0: STA <MAC> WPA: event 1 notification
addr=<MAC>
wlan0: STA <MAC> WPA: start authentication
WPA: <MAC> WPA_PTK entering state INITIALIZE
addr=<MAC>
nl80211: Set STA flags - ifname=wlan0 addr=<MAC> total_flags=0x0 flags_or=0x0 flags_and=0xfffffffe authori
zed=0
wlan0: STA <MAC> IEEE 802.1X: unauthorizing port
WPA: <MAC> WPA_PTK_GROUP entering state IDLE
WPA: <MAC> WPA_PTK entering state AUTHENTICATION
WPA: <MAC> WPA_PTK entering state AUTHENTICATION2
WPA: <MAC> WPA_PTK entering state INITPSK
Searching a PSK for <MAC> prev_psk=(nil)
Searching a PSK for <MAC> prev_psk=(nil)
WPA: <MAC> WPA_PTK entering state PTKSTART
wlan0: STA <MAC> WPA: sending 1/4 msg of 4-Way Handshake
hostapd_new_assoc_sta: reschedule ap_handle_timer timeout for <MAC> (300 seconds - ap_max_inactivity)
IEEE 802.1X: 121 bytes from <MAC>
WPA: Received EAPOL-Key from <MAC> key_info=0x10a type=2 key_data_length=22
wlan0: STA <MAC> WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: <MAC> WPA_PTK entering state PTKCALCNEGOTIATING
Searching a PSK for <MAC> prev_psk=(nil)
WPA: PTK derivation - A1=<another MAC> A2=<MAC>
WPA: <MAC> WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: <MAC> WPA_PTK entering state PTKINITNEGOTIATING
wlan0: STA <MAC> WPA: sending 3/4 msg of 4-Way Handshake
IEEE 802.1X: 99 bytes from <MAC>
WPA: Received EAPOL-Key from <MAC> key_info=0x30a type=2 key_data_length=0
wlan0: STA <MAC> WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: <MAC> WPA_PTK entering state PTKINITDONE
addr=<MAC>
wlan0: AP-STA-CONNECTED <MAC>
nl80211: Set STA flags - ifname=wlan0 addr=<MAC> total_flags=0x1 flags_or=0x1 flags_and=0xffffffff authori
zed=1
wlan0: STA <MAC> IEEE 802.1X: authorizing port
wlan0: STA <MAC> RADIUS: starting accounting session 5AF53F3A-0000001E
wlan0: STA <MAC> WPA: pairwise key handshake completed (RSN)
nl80211: Delete station <MAC>
wlan0: STA <MAC> IEEE 802.11: disassociated
wlan0: AP-STA-DISCONNECTED <MAC>
wlan0: STA <MAC> WPA: event 2 notification
addr=<MAC>
WPA: <MAC> WPA_PTK entering state DISCONNECTED
WPA: <MAC> WPA_PTK entering state INITIALIZE #And everything repeats...