我有配置了hostapd的raspi。我想要做的是运行一个nodejs服务器,所以如果有互联网通过eth0它会成为一个热点,当没有互联网通过eth0它连接到已知的无线网络。我的问题出在我的interfaces文件中,看起来像这样
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet static
address 172.24.1.1
netmask 255.255.255.0
network 172.24.1.0
broadcast 172.24.1.255
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
当我发表评论时
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
我可以使用hostapd制作AP。但不能作为客户端连接到wifi。如果我发表评论
iface wlan0 inet static
address 172.24.1.1
netmask 255.255.255.0
network 172.24.1.0
broadcast 172.24.1.255
我可以连接到wifi网络,但hostapd不会让我做一个AP。如果我两个都离开,因为它们似乎没什么用。
提前谢谢大家。