Generating a WiFi Password QR Code Revision as of Sunday, 29 December 2019 at 20:41 UTC
Saving here via
# On macOS. Note to self: use pwgen to generate secure passwords.
brew install qrencode pwgen
# Set the SSID
SSID="My Home Wifi"
# Set a looooong password for the AP
pwgen -s 63 > "${SSID}.password.txt"
# Put it all together
qrencode \
--size=15 \
--output=${SSID}.png \
"WIFI:T:WPA;S:${SSID};P:$(cat 00wifi.txt);;"
Goes without saying that should be displayed in a location that’s not visible from, say, a window. On iOS, the camera app automagically recognizes the resulting QR code and asks if you’d like to join the network.