Я пытаюсь использовать мою малину Pi как горячую точку Wifi и следую следующему руководству: Pi как горячая точка Wi-Fi. Однако я столкнулся с несколькими проблемами, возможно, связанными, которые не были полностью решены с помощью других подобных вопросов, заданных здесь, когда речь заходит о подключении внешнего устройства к Wi-Fi.
Чтобы отметить, в настоящее время мой pi подключается к сетевому кабелю, который подключается к концентратору, который подается от другого Ethernet-кабеля, подключенного к маршрутизатору. Pi 3B + использует встроенный wifi
Запуск службы hostapd будет казаться прекрасным и появится на моем телефоне в качестве доступной сети:
pi@raspberrypi:~ $ sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Failed to create interface mon.wlan0: -95 (Operation not supported)
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr b8:27:eb:43:56:bc and ssid "Stuxnet"
wlan0: interface state COUNTRY_UPDATE->ENABLED
wlan0: AP-ENABLED
Однако при попытке для запуска isc-dhcp-сервера я получаю следующее:
pi@raspberrypi:~ $ sudo service isc-dhcp-server start
Job for isc-dhcp-server.service failed because the control process exited
with error code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for
details.
journalctl -xe выплевывает следующее:
pi@raspberrypi:~ $ journalctl -xe
Apr 09 00:23:34 raspberrypi dhcpd[2265]: Not configured to listen on any
interfa
Apr 09 00:23:34 raspberrypi dhcpd[2265]:
Apr 09 00:23:34 raspberrypi dhcpd[2265]: If you think you have received
this mes
Apr 09 00:23:34 raspberrypi dhcpd[2265]: than a configuration issue
please read
Apr 09 00:23:34 raspberrypi dhcpd[2265]: bugs on either our web page at
www.isc.
Apr 09 00:23:34 raspberrypi dhcpd[2265]: before submitting a bug. These
pages e
Apr 09 00:23:34 raspberrypi dhcpd[2265]: process and the information we
find hel
Apr 09 00:23:34 raspberrypi dhcpd[2265]:
Apr 09 00:23:34 raspberrypi dhcpd[2265]: exiting.
Apr 09 00:23:36 raspberrypi isc-dhcp-server[2253]: Starting ISC DHCPv4
server: d
Apr 09 00:23:36 raspberrypi isc-dhcp-server[2253]: failed!
Apr 09 00:23:36 raspberrypi systemd[1]: isc-dhcp-server.service: Control
process
Apr 09 00:23:36 raspberrypi systemd[1]: Failed to start LSB: DHCP server.
-- Subject: Unit isc-dhcp-server.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit isc-dhcp-server.service has failed.
--
-- The result is failed.
Apr 09 00:23:36 raspberrypi systemd[1]: isc-dhcp-server.service: Unit
entered fa
Apr 09 00:23:36 raspberrypi systemd[1]: isc-dhcp-server.service: Failed
with res
Apr 09 00:23:36 raspberrypi sudo[2225]: pam_unix(sudo:session): session
closed f
lines 1901-1923/1923 (END)
Apr 09 00:23:34 raspberrypi dhcpd[2265]: Not configured to listen on any
interfaces!
Apr 09 00:23:34 raspberrypi dhcpd[2265]:
Apr 09 00:23:34 raspberrypi dhcpd[2265]: If you think you have received
this message due to a bug rather
Apr 09 00:23:34 raspberrypi dhcpd[2265]: than a configuration issue
please read the section on submitting
Apr 09 00:23:34 raspberrypi dhcpd[2265]: bugs on either our web page at
www.isc.org or in the README file
Apr 09 00:23:34 raspberrypi dhcpd[2265]: before submitting a bug. These
pages explain the proper
Apr 09 00:23:34 raspberrypi dhcpd[2265]: process and the information we
find helpful for debugging..
Apr 09 00:23:34 raspberrypi dhcpd[2265]:
Apr 09 00:23:34 raspberrypi dhcpd[2265]: exiting.
Apr 09 00:23:36 raspberrypi isc-dhcp-server[2253]: Starting ISC DHCPv4
server: dhcpdcheck syslog for diagnostics. ... failed!
Apr 09 00:23:36 raspberrypi isc-dhcp-server[2253]: failed!
Apr 09 00:23:36 raspberrypi systemd[1]: isc-dhcp-server.service: Control
process exited, code=exited status=1
Apr 09 00:23:36 raspberrypi systemd[1]: Failed to start LSB: DHCP server.
-- Subject: Unit isc-dhcp-server.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit isc-dhcp-server.service has failed.
--
-- The result is failed.
Apr 09 00:23:36 raspberrypi systemd[1]: isc-dhcp-server.service: Unit
entered failed state.
Apr 09 00:23:36 raspberrypi systemd[1]: isc-dhcp-server.service: Failed
with result 'exit-code'.
Apr 09 00:23:36 raspberrypi sudo[2225]: pam_unix(sudo:session): session
closed for user root
Мои конфигурационные файлы выглядят следующим образом,
dhcp [truncated]:
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
# deny members of "foo";
# range 10.0.29.10 10.0.29.230;
# }
#}
subnet 192.168.42.0 netmask 255.255.255.0{
range 192.168.42.10 192.168.42.50;
option broadcast-address 192.168.42.255;
option routers 192.168.42.1;
default-lease-time 600;
max-lease-time 7200;
option domain-name "local";
option domain-name-servers 8.8.8.8, 8.8.4.4;
}
/ etc / default / isc-dhcp-server:
# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)
# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
#DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf
# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPDv4_PID=/var/run/dhcpd.pid
#DHCPDv6_PID=/var/run/dhcpd6.pid
# Additional options to start dhcpd with.
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="wlan0"
INTERFACESv6="wlan0"
/ etc / network / 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
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.42.1
netmask 225.225.225.0
Я попытался кое-что из других вопросов, например, начиная с ifup wlan0:
pi@raspberrypi:~ $ sudo ifup wlan0
Error: inet prefix is expected rather than "192.168.42.1/225.225.225.0".
ifup: failed to bring up wlan0
Телефоны будут подключаться к месту, но без подключения - он попадает в рукопожатие, а затем держится:
wlan0: STA 90:60:f1:b2:fc:96 IEEE 802.11: associated
wlan0: AP-STA-CONNECTED 90:60:f1:b2:fc:96
wlan0: STA 90:60:f1:b2:fc:96 RADIUS: starting accounting session
5ACAC8C4-00000000
wlan0: STA 90:60:f1:b2:fc:96 WPA: pairwise key handshake completed (RSN)
Надеюсь, это просто опечатка, которую я пропустил, но я не могу это понять. Это новая установка.