我在 Ubuntu 20.04.1 LTS 上运行 Hostapd。它设置为作为服务运行,至少我是这么认为的。
每当我重新启动系统时,状态都表明它运行正常。
root@beelink:~# 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: active (running) since Wed 2020-11-04 00:57:49 UTC; 39s ago
Process: 919 ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=0/SUCCE>
Main PID: 1028 (hostapd)
Tasks: 1 (limit: 4434)
Memory: 2.5M
CGroup: /system.slice/hostapd.service
└─1028 /usr/sbin/hostapd -B -P /run/hostapd.pid -B /root/ap/hostapd.conf
Nov 04 00:57:48 beelink systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator...
Nov 04 00:57:48 beelink hostapd[919]: Configuration file: /root/ap/hostapd.conf
Nov 04 00:57:48 beelink hostapd[919]: Using interface wlx00c0ca989ef3 with hwaddr 00:c0:ca:98:9e:f3 and ssid "testt"
Nov 04 00:57:49 beelink hostapd[919]: wlx00c0ca989ef3: interface state UNINITIALIZED->ENABLED
Nov 04 00:57:49 beelink hostapd[919]: wlx00c0ca989ef3: AP-ENABLED
Nov 04 00:57:49 beelink systemd[1]: Started Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
但是我在任何 wifi 设备中都没有看到我的热点。
如果我运行以下命令:
service hostapd restart
它工作正常,我的 wifi 也显示出来了。与全新启动时显示的启动消息完全相同。
尽管启动日志显示它应该正在运行,但为什么它不工作?