Hostapd SSID는 몇 초 후에 사라집니다.

Hostapd SSID는 몇 초 후에 사라집니다.

저는 라즈베리 파이 제로와 Wi-Fi 카드를 통해 다른 Wi-Fi 연결을 공유하기 위해 Hostapd를 사용하고 있습니다. Raspberry Pi가 부팅된 후 휴대폰에서 SSID를 볼 수 있으며 SSID에 연결하여 몇 초 동안 사용할 수도 있습니다. 그러면 SSID가 사라집니다.

Hostapd의 상태에는 오류가 표시되지 않습니다.

pi@raspberrypi:~ $ sudo service hostapd status
● hostapd.service - LSB: Advanced IEEE 802.11 management daemon
   Loaded: loaded (/etc/init.d/hostapd; generated; vendor preset: enabled)
   Active: active (running) since Sun 2018-08-05 16:55:06 UTC; 6min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 557 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/hostapd.service
           └─597 /usr/sbin/hostapd -B -P /run/hostapd.pid /etc/hostapd/hostapd.conf

Aug 05 16:55:04 raspberrypi systemd[1]: Starting LSB: Advanced IEEE 802.11 management daemon...
Aug 05 16:55:06 raspberrypi hostapd[557]: Starting advanced IEEE 802.11 management: hostapd.
Aug 05 16:55:06 raspberrypi systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.

이것은 내 dmesg입니다.

[    9.951912] bcm2835_alsa bcm2835_alsa: card created with 8 channels
[   10.988983] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[   11.023394] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001
[   11.023812] usbcore: registered new interface driver brcmfmac
[   11.550743] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
[   11.551907] brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 7.11.15 Compiler: 1.24.2 ClmImport: 1.24.1 Creation: 2014-05-26 10:53:55 Inc Data: 9.10.39 Inc Compiler: 1.29.4 Inc ClmImport: 1.36.3 Creation: 2017-10-23 03:47:14 
[   12.469798] Indeed it is in host mode hprt0 = 00001101
[   14.180038] uart-pl011 20201000.serial: no DMA platform data
[   14.366758] usb 1-1: reset high-speed USB device number 2 using dwc_otg
[   14.366994] Indeed it is in host mode hprt0 = 00001101
[   16.080543] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[   16.161385] mt7601u 1-1:1.0: ASIC revision: 76010001 MAC revision: 76010500
[   16.252009] mt7601u 1-1:1.0: Warning: unsupported EEPROM version 0d
[   16.252028] mt7601u 1-1:1.0: EEPROM ver:0d fae:00
[   16.771510] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   16.776815] usbcore: registered new interface driver mt7601u
[   18.456287] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[   18.625722] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   18.625756] brcmfmac: power management disabled
[   18.753324] Bluetooth: Core ver 2.22
[   18.753500] NET: Registered protocol family 31
[   18.753508] Bluetooth: HCI device and connection manager initialized
[   18.753534] Bluetooth: HCI socket layer initialized
[   18.753548] Bluetooth: L2CAP socket layer initialized
[   18.753612] Bluetooth: SCO socket layer initialized
[   18.781182] Bluetooth: HCI UART driver ver 2.3
[   18.781197] Bluetooth: HCI UART protocol H4 registered
[   18.781202] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   18.786141] Bluetooth: HCI UART protocol Broadcom registered
[   19.362969] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   19.362997] Bluetooth: BNEP filters: protocol multicast
[   19.363027] Bluetooth: BNEP socket layer initialized
[   20.245972] wlan1: authenticate with 48:ee:0c:1f:d8:73
[   20.308671] wlan1: send auth to 48:ee:0c:1f:d8:73 (try 1/3)
[   20.310399] wlan1: authenticated
[   20.313517] wlan1: associate with 48:ee:0c:1f:d8:73 (try 1/3)
[   20.317906] wlan1: RX AssocResp from 48:ee:0c:1f:d8:73 (capab=0x411 status=0 aid=7)
[   20.362268] wlan1: associated
[   21.491599] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   32.303384] nf_conntrack version 0.5.0 (7168 buckets, 28672 max)
[   33.692972] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

wlan1라즈베리파이가 연결된 무선 네트워크입니다. wlan0라즈베리파이에 내장된 Wi-Fi입니다. 오류가 표시되지 않습니다.

이것은 /var/log/syslog:

Aug  5 16:55:06 raspberrypi kernel: [   33.692972] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Aug  5 16:55:06 raspberrypi hostapd[557]: Starting advanced IEEE 802.11 management: hostapd.
Aug  5 16:55:06 raspberrypi dnsmasq[599]: started, version 2.76 cachesize 150
Aug  5 16:55:06 raspberrypi systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.
Aug  5 16:55:06 raspberrypi dnsmasq[599]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Aug  5 16:55:06 raspberrypi dnsmasq-dhcp[599]: DHCP, IP range 192.168.4.2 -- 192.168.4.20, lease time 1d
Aug  5 16:55:06 raspberrypi dnsmasq[599]: reading /run/dnsmasq/resolv.conf
Aug  5 16:55:06 raspberrypi dnsmasq[599]: using nameserver 192.168.25.1#53
Aug  5 16:55:06 raspberrypi dnsmasq[599]: read /etc/hosts - 5 addresses
Aug  5 16:55:06 raspberrypi dnsmasq[600]: Too few arguments.
Aug  5 16:55:06 raspberrypi systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Aug  5 16:55:06 raspberrypi systemd[1]: Reached target Multi-User System.
Aug  5 16:55:06 raspberrypi systemd[1]: Reached target Graphical Interface.
Aug  5 16:55:06 raspberrypi systemd[1]: Starting Update UTMP about System Runlevel Changes...
Aug  5 16:55:06 raspberrypi systemd[1]: Reached target Host and Network Name Lookups.
Aug  5 16:55:06 raspberrypi systemd[1]: Started Update UTMP about System Runlevel Changes.
Aug  5 16:55:06 raspberrypi systemd[1]: Startup finished in 1.995s (kernel) + 32.367s (userspace) = 34.362s.
Aug  5 16:55:07 raspberrypi avahi-daemon[188]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::ba27:ebff:feaa:1f8.
Aug  5 16:55:07 raspberrypi avahi-daemon[188]: New relevant interface wlan0.IPv6 for mDNS.
Aug  5 16:55:07 raspberrypi avahi-daemon[188]: Registering new address record for fe80::ba27:ebff:feaa:1f8 on wlan0.*.
Aug  5 16:55:28 raspberrypi systemd[1]: Time has been changed
Aug  5 16:55:28 raspberrypi systemd[1]: apt-daily-upgrade.timer: Adding 27min 26.673226s random time.
Aug  5 16:55:28 raspberrypi systemd-timesyncd[173]: Synchronized to time server [2a01:4f8:110:30e1::9]:123 (2.debian.pool.ntp.org).
Aug  5 16:55:28 raspberrypi systemd[1]: apt-daily.timer: Adding 7h 36min 12.296585s random time.
Aug  5 17:01:05 raspberrypi systemd[1]: Created slice User Slice of pi.
Aug  5 17:01:05 raspberrypi systemd[1]: Started Session c1 of user pi.
Aug  5 17:01:05 raspberrypi systemd[1]: Starting User Manager for UID 1000...
Aug  5 17:01:06 raspberrypi systemd[668]: Listening on GnuPG cryptographic agent and passphrase cache.
Aug  5 17:01:06 raspberrypi systemd[668]: Listening on GnuPG cryptographic agent (access for web browsers).
Aug  5 17:01:06 raspberrypi systemd[668]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Aug  5 17:01:06 raspberrypi systemd[668]: Reached target Timers.
Aug  5 17:01:06 raspberrypi systemd[668]: Reached target Paths.
Aug  5 17:01:06 raspberrypi systemd[668]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Aug  5 17:01:06 raspberrypi systemd[668]: Reached target Sockets.
Aug  5 17:01:06 raspberrypi systemd[668]: Reached target Basic System.
Aug  5 17:01:06 raspberrypi systemd[668]: Reached target Default.
Aug  5 17:01:06 raspberrypi systemd[668]: Startup finished in 178ms.
Aug  5 17:01:06 raspberrypi systemd[1]: Started User Manager for UID 1000.
Aug  5 17:02:40 raspberrypi wpa_supplicant[373]: wlan1: WPA: Group rekeying completed with 48:ee:0c:1f:d8:73 [GTK=CCMP]

저도 오류가 안보이네요

고쳐 쓰다: 문제는 누군가가 네트워크에 연결되어 있을 때만 발생하는 것 같습니다. 시스템 로그의 마지막 메시지는 다음과 같습니다.

