Neue Verbindung konnte nicht hinzugefügt werden: (2) Eine „Wireless“-Einstellung mit einer gültigen SSID ist erforderlich, wenn kein AP-Pfad angegeben wurde

Neue Verbindung konnte nicht hinzugefügt werden: (2) Eine „Wireless“-Einstellung mit einer gültigen SSID ist erforderlich, wenn kein AP-Pfad angegeben wurde

Ich versuche gerade, ein drahtloses Netzwerk von Arch-Linux aus freizugeben. In den Netzwerkeinstellungen gibt es eine Schaltfläche, mit der ich dies tun kann:

Netzwerkeinstellungen „Als Hotspot verwenden…“

Ich drücke die Schaltfläche „Einschalten“, denn das ist genau das, wonach ich suche!

Wi-Fi Hotspot Popup Einschalten

Sondern im Terminal mit folgendem Befehl:

$ sudo journalctl -xef

Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.8790] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.8928] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.8967] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.9001] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.9011] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.9019] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.9029] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.9037] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.9046] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.
Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.9055] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.
Nov 03 08:39:53 zbookarch NetworkManager[477]: <info>  [1478176793.9064] audit: op="connection-add-activate" pid=12673 uid=1000 result="fail" reason="A 'wireless' setting with a valid SSID is required if no AP path was given."
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.
Nov 03 08:39:53 zbookarch gnome-control-c[12673]: Failed to add new connection: (2) A 'wireless' setting with a valid SSID is required if no AP path was given.

Es gibt hier und da einige Dokumente, die ich noch lese, aber ich habe bisher nichts zu diesem Fehler gefunden, außer der genauen Fehlermeldung in einigen Quellcodes hier:

https://github.com/lcp/NetworkManager/blob/master/src/nm-device-wifi.c#L1211

Ein Freund hat es auf Fedora getestet und es hat sofort funktioniert. Er hat ESSIDhier eine Einstellung gefunden, die zu seinem erstellten WLAN passt:

/etc/sysconfig/network-scripts/ifcfg-Hotspot

Aber ich habe diesen Pfad unter Arch Linux nicht.

Es gibtdiese Software_access_point Wiki-Seite auf Archdort finden sich möglicherweise Informationen zum Erstellen eines Hotspots. Ich werde das später verfolgen, aber wenn jemand Informationen zum Fehler hat, wäre das großartig :)

Meine Netzwerkkarte sollte kompatibel sein:

$ iw list

Wiphy phy0
...
    Supported interface modes:
             * IBSS
             * managed
             * AP
             * AP/VLAN
             * monitor
             * P2P-client
             * P2P-GO
             * P2P-device

(Erfordert AP)

$ lspci -k | grep -A 3 -i network

3d:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)
        Subsystem: Intel Corporation Dual Band Wireless-AC 7260
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi

iwlwifikann gefunden werden indie folgende Liste:

| Driver                                             | Manufacturer        | cfg80211 | AP      | IBSS | mesh | monitor | PHY modes  | Buses                    |
|----------------------------------------------------|---------------------|----------|---------|------|------|---------|------------|--------------------------|
| iwlwifi                                            | Intel               | yes      | yes (6) | yes  | no   | yes     | A/B/G/N/AC | PCI-E                    |

Es sieht wirklich so aus, als ob es AP unterstützt.

erster Versuch

Ich habe versucht, hotspotd

Ich habe eine virtuelle Python2.7-Umgebung erstellt und installiert hotspotd==0.1.4. Dann habe ichHostapdUnd dnsmasq.

$ sudo pacman -S hostapd
$ mkvirtualenv -p $(which python27) hotspot
$ workon hotspot
$ pip install hotspotd==0.1.4
$ sudo hotspotd -h

usage: hotspotd [-h] [-v] {start,stop,configure}

A small daemon to create a wifi hotspot on linux

positional arguments:
  {start,stop,configure}

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose


$ sudo hotspotd configure

Verifying connections
Wifi interface found: wlp61s0
Network interface found: enp0s25:
Enter an IP address for your ap [192.168.45.1] :
Enter SSID [joe_ssid] :
Enter 10 digit password [1234567890] :
created hostapd configuration: run.conf
{'wlan': 'wlp61s0', 'SSID': 'joe_ssid', 'ip': '192.168.45.1', 'netmask': '255.255.255.0', 'password': '1234567890', 'inet': 'enp0s25:'}
Configuration saved


$ sudo hotspotd start -v 

command: ps aux |grep hostapd |grep -v grep
Verifying interfaces
command: ifconfig
done.
created interface: mon.wlp61s0 on IP: 192.168.45.1
command: ifconfig wlp61s0 up 192.168.45.1 netmask 255.255.255.0

