Nie można zmusić BananaPi do uruchomienia Punktu Dostępowego


0

Mam kartę Banana Pi M2 + załadowaną do systemu operacyjnego Ubuntu 16.04 V1.1. Usiłuję doprowadzić urządzenie do działania jako punkt dostępu. Próbowałem wszystkich metod w Google, ale nadal nie udało mi się uruchomić AP.

Wysłałem pliki systemowe, abyś mógł przejrzeć ...

ifconfig:

eth0      Link encap:Ethernet  HWaddr 1e:2b:5e:6d:88:af
          inet addr:192.168.55.227  Bcast:192.168.55.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34745 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3569 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4189588 (4.1 MB)  TX bytes:479249 (479.2 KB)
          Interrupt:114

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1277 (1.2 KB)  TX bytes:1277 (1.2 KB)

wlan0     Link encap:Ethernet  HWaddr b0:f1:ec:2c:ea:c6
          inet addr:172.24.1.1  Bcast:172.24.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:4640 (4.6 KB)

wlan1     Link encap:Ethernet  HWaddr c2:25:e9:25:ab:14
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Używam wlan0 jako AP i wlan1 jako stacji.

/ etc / network / interfaces

auto lo
    iface lo inet loopback

auto eth0
    iface eth0 inet static
    address 192.168.55.227
    netmask 255.255.255.0
    network 192.168.55.0
    broadcast 192.168.55.255
    gateway 192.168.55.1
    dns-nameservers 192.168.55.1

auto wlan0
    iface wlan0 inet static
    hostapd /etc/hostapd/hostapd.conf
    address 172.24.1.1
    netmask 255.255.255.0
    network 172.24.1.0
    broadcast 172.24.1.255

allow-hotplug wlan1
    iface wlan1 inet dhcp
    wpa-ssid "hotspot"
    wpa-psk "passkey1234"

/etc/hostapd/hostapd.conf

interface=wlan0
driver=wl
auth_algs=1
ssid=FreeOpenWifi
channel=1
hw_mode=g
country_code=IN

/etc/dnsmasq.conf

interface=wlan0
bind-interfaces
no-resolv
dhcp-range=172.24.1.50,172.24.1.150,255.255.255.0,12h

Robiąc

systemctl restart hostapd
systemctl restart dnsmasq

Nie dostaję żadnego błędu.

Output of journalctl -xe

-- Subject: Unit dnsmasq.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnsmasq.service has begun shutting down.
Nov 23 21:23:41 bpi-iot-ros-ai dnsmasq[5808]: exiting on receipt of SIGTERM
Nov 23 21:23:42 bpi-iot-ros-ai systemd[1]: Stopped dnsmasq - A lightweight DHCP an
-- Subject: Unit dnsmasq.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnsmasq.service has finished shutting down.
Nov 23 21:23:42 bpi-iot-ros-ai systemd[1]: Starting dnsmasq - A lightweight DHCP a
-- Subject: Unit dnsmasq.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnsmasq.service has begun starting up.
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq[12380]: dnsmasq: syntax check OK.
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq[12401]: started, version 2.75 cachesize      
-- Subject: Unit dnsmasq.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnsmasq.service has begun shutting down.
Nov 23 21:23:41 bpi-iot-ros-ai dnsmasq[5808]: exiting on receipt of SIGTERM
Nov 23 21:23:42 bpi-iot-ros-ai systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
-- Subject: Unit dnsmasq.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnsmasq.service has finished shutting down.
Nov 23 21:23:42 bpi-iot-ros-ai systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
-- Subject: Unit dnsmasq.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnsmasq.service has begun starting up.
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq[12380]: dnsmasq: syntax check OK.
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq[12401]: started, version 2.75 cachesize 150
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq[12401]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inoti
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq[12401]: warning: ignoring resolv-file flag because no-resolv is set
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq-dhcp[12401]: DHCP, IP range 172.24.1.50 -- 172.24.1.150, lease time 12h
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq-dhcp[12401]: DHCP, IP range 172.24.1.50 -- 172.24.1.150, lease time 12h
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq-dhcp[12401]: DHCP, sockets bound exclusively to interface wlan0
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq[12401]: using nameserver 8.8.8.8#53
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq[12401]: using nameserver 8.8.8.8#53
Nov 23 21:23:42 bpi-iot-ros-ai dnsmasq[12401]: read /etc/hosts - 7 addresses
Nov 23 21:23:53 bpi-iot-ros-ai systemd[1]: Started dnsmasq - A lightweight DHCP 
and caching DNS server.
-- Subject: Unit dnsmasq.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnsmasq.service has finished starting up.
--
-- The start-up result is done.
Nov 23 21:23:53 bpi-iot-ros-ai systemd[1]: Reached target Host and Network Name 
Lookups.
-- Subject: Unit nss-lookup.target has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nss-lookup.target has finished starting up.
--
-- The start-up result is done.

