From 26934a4a76422a11ae89621f0a9ada62cde8c873 Mon Sep 17 00:00:00 2001 From: rern Date: Wed, 24 Jan 2024 14:31:59 +0700 Subject: [PATCH] Update 'iwctl'.md --- 'iwctl'.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/'iwctl'.md b/'iwctl'.md index e9eed5f..b9a6200 100644 --- a/'iwctl'.md +++ b/'iwctl'.md @@ -6,6 +6,7 @@ - `iwctl` also starts `iwd.service` - Manually configured `/var/lib/iwd/$SSID.psk` - `PreSharedKey` must be included: `wpa_passphrase "$ssid" "$passphrase" | grep '\spsk=' | cut -d= -f2` +- Filter `stdout` color encoded lines: `sed $'s/\e\\[[0-9;:]*[a-zA-Z]//g'` ```sh # start service @@ -23,17 +24,19 @@ iwctl station $DEVICE get-networks # #1 - connect (to be saved as /var/lib/iwd/$SSID.psk) iwctl station $DEVICE [connect|connect-hidden] $SSID --passphrase $PASSPHRASE -# #2 - connect with *.psk ssid profile +# #2 - connect with manually configured profile echo "\ [Security] +PreSharedKey=$PRESHAREDKEY Passphrase=$PASSPHRASE -" > /var/lib/iwd/$SSID.psk -# disable autoconnect (default: true) -# hidden ssid (default: false) -echo "\ +# static ip - optional +[IPv4] +Address=$ADDRESS +Gateway=$GATEWAY + +# hidden ssid - optional [Settings] -AutoConnect=false Hidden=true " >> /var/lib/iwd/$SSID.psk