Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It uses the form of:

  WIFI:T:WPA;S:{ssid};P:{password};;
Can generate these on Linux with the qrencode program.

Wikipedia has information on this https://en.wikipedia.org/wiki/QR_code#Joining_a_Wi%E2%80%91F...

Section of the Wikipedia article:

Joining a Wi‑Fi network

By specifying the SSID, encryption type, password/passphrase, and if the SSID is hidden or not, mobile device users can quickly scan and join networks without having to manually enter the data. Note that this technique is valid for specifying only static SSID passwords (i.e. PSK); dynamic user credentials (i.e. Enterprise/802.1x) cannot be encoded in this manner.

The format of the encoded string is:

  WIFI:S:<SSID>;T:<WPA|WEP|>;P:<password>;H:<true|false|>;
Order of fields does not matter. Special characters """ (quotation mark), ";" (semicolon), "," (comma), ":" (colon) and "\" (backslash) should be escaped with a backslash ("\") as in MECARD encoding. For example, if an SSID were "foo;bar\baz", with quotation marks part of the literal SSID name itself, this would be encoded as: WIFI:S:\"foo\;bar\\baz\";;


> Can generate these on Linux with the qrencode program.

If you're using Network Manager, you can also just run this command!

  nmcli dev wifi show-password
You get the password as text, and a nice in-terminal QR code.


That is actually quite cool. I wonder how many command line tools could take advantage of such a feature. Like, I don't know, upload a file somewhere and show a one-time QR code to transfer that file into your phone or something.


I use QR codes in my DIY VPN script https://GitHub.com/fazalmajid/edgewalker to ease setup of WireGuard and IPsec VPN clients like iPhones.


QRStream (Transfer files and text via successive QR codes) https://f-droid.org/packages/com.github.xloem.qrstream/


There is this app who is doing kinda that https://github.com/sz3/cfc


Recent Plasma Desktop lets you show a network QR code right from the right-click context menu.


I actually lied, if you click the NetworkManager applet in Plasma, there's a direct QR code button visible without having to use the context menu at all.


Wow! Had no clue this was possible! Thank you!


What a weird design. Alphanumeric QR code encoding includes [0-9A-Z $%*+-./:]. So many characters to choose from and they decided to choose ';' ruining the possibility of using compact alphanumeric encoding. Perfectionist inside me is angry!


Especially weird considering SSIDs are allowed to have : and ; in their name. Should have gone with something like $


why couldn't they just use normal URL query param escaping? Always reinventing the wheel, badly.

WIFI:t=wpa&s=My%20Network&p=secret%20word

would have been much better.


Data is expensive in QR land or your resulting QR code becomes larger in size, requiring more physical space to display. URL encoding has a lot of overhead. Also '\' escaping has preceded the existence of URLs. I'm not sure who is doing the reinventing here.


Only encoded characters take up more space and you don't have to escape: quotation mark, semicolon, comma, colon or backslash.

So I think the difference is small. QR codes can contain quite a bit more information than what's needed for WIFI name and password.


In countries that do not use English as the main language, it is fairly common to have non-English SSIDs. URL encoding is incredibly inefficient when encoding those characters.


QR code is not particularly dense (like compared to something like a hard drive) - why waste space that could not be put towards more redundancy (error correction)?


At equal printed sizes, QR codes with less information are much easier/more forgiving to scan.


Can you encode a BSSID (MAC-based) or just the ESSID (assigned name)? The formatting isn't very pleasant I imagine for putting a MAC in with all those backslashes..


You would use "H" for BSSID or a hidden network I assume


Can I also put my networks with Emoji SSIDs into the QR code?


Yes, I've been doing this for years with QR codes for WiFi.

Works for emoji in both the SSID and Password.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: