Nmcli dev wifi hotspot

narate / create-hotspot.md

I’m configuring a Raspberry PI with a UMTS dongle as a standalone AP for an IoT application using the last release of Raspian (Buster light) updated. After successfully configuring the dongle (ping www.example.com successful), I tried configuring the AP, but your script fails at the very last step:

augusto@raspberrypi:~ $ sudo nmcli con up Hotspot [sudo] password for augusto: Error: Connection activation failed: No suitable device found for this connection (device eth0 not available because profile is not compatible with device (mismatching interface name)). 

Maybe the following helps (with fake ssid and psk):

augusto@raspberrypi:~ $ nmcli connection show NAME UUID TYPE DEVICE Wired connection 1 2514808d-1a55-3af8-8bbf-572d9619769a ethernet eth0 Hotspot 9db27d3b-a22b-4bd9-9e32-fc256963e5d2 wifi -- augusto@raspberrypi:~ $ sudo cat /etc/NetworkManager/system-connections/Hotspot.nmconnection [connection] id=Hotspot uuid=9db27d3b-a22b-4bd9-9e32-fc256963e5d2 type=wifi interface-name=wlan0 permissions= [wifi] band=bg mac-address-blacklist= mode=ap ssid=myap [wifi-security] key-mgmt=wpa-psk psk=1234 [ipv4] dns-search= method=shared [ipv6] addr-gen-mode=stable-privacy dns-search= method=auto augusto@raspberrypi:~ $ ifconfig wlan0 wlan0: flags=4099 mtu 1500 ether 6a:99:14:b9:f7:df txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 

Источник

Create wireless access point and share internet connection with nmcli

How can I create a Wi-Fi hotspot with the command line tool nmcli and share/bridge the ethernet internet connection with the wireless access point? Furthermore, how can I start this automatically at boot? Is this possible with nmcli ?

try wpa_supplicant, it’s an raspberry-pi example, but you could port it for your system raspberry-at-home.com/hotspot-wifi-access-point

5 Answers 5

You can create a hotspot with the following:

nmcli dev wifi hotspot ifname wlp4s0 ssid test password "test1234" 

(where wlp4s0 is the name of your Wifi interface).

Читайте также:  Принцип действия сети wifi

Does not work: Error: Connection activation failed: (5) IP configuration could not be reserved (no available address, timeout, etc.).

On a Centos 7 it looks like this.

Check if AP is possible at all:

and search for «AP» among supported interface modes.

Browse your devices to find the name:

And setup and start your hotspot.

Mind that wifi-device, connection-name and hotspot-ssid are specific to your system.

nmcli c add type wifi ifname wifi-device con-name connection-name autoconnect no ssid hotspot-ssid nmcli connection modify connection-name 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared nmcli connection modify connection-name wifi-sec.key-mgmt wpa-psk nmcli connection modify connection-name wifi-sec.psk "le password" nmcli connection up connection-name 

I created a Hotspot with the GNOME Network-Manager. The problem was, that I can not configure the SSID and password in GUI. If you create the Hotspot with the Network-Manager GUI, it creates the file /etc/NetworkManager/system-connections/Hotspot . In that file it is possible to edit the SSID and the password.

sudo vim /etc/NetworkManager/system-connections/Hotspot 

The content of the file looks like this:

[connection] id=Hotspot uuid=0bf627gd-8e34-48c6-865a-06f898b4y1hb type=wifi autoconnect=true permissions= secondaries= [wifi] hidden=false mac-address=YOUR_WIFI_INTERFACE_MAC_ADDRESS mac-address-blacklist= mode=ap seen-bssids= ssid=SSID_NAME [wifi-security] group=ccmp; key-mgmt=wpa-psk pairwise=ccmp; proto=rsn; psk=YOUR_WIFI_AP_PASSWORD [ipv4] dns-search= method=shared [ipv6] dns-search= method=auto 

I changed the ssid and the psk properties to my needs. To enable autostart you have to set the parameter autoconnect to true . Then I restarted my computer because the command: sudo systemctl restart NetworkManager for network restart seems not to work correctly, because in the Network-Manager GUI:

wireless settings gone

I have no wireless network settings anymore and also the following command worked not before the restart. After restart you can use the nmcli command to start the access point.

nmcli con up Hotspot ifname YOUR_WIFI_INTERFACE 

YOUR_WIFI_INTERFACE you can find out with the command iwconfig .

Читайте также:  Обновите прошивку маршрутизатора wi fi до последней версии

I used Antergos / Arch Linux for the above solution and found the hint to this at the ask.fedoraproject.org site.

Источник

narate / create-hotspot.md

I’m configuring a Raspberry PI with a UMTS dongle as a standalone AP for an IoT application using the last release of Raspian (Buster light) updated. After successfully configuring the dongle (ping www.example.com successful), I tried configuring the AP, but your script fails at the very last step:

augusto@raspberrypi:~ $ sudo nmcli con up Hotspot [sudo] password for augusto: Error: Connection activation failed: No suitable device found for this connection (device eth0 not available because profile is not compatible with device (mismatching interface name)). 

Maybe the following helps (with fake ssid and psk):

augusto@raspberrypi:~ $ nmcli connection show NAME UUID TYPE DEVICE Wired connection 1 2514808d-1a55-3af8-8bbf-572d9619769a ethernet eth0 Hotspot 9db27d3b-a22b-4bd9-9e32-fc256963e5d2 wifi -- augusto@raspberrypi:~ $ sudo cat /etc/NetworkManager/system-connections/Hotspot.nmconnection [connection] id=Hotspot uuid=9db27d3b-a22b-4bd9-9e32-fc256963e5d2 type=wifi interface-name=wlan0 permissions= [wifi] band=bg mac-address-blacklist= mode=ap ssid=myap [wifi-security] key-mgmt=wpa-psk psk=1234 [ipv4] dns-search= method=shared [ipv6] addr-gen-mode=stable-privacy dns-search= method=auto augusto@raspberrypi:~ $ ifconfig wlan0 wlan0: flags=4099 mtu 1500 ether 6a:99:14:b9:f7:df txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 

Источник

Оцените статью
Adblock
detector