Falha ao adicionar nova conexão: (2) Uma configuração 'sem fio' com um SSID válido é necessária se nenhum caminho de AP foi dado

3

Atualmente, estou tentando compartilhar uma rede sem fio do arch linux. Há um botão nas configurações de rede que deve permitir:

Redeconfigurações"Usar como ponto de acesso ..."

Eu apertei o botão "Ativar" como é exatamente isso que estou procurando!

Masnoterminalcomoseguintecomando:

$sudojournalctl-xefNov0308:39:53zbookarchNetworkManager[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.

Há algum documento aqui e ali que eu ainda estou lendo, mas ainda não encontrei nada sobre esse erro além da mensagem de erro exata em algum código-fonte aqui:

link

Um amigo testado no Fedora e pronto, ele encontrou uma configuração de ESSID que corresponde ao seu wifi criado aqui:

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

Mas eu não tenho esse caminho no Arch Linux.

existe esta página wiki Software_access_point no arco que pode conter algumas informações sobre como criar um hotspot. Eu vou seguir isso depois, mas se alguém tiver alguma informação sobre o erro, seria ótimo:)

Minha placa de rede deve ser compatível:

$ iw list

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

(requer 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

iwlwifi pode ser encontrado em a seguinte lista :

| 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                    |

Realmente parece que ele suporta AP.

primeira tentativa

Eu tentei usar o hotspotd

Eu criei um python2.7 virtualenv e instalei o hotspotd==0.1.4 , depois instalei hostapd e 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.

Não sei por que wlan0 está sendo usado, então tentei editar /home/gableroux/.virtualenvs/hotspot/lib/python2.7/site-packages/hotspotd/run.conf , substituí wlan0 por meu wlp61s0 deteceted:

$ 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.

Ainda sem hotspot. Eu procurei por esse erro

nl80211: Could not configure driver mode

Eu encontrou esta questão relacionada

Eu tentei o comando recommanded:

$ sudo iwconfig wlp61s0 mode master

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

Bem, parece que pode ser minha placa de rede, afinal.

Isso é definitivamente mais fácil no MacOS: /

Editar : Eu não consigo mais reproduzir esse problema desde que me mudei para o Fedora e as coisas estão funcionando principalmente fora da caixa agora. Obrigado pela sua ajuda:)

    
por GabLeRoux 03.11.2016 / 14:08

3 respostas

1

Provavelmente, o problema está no seu nome de host. Dê algum nome com um período nele. eg: "localhost.mine" ou simplesmente "localhost"

Você pode definir o nome do host através do Centro de Controle do GNOME - > Detalhes - > Visão geral - > Definir nome do dispositivo.

Depois de definir um bom nome de host, crie o ponto de acesso novamente.

    
por 20.11.2016 / 09:58
0

Eu usei create_ap .

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

Observação: você não poderá navegar na Internet no host. Talvez devêssemos usar NAT em vez de bridge . Ainda não tentei confirmar nada sobre o NAT.

    
por 21.01.2017 / 13:30
0

Eu resolvi esse bug usando nm-connection-editor para criar manualmente uma conexão de ponto de acesso Wi-Fi. Depois disso, o botão "Use as hotspot" funcionará como esperado.

    
por 12.03.2017 / 10:17