Problemas de conexão, Raspberry Pi Wifi Hotspot

0

Estou tentando usar meu Raspberry Pi como ponto de acesso Wi-Fi e tenho seguido o seguinte guia: Pi como hotspot wifi . No entanto, encontrei vários problemas, possivelmente relacionados, que não foram completamente resolvidos por meio de outras perguntas semelhantes feitas aqui quando se trata de conectar um dispositivo externo ao Wi-Fi.

Apenas para observar, atualmente meu pi é conectado a um cabo ethernet que vai para um hub que é alimentado por outro cabo Ethernet conectado ao roteador. O Pi 3B + está usando o wifi embutido

Iniciar o serviço hostapd parece estar bem e aparece no meu telefone como uma rede disponível:

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 

No entanto, ao tentar iniciar o servidor isc-dhcp, recebo o seguinte:

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 apresenta o seguinte:

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

Meus arquivos de configuração são os seguintes,

dhcp [truncado]:

# 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

Eu tentei algumas coisas de outras questões aqui, como iniciar com o 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

Os telefones vão se conectar ao local, mas sem uma conexão - ele chega ao aperto de mão e, em seguida, segura:

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)

Espero que seja apenas um erro de digitação que eu perdi em algum lugar, mas não consigo entender. Esta é uma nova instalação também.

    
por Question_asker 09.04.2018 / 02:44

0 respostas