Hostapd가 내 장치 중 하나에서 작동하지 않습니다

Hostapd가 내 장치 중 하나에서 작동하지 않습니다

WiFi 어댑터를 사용하여 Raspberry Pi Compute Module 3+를 액세스 포인트로 설정하려고 합니다.

나는 이 튜토리얼을 따르고 있습니다:https://elinux.org/RPI-wireless-hotspot.

동글 EP-N8508GS를 사용하여 액세스 포인트를 설정할 수 있지만 TL-WN722N을 사용하려고 하면 다음 오류가 발생합니다.

pi@raspberrypi:~ $ sudo service hostapd start
Job for hostapd.service failed because the control process exited with error code.
See "systemctl status hostapd.service" and "journalctl -xe" for details.

이는 nl80211 드라이버의 문제인 것 같습니다. 그런데 왜 첫 번째 동글에서는 작동하고 다른 동글에서는 작동하지 않는지 잘 모르겠습니다. 첫 번째 동글은 AP 모드를 지원하지 않고 장치가 연결을 시도할 때 커널이 충돌하기 때문에 tp-link 동글을 사용해 보고 싶습니다.

$ 서비스 호스트 상태

pi@raspberrypi:~ $ service hostapd status
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
   Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2019-05-06 03:49:27 BST; 1
  Process: 1103 ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF

May 06 03:49:27 raspberrypi systemd[1]: hostapd.service: Control process exited, code=exited
May 06 03:49:27 raspberrypi systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.
May 06 03:49:27 raspberrypi systemd[1]: hostapd.service: Unit entered failed state.
May 06 03:49:27 raspberrypi systemd[1]: hostapd.service: Failed with result 'exit-code'.

$journalctl -xe

pi@raspberrypi:~ $ journalctl -xe
May 06 04:10:22 raspberrypi hostapd[619]: nl80211: Driver does not support authentication/ass
May 06 04:10:22 raspberrypi hostapd[619]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
May 06 04:10:22 raspberrypi hostapd[619]: nl80211 driver initialization failed.
May 06 04:10:22 raspberrypi hostapd[619]: wlan0: interface state UNINITIALIZED->DISABLED
May 06 04:10:22 raspberrypi hostapd[619]: wlan0: AP-DISABLED
May 06 04:10:22 raspberrypi hostapd[619]: hostapd_free_hapd_data: Interface wlan0 wasn't star
May 06 04:10:22 raspberrypi systemd[1]: hostapd.service: Control process exited, code=exited
May 06 04:10:22 raspberrypi systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.
-- Subject: Unit hostapd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit hostapd.service has failed.
--
-- The result is failed.
May 06 04:10:22 raspberrypi systemd[1]: hostapd.service: Unit entered failed state.
May 06 04:10:22 raspberrypi systemd[1]: hostapd.service: Failed with result 'exit-code'.
May 06 04:10:25 raspberrypi systemd[1]: hostapd.service: Service hold-off time over, scheduli
May 06 04:10:25 raspberrypi systemd[1]: Stopped Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/W
-- Subject: Unit hostapd.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit hostapd.service has finished shutting down.
May 06 04:10:25 raspberrypi systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/
-- Subject: Unit hostapd.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit hostapd.service has begun starting up.
May 06 04:10:25 raspberrypi hostapd[621]: Configuration file: /etc/hostapd/hostapd.conf
May 06 04:10:25 raspberrypi hostapd[621]: nl80211: Driver does not support authentication/ass
May 06 04:10:25 raspberrypi hostapd[621]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
May 06 04:10:25 raspberrypi hostapd[621]: nl80211 driver initialization failed.
May 06 04:10:25 raspberrypi hostapd[621]: wlan0: interface state UNINITIALIZED->DISABLED
May 06 04:10:25 raspberrypi hostapd[621]: wlan0: AP-DISABLED
May 06 04:10:25 raspberrypi hostapd[621]: hostapd_free_hapd_data: Interface wlan0 wasn't star
May 06 04:10:25 raspberrypi systemd[1]: hostapd.service: Control process exited, code=exited
May 06 04:10:25 raspberrypi systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.
-- Subject: Unit hostapd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit hostapd.service has failed.
--
-- The result is failed.
May 06 04:10:25 raspberrypi systemd[1]: hostapd.service: Unit entered failed state.
May 06 04:10:25 raspberrypi systemd[1]: hostapd.service: Failed with result 'exit-code'.

내 구성은 다음과 같습니다.

/lib/systemd/system/hostapd.service

pi@raspberrypi:~ $ cat /lib/systemd/system/hostapd.service
[Unit]
Description=Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
After=network.target

[Service]
Type=forking
PIDFile=/run/hostapd.pid
Restart=on-failure
RestartSec=2
EnvironmentFile=/etc/default/hostapd
ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF}

/etc/default/hostapd

pi@raspberrypi:~ $ cat /etc/default/hostapd
# Defaults for hostapd initscript
#
# See /usr/share/doc/hostapd/README.Debian for information about alternative
# methods of managing hostapd.
#
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
# file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
#
DAEMON_CONF="/etc/hostapd/hostapd.conf"

# Additional daemon options to be appended to hostapd command:-
#       -d   show more debug messages (-dd for even more)
#       -K   include key data in debug messages
#       -t   include timestamps in some debug messages
#
# Note that -B (daemon mode) and -P (pidfile) options are automatically
# configured by the init.d script and must not be added to DAEMON_OPTS.
#
#DAEMON_OPTS=""

/etc/hostapd/hostapd.conf

pi@raspberrypi:~ $ cat /etc/hostapd/hostapd.conf
interface=wlan0
ssid=MyAP
hw_mode=g
channel=1
auth_algs=1
ieee80211n=1          # 802.11n support
wmm_enabled=1         # QoS support
ht_capab=[HT40+][SHORT-GI-20][DSSS_CCK-40]

답변1

tp-link USB 동글 소프트-AP용 드라이버가 필요한 것 같습니다. 이 드라이버를 설치하여 이 문제를 해결했습니다. 당신은 그것을 찾을 수 있습니다 :여기

관련 정보