Skip to content

Commit

Permalink
Update 'iwctl'.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rern authored Jan 24, 2024
1 parent d7f76ad commit 26934a4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions 'iwctl'.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 26934a4

Please sign in to comment.