Aug  5 17:39:27 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: associated
Aug  5 17:39:27 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 RADIUS: starting accounting session 5B672BEA-00000000
Aug  5 17:39:27 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: pairwise key handshake completed (RSN)
Aug  5 17:39:27 raspberrypi dnsmasq-dhcp[599]: DHCPDISCOVER(wlan0) 38:80:df:35:8a:d3
Aug  5 17:39:27 raspberrypi dnsmasq-dhcp[599]: DHCPOFFER(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 17:39:27 raspberrypi dnsmasq-dhcp[599]: DHCPREQUEST(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 17:39:27 raspberrypi dnsmasq-dhcp[599]: DHCPACK(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 17:41:35 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: disassociated
Aug  5 17:41:35 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: disassociated

하지만 오류가 표시되지 않습니다.

고쳐 쓰다:

이것은 내 /etc/hostapd/hostapd.conf파일입니다:

interface=wlan0
driver=nl80211
ssid=NameOfNetwork
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=AardvarkBadgerHedgehog
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

고쳐 쓰다:

Hostapd에 대한 자세한 내용은 다음과 같습니다.

Aug  5 18:21:22 raspberrypi systemd[1]: Started User Manager for UID 1000.
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: associated
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: event 1 notification
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: start authentication
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.1X: unauthorizing port
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: sending 1/4 msg of 4-Way Handshake
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: EAPOL-Key timeout
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: sending 1/4 msg of 4-Way Handshake
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: received EAPOL-Key frame (2/4 Pairwise)
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: sending 3/4 msg of 4-Way Handshake
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: received EAPOL-Key frame (4/4 Pairwise)
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.1X: authorizing port
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 RADIUS: starting accounting session 5B674006-00000000
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: pairwise key handshake completed (RSN)
Aug  5 18:21:40 raspberrypi dnsmasq-dhcp[599]: DHCPDISCOVER(wlan0) 38:80:df:35:8a:d3
Aug  5 18:21:40 raspberrypi dnsmasq-dhcp[599]: DHCPOFFER(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 18:21:40 raspberrypi dnsmasq-dhcp[599]: DHCPREQUEST(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 18:21:40 raspberrypi dnsmasq-dhcp[599]: DHCPACK(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 18:21:54 raspberrypi systemd[664]: Time has been changed
Aug  5 18:21:54 raspberrypi systemd[1]: Time has been changed
Aug  5 18:21:54 raspberrypi systemd[1]: apt-daily.timer: Adding 10h 13min 39.087355s random time.
Aug  5 18:21:54 raspberrypi systemd[1]: apt-daily-upgrade.timer: Adding 28min 49.504522s random time.
Aug  5 18:22:27 raspberrypi systemd[1]: Time has been changed
Aug  5 18:22:27 raspberrypi systemd[1]: apt-daily.timer: Adding 55min 40.693498s random time.
Aug  5 18:22:27 raspberrypi systemd[1]: apt-daily-upgrade.timer: Adding 23min 53.062642s random time.
Aug  5 18:22:27 raspberrypi systemd[664]: Time has been changed
Aug  5 18:24:06 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: disassociated
Aug  5 18:24:06 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: event 2 notification
Aug  5 18:24:06 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.1X: unauthorizing port
Aug  5 18:24:14 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: disassociated

고쳐 쓰다:

이전에 USB 이더넷을 사용하여 이 Raspberry Pi를 설정했습니다. 이제 새 이미지를 다시 설치하고 무선 AP 기능에 필요한 사항을 구성했습니다. 문제가 계속 발생합니다. 이 문제는 이후에도 계속 발생하므로 sudo apt update && sudo apt upgrade -y구성 오류라기보다는 버그에 더 가깝습니다.

누구든지 이것을 디버깅하는 방법을 알고 있습니까?

답변1

이러한 매개변수를 추가하거나 수정하면 /etc/hostapd/hostapd.conf문제가 해결되었습니다.

channel=6
ieee80211n=1
wmm_enabled=1

답변2

휴대폰에서 내 SSID를 볼 수 있고 몇 초 동안 연결하여 사용할 수도 있습니다. 그러면 SSID가 사라집니다.

당신의/etc/hostapd/hostapd.conf기본값은 다음과 같습니다.

# Send empty SSID in beacons and ignore probe request frames that do not 
# specify full SSID, i.e., require stations to know SSID. 
# default: disabled (0) 
# 1 = send empty (length=0) SSID in beacon and ignore probe request for 
#     broadcast SSID 
# 2 = clear SSID (ASCII 0), but keep the original length (this may be required 
#     with some clients that do not support empty SSID) and ignore probe 
#     requests for broadcast 
SSID ignore_broadcast_ssid=0

비활성화되어 있고 변경되지 않았는지 확인하십시오.

또한 이 Raspberry.PI 기사: "숨겨진 네트워크로 Wi-Fi를 작동시키세요"제안:

"/etc/wpa_supplicant/wpa_supplicant.conf 파일에 scan_ssid=1을 추가해야 합니다."

예:

network={
ssid="bigboss"
scan_ssid=1
psk="mypassword"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

관련 정보