Skip to main content

Wireless

I didn't end up having luck with iw, but I'm sure it is very useful. It seems I just wasn't able to interactively enter a password, so in the end I couldn't connect to WiFi. Worth looking at iw though.

sudo iw dev wlp0s20f3 scan
sudo iw dev wlp0s20f3 scan | grep SSI
sudo iw dev
sudo iw list
sudo iw wlp0s20f3 connect "Reed WIFI-2G"

See examples in man nmcli-examples. A lot of good information between this page and the SEE ALSO section at the bottom.

Network configurations

tree /etc/NetworkManager/
.
├── conf.d
│   └── default-wifi-powersave-on.conf
├── dispatcher.d
│   ├── 01-ifupdown
│   ├── 99tlp-rdw-nm
│   ├── no-wait.d
│   ├── pre-down.d
│   └── pre-up.d
├── dnsmasq.d
├── dnsmasq-shared.d
├── NetworkManager.conf
└── system-connections
    ├── Mi Casa.nmconnection
    ├── FAKE WIFI-2G.nmconnection
    └── FAKE WIFI-5G.nmconnection

8 directories, 7 files

Terminal NetworkManager UI made using curses library can be installed and ran with the following commands

sudo apt install network-manager
nmtui

Gnome NetworkManager GUI for editing wireless and bluetooth connections using a GUI application build for Gnome desktops

sudo apt install network-manager-gnome
nm-connection-editor

Wifi can be toggled with wifi on and wifi off

wifi on

wifi      = on
rfkill

ID TYPE      DEVICE      SOFT      HARD
 0 wlan      phy0   unblocked unblocked
 1 bluetooth hci0   unblocked unblocked

Connecting to WiFi

nmcli device wifi list

IN-USE  BSSID              SSID               MODE   CHAN  RATE        SIGNAL  BARS  SECURITY  
*       40:B8:9A:D7:EC:AF  FAKE WIFI-2G       Infra  1     195 Mbit/s  100     ▂▄▆█  WPA2      
        40:B8:9A:D7:EC:B0  FAKE WIFI-5G       Infra  149   405 Mbit/s  94      ▂▄▆█  WPA2      
        FA:8F:CA:95:43:9B  Living Room        Infra  6     65 Mbit/s   75      ▂▄▆_  --        
        FA:8F:CA:82:9D:D4  Family Room TV.b   Infra  6     65 Mbit/s   57      ▂▄▆_  --        
        14:ED:BB:1F:44:6D  Hi                 Infra  8     130 Mbit/s  57      ▂▄▆_  WPA2      
        14:ED:BB:1F:44:76  ATT9eu7M6L         Infra  149   540 Mbit/s  44      ▂▄__  WPA2      
        4C:ED:FB:AD:D8:08  Fluffymarshmellow  Infra  1     540 Mbit/s  30      ▂___  WPA2      
        70:77:81:DE:43:59  WIFIDE4355         Infra  1     195 Mbit/s  24      ▂___  WPA2      
        70:5A:9E:6C:D4:29  TC8717T23          Infra  6     195 Mbit/s  19      ▂___  WPA2      
        A8:A7:95:E8:68:82  Wildflower-2G      Infra  1     195 Mbit/s  14      ▂___  WPA2      
        CC:2D:21:57:E0:71  Rudy               Infra  6     130 Mbit/s  14      ▂___  WPA1 WPA2 
        CE:A5:11:3C:E4:C2  Orbi_setup         Infra  9     130 Mbit/s  14      ▂___  --        
        A8:6B:AD:EB:B4:56  Gypsy-2            Infra  6     195 Mbit/s  12      ▂___  WPA1 WPA2 
        CE:A5:11:3C:EF:8E  Orbi_setup         Infra  9     130 Mbit/s  12      ▂___  --        

Now bring up a connection with the access point we want, and pass the --ask flag to enter a password for authentication.

nmcli c up "FAKE WIFI-2G" --ask

Passwords or encryption keys are required to access the wireless network 'FAKE WIFI-2G'.
Password (802-11-wireless-security.psk): •••••••••••••••••••
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/9)

Disable transmission devices with rfctl

rfkill list 

0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
1: hci0: Bluetooth
        Soft blocked: yes
        Hard blocked: no

Block WiFi

rfkill block wlan

Block Bluetooth

rfkill block bluetooth