Co robię źle? Plz. pomóżcie tutaj, jestem taki zdezorientowany.

Wyniki statusu systemctl hostapd

● hostapd.service - LSB: Advanced IEEE 802.11 management daemon
   Loaded: loaded (/etc/init.d/hostapd; bad; vendor preset: enabled)
   Active: active (exited) since Fri 2018-11-23 21:33:17 CST; 2 days ago
     Docs: man:systemd-sysv-generator(8)
  Process: 924 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS)

Nov 23 21:33:16 bpi-iot-ros-ai systemd[1]: Starting LSB: Advanced IEEE 802.11 management daemon...
Nov 23 21:33:17 bpi-iot-ros-ai hostapd[924]:  * Starting advanced IEEE 802.11 management hostapd
Nov 23 21:33:17 bpi-iot-ros-ai hostapd[924]:    ...fail!
Nov 23 21:33:17 bpi-iot-ros-ai systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.
Nov 26 12:28:45 bpi-iot-ros-ai systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.

Wyjście sudo hostapd -d /etc/hostapd/hostapd.conf

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: Could not add multicast membership for vendor events: -2 (No such file or                                                                                       directory)
rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=3 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=4 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=5 type=2 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Using driver-based off-channel TX
nl80211: TDLS supported
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
nl80211: interface wlan0 in phy phy2
nl80211: Set mode ifindex 8 iftype 3 (AP)
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0xb6f64d08 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) 
nl_handle=0xb6f64d08 match=
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=8)
netlink: Operstate: ifindex=8 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0xb6f61cd8)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0xb6f61cd8)
wlan0: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss wlan0
wlan0: AP-DISABLED
hostapd_cleanup(hapd=0xb6f629a0 (wlan0))
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0xb6f61cd8)
hostapd_interface_free: free hapd 0xb6f629a0
hostapd_cleanup_iface(0xb6f61cd8)
hostapd_cleanup_iface_partial(0xb6f61cd8)
hostapd_cleanup_iface: free iface=0xb6f61cd8

Kiedy mówisz, że to nie działa - czy AP nie pojawia się, czy klienci, którzy się łączą, nie dostają adresów IP lub nie mogą połączyć się z Internetem?
Journeyman Geek

@JourneymanGeek AP nie pojawia się
ron123456

Jakie są wyniki systemctl status hostapd?
Journeyman Geek

@JourneymanGeek hostapd nie działa. Opublikowałem wynik.
ron123456

Hmm Czy możemy potwierdzić, że suplikant wpa nie działa dla tego adaptera?
Journeyman Geek

Odpowiedzi:


0

Z tego, co widzę z tego, co masz - naprawdę konfigurujesz router.

Wydaje się to także mieszanką kilku różnych zestawów instrukcji. Widzę dwie podstawowe kwestie. Pierwszym z nich jest sposób uruchamiania hostapd.

auto lo
    iface lo inet loopback

auto eth0
    iface eth0 inet static
    address 192.168.55.227
    netmask 255.255.255.0
    network 192.168.55.0
    broadcast 192.168.55.255
    gateway 192.168.55.1
    dns-nameservers 192.168.55.1

auto wlan0
    iface wlan0 inet static
    address 172.24.1.1
    netmask 24

allow-hotplug wlan1
    iface wlan1 inet dhcp
    wpa-ssid "hotspot"
    wpa-psk "passkey123

Mniej więcej usunięto uruchamianie hostapd z sieci.

Następnie powinieneś biec sudo systemctl start hostapd- sprawdź, czy to się pojawi, i sudo systemctl enable hostapdupewnij się, że zawsze się zaczyna. Twój plik konfiguracyjny hostapd jest trochę wybredny. Mój napisałem od zera, wykonując kopię ustawień domyślnych $ zcat /usr/share/doc/hostapd/examples/hostapd.conf.gz | sudo tee /etc/hostapd/hostapd.conf > /dev/null.

W tym momencie powinieneś być w stanie połączyć się z AP - choć będziesz musiał skonfigurować przekazywanie pakietów i tak dalej w jądrze i zaporze ogniowej, a to zupełnie inny problem.


Nie znajduję teraz żadnych błędów ... ale AP wciąż nie idzie w górę
ron123456,

Co się stanie, gdy uruchomisz go samodzielnie sudo hostapd -d /etc/hostapd/hostapd.conf
Journeyman Geek

Czy problem dotyczy inicjalizacji sterownika wlan?
ron123456

Jakoś ... wlan0 nie jest w stanie służyć jako AP ... więc odwróciłem ich role ... czyniąc wlan0 jako Station i wlan1 jako AP ... co działa dobrze
ron123456
Korzystając z naszej strony potwierdzasz, że przeczytałeś(-aś) i rozumiesz nasze zasady używania plików cookie i zasady ochrony prywatności.
Licensed under cc by-sa 3.0 with attribution required.