- NMTUI is NetworkManager text UI which can handle the most common tasks in a easy way.
- An access point or hotspot will be configured.
- "sudo nmcli connection edit xxxx" is a command that guides you throw a change of parameters.
pi@NmTest:~ $ sudo nmtui
and the interface, like the picture above, is shown.
pi@NmTest:~ $ sudo nmcli connection
NAME UUID TYPE DEVICE
Wired connection 1 efb1b467-14cd-3a0b-ad75-56c9cb7b3d63 ethernet eth0
Guapa e21ee622-fbdc-40f1-a6e7-08e3e24f773d wifi wlan0
pi@NmTest:~ $ sudo nmcli device wifi hotspot con-name Wifi_AP_wlan0 ifname wlan0 ssid RPi_AP password 12345678
Device 'wlan0' successfully activated with '37237db5-515e-400c-b744-f1b1b8a0a719'.
Hint: "nmcli dev wifi show-password" shows the Wi-Fi name and password.
ifname what Wi-Fi device is used.
con-name name of the created hotspot connection profile.(Optional)
ssid SSID of the hotspot.
band Wi-Fi band to use.(Optional)
channel Wi-Fi channel to use. (Optional)
password password to use for the created hotspot.
pi@NmTest:~ $ sudo nmcli connection
NAME UUID TYPE DEVICE
Wifi_AP_wlan0 37237db5-515e-400c-b744-f1b1b8a0a719 wifi wlan0
Wired connection 1 efb1b467-14cd-3a0b-ad75-56c9cb7b3d63 ethernet eth0
Guapa e21ee622-fbdc-40f1-a6e7-08e3e24f773d wifi --
Now you can test the setup connecting to the WiFi "RPi_AP" and log on.
pi@NmTest:~ $ sudo nmcli connection edit Guapa
===| nmcli interactive connection editor |===
Editing existing '802-11-wireless' connection: 'Guapa'
Type 'help' or '?' for available commands.
Type 'print' to show all the connection properties.
Type 'describe [<setting>.<prop>]' for detailed property description.
You may edit the following settings: connection, 802-11-wireless (wifi), 802-11-wireless-security (wifi-sec), 802-1x, ethtool, match, ipv4, ipv6, hostname, tc, proxy
nmcli> goto connection
You may edit the following properties: id, uuid, stable-id, type, interface-name, autoconnect, autoconnect-priority, autoconnect-retries, multi-connect, auth-retries, timestamp, read-only, permissions, zone, master, slave-type, autoconnect-slaves, secondaries, gateway-ping-timeout, metered, lldp, mdns, llmnr, mud-url, wait-device-timeout
nmcli connection> print
['connection' setting values]
connection.id: Guapa
connection.uuid: ab37eb9c-8fc4-43f0-baf4-17ebd96f3de4
connection.stable-id: --
connection.type: 802-11-wireless
connection.interface-name: wlan0
connection.autoconnect: no
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.multi-connect: 0 (default)
connection.auth-retries: -1
connection.timestamp: 1670507099
connection.read-only: no
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: default
connection.mdns: -1 (default)
connection.llmnr: -1 (default)
connection.wait-device-timeout: -1
nmcli connection> set autoconnect yes
nmcli connection> verify
Verify setting 'connection': OK
nmcli connection> save persistent
Connection 'Guapa' (ab37eb9c-8fc4-43f0-baf4-17ebd96f3de4) successfully updated.
nmcli connection> quit
pi@NmTest:~ $
pi@NmTest:~ $ sudo ip route flush table main
pi@NmTest:~ $ sudo systemctl restart NetworkManager
pi@NmTest:~ $ sudo ip route
No comments:
Post a Comment
Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !