From 15e72f4d1aee390d5738378ac9125f7f07adf7da Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Fri, 27 Jan 2023 14:57:18 +0200 Subject: [PATCH] iwd-wifi.bash: improve formatting, add note on dpp --- bash/iwd-wifi.bash | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/bash/iwd-wifi.bash b/bash/iwd-wifi.bash index a24a939..c67a12f 100755 --- a/bash/iwd-wifi.bash +++ b/bash/iwd-wifi.bash @@ -17,6 +17,22 @@ iwctl station $WIFIDEVICE get-networks # The manpage says: iwctl --passphrase=PASSPHRASE station DEVICE connect SSID # but considering it says -P is shorthand for passphrase, I think this should # work too while being more logical in my opinion. -echo "% sudo iwctl station $WIFIDEVICE connect \$SSID -P \$KEY" - +echo "To connect: +% iwctl station $WIFIDEVICE connect \$SSID -P \$KEY +" # For permanent connections https://gitea.blesmrt.net/mikaela/shell-things/src/branch/master/var/lib/iwd + +# Device Provisioning Protocol https://iwd.wiki.kernel.org/device_provisioning +# requires qrencode, so let's check it exists +if hash qrencode needrestart 2>/dev/null; then + # Remind of command to share + echo "To share credentials: +% iwctl dpp $WIFIDEVICE start-configurator +" + # It needs to be stopped too + echo "To stop sharing credentials: +% iwctl dpp $WIFIDEVICE stop" +# Remind me that this part exists if qrencode is not found. +else + echo "WARNING! qrencode not found." +fi