aliases | category | classification | date | date_modified | draft | id | image | links | local_archive_links | pinned | series | tags | title | type | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
cli |
public |
2021-09-02 08:05:32 -0700 |
2021-09-02 08:05:32 -0700 |
false |
20210902150532 |
false |
false |
|
Create a QR Code |
tech-note |
Some smartphones have the ability to connect to Wi-Fi by scanning a QR code. You can use the qrencode
tool to do this.
Here's the standard template:
WIFI:S:<ssid>;T:<security-type>;P:<password>;;
Here's a couple of examples using qrencode
, which you'll need to install.
# Example (print the output on the terminal):
qrencode --type=ansiutf8 "WIFI:S:<ssid>;T:WPA;P:<password>;;"
# Example (print the output to a file, which you can then print):
qrencode \
--type=PNG \
--size=6 \
--foreground="4caf50" \
--background="FFFFFF" \
--output ppn5.png \
"WIFI:S:PPN5;T:WPA;P:Groggily*Exclude1*Sublevel*Denial;;"
# Multiline:
qrencode \
--type=PNG \
--size=6 \
--foreground="006a4d" \
--background="FFFFFF" \
--output output.png \
"""
Multiline
QR Code
With Text
"""