wait..
command: sleep 2
command: ps aux |grep dnsmasq |grep -v grep
command: ps aux |grep hostapd |grep -v grep
enabling forward in sysctl.
command: sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
creating NAT using iptables: wlp61s0<->enp0s25:
command: iptables -P FORWARD ACCEPT
command: iptables --table nat --delete-chain
command: iptables --table nat -F
command: iptables --table nat -X
command: iptables -t nat -A POSTROUTING -o enp0s25: -j MASQUERADE
command: iptables -A FORWARD -i enp0s25: -o wlp61s0 -j ACCEPT -m state --state RELATED,ESTABLISHED
command: iptables -A FORWARD -i wlp61s0 -o enp0s25: -j ACCEPT
command: iptables -A OUTPUT --out-interface wlp61s0 -j ACCEPT
command: iptables -A INPUT --in-interface wlp61s0 -j ACCEPT
running dnsmasq
command: dnsmasq --dhcp-authoritative --interface=wlp61s0 --dhcp-range=192.168.45.20,192.168.45.100,255.255.255.0,4h

running hostapd
wait..
command: sleep 2
command: hostapd -B /home/gableroux/.virtualenvs/hotspot/lib/python2.7/site-packages/hotspotd/run.conf
Configuration file: /home/gableroux/.virtualenvs/hotspot/lib/python2.7/site-packages/hotspotd/run.conf
Could not read interface wlan0 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Could not read interface wlan0 flags: No such device
nl80211 driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED 
hostapd_free_hapd_data: Interface wlan0 wasn't started

hotspot is running.

Ich weiß nicht, warum das wlan0verwendet wird, also habe ich versucht, es zu bearbeiten /home/gableroux/.virtualenvs/hotspot/lib/python2.7/site-packages/hotspotd/run.confund wlan0durch das von mir erkannte zu ersetzen wlp61s0:

$ sudo hotspotd start -v

command: ps aux |grep hostapd |grep -v grep
Verifying interfaces
command: ifconfig
done.
created interface: mon.wlp61s0 on IP: 192.168.45.1
command: ifconfig wlp61s0 up 192.168.45.1 netmask 255.255.255.0

wait..
command: sleep 2
command: ps aux |grep dnsmasq |grep -v grep
command: ps aux |grep hostapd |grep -v grep
enabling forward in sysctl.
command: sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
creating NAT using iptables: wlp61s0<->enp0s25:
command: iptables -P FORWARD ACCEPT
command: iptables --table nat --delete-chain
command: iptables --table nat -F
command: iptables --table nat -X
command: iptables -t nat -A POSTROUTING -o enp0s25: -j MASQUERADE
command: iptables -A FORWARD -i enp0s25: -o wlp61s0 -j ACCEPT -m state --state RELATED,ESTABLISHED
command: iptables -A FORWARD -i wlp61s0 -o enp0s25: -j ACCEPT
command: iptables -A OUTPUT --out-interface wlp61s0 -j ACCEPT
command: iptables -A INPUT --in-interface wlp61s0 -j ACCEPT
running dnsmasq
command: dnsmasq --dhcp-authoritative --interface=wlp61s0 --dhcp-range=192.168.45.20,192.168.45.100,255.255.255.0,4h

running hostapd
wait..
command: sleep 2
command: hostapd -B /home/gableroux/.virtualenvs/hotspot/lib/python2.7/site-packages/hotspotd/run.conf
Configuration file: /home/gableroux/.virtualenvs/hotspot/lib/python2.7/site-packages/hotspotd/run.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlp61s0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlp61s0: interface state UNINITIALIZED->DISABLED
wlp61s0: AP-DISABLED 
hostapd_free_hapd_data: Interface wlp61s0 wasn't started

hotspot is running.

Immer noch kein Hotspot. Ich habe nach diesem Fehler gesucht

nl80211: Der Treibermodus konnte nicht konfiguriert werden.

ICHhabe diese verwandte Frage gefunden

Ich habe den empfohlenen Befehl ausprobiert:

$ sudo iwconfig wlp61s0 mode master

Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlp61s0 ; Invalid argument.

So, so, klingt, als könnte es doch an meiner Netzwerkkarte liegen.

Das ist unter MacOS definitiv viel einfacher :/

Bearbeiten: Ich kann dieses Problem nicht mehr reproduzieren, seit ich zu Fedora gewechselt bin und die Dinge jetzt größtenteils sofort funktionieren. Danke für Ihre Hilfe :)

Antwort1

Wahrscheinlich liegt das Problem an Ihrem Hostnamen. Geben Sie einen Namen mit einem Punkt ein. Beispiel: „localhost.mine“ oder einfach „localhost“

Sie können den Hostnamen über das GNOME Control Center -> Details -> Übersicht -> Gerätenamen festlegen festlegen.

Nachdem Sie einen gültigen Hostnamen festgelegt haben, erstellen Sie den Hotspot erneut.

Antwort2

ich benutztecreate_ap.

pacman -S create_ap
sudo create_ap -m bridge wifi_interface ethernet_interface test_arch vinod123

Hinweis: Sie können auf dem Host nicht im Internet surfen. Vielleicht sollten wir NATanstelle von verwenden bridge. Ich habe es noch nicht ausprobiert, um etwas bezüglich NAT zu bestätigen.

Antwort3

Ich habe diesen Fehler behoben, indem ich nm-connection-editormanuell eine Wi-Fi-Hotspot-Verbindung erstellt habe. Danach funktioniert die Schaltfläche „Als Hotspot verwenden“ wie erwartet.

verwandte Informationen