News for hackers. Stuff that matters.
Re:Guest WiFi using a QR code by graton on Tuesday July 12, 2022 @11:47AM (#32071630)
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\";;
Re:Guest WiFi using a QR code by makeworld on Tuesday July 12, 2022 @02:16PM (#32073757)
> 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.
Re:Guest WiFi using a QR code by jhgb on Tuesday July 12, 2022 @05:50PM (#32076138)
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.
Re:Guest WiFi using a QR code by fmajid on Friday July 15, 2022 @03:09AM (#32105503)
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.
Re:Guest WiFi using a QR code by aaaaaaaaata on Wednesday July 13, 2022 @09:56PM (#32091093)
QRStream (Transfer files and text via successive QR codes) https://f-droid.org/packages/com.github.xloem.qrstream/
Re:Guest WiFi using a QR code by Mylloon on Thursday July 14, 2022 @05:32PM (#32101704)
There is this app who is doing kinda that https://github.com/sz3/cfc
Re:Guest WiFi using a QR code by heavyset_go on Tuesday July 12, 2022 @05:17PM (#32075812)
Recent Plasma Desktop lets you show a network QR code right from the right-click context menu.
Re:Guest WiFi using a QR code by heavyset_go on Wednesday July 13, 2022 @04:47PM (#32088555)
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.
Re:Guest WiFi using a QR code by msravi on Tuesday July 12, 2022 @02:21PM (#32073834)
Wow! Had no clue this was possible! Thank you!
Re:Guest WiFi using a QR code by vbezhenar on Tuesday July 12, 2022 @09:00PM (#32077797)
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!
Re:Guest WiFi using a QR code by ReaLNero on Wednesday July 13, 2022 @12:01AM (#32078914)
Especially weird considering SSIDs are allowed to have : and ; in their name. Should have gone with something like $
Re:Guest WiFi using a QR code by silvestrov on Tuesday July 12, 2022 @12:18PM (#32072124)
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.

Re:Guest WiFi using a QR code by ircop420 on Tuesday July 12, 2022 @12:31PM (#32072341)
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.
Re:Guest WiFi using a QR code by silvestrov on Tuesday July 12, 2022 @02:00PM (#32073573)
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.

Re:Guest WiFi using a QR code by SCLeo on Tuesday July 12, 2022 @02:21PM (#32073837)
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.
Re:Guest WiFi using a QR code by danachow on Tuesday July 12, 2022 @08:03PM (#32077412)
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)?
Re:Guest WiFi using a QR code by nemetroid on Tuesday July 12, 2022 @06:33PM (#32076605)
At equal printed sizes, QR codes with less information are much easier/more forgiving to scan.
Re:Guest WiFi using a QR code by ircop420 on Tuesday July 12, 2022 @12:27PM (#32072284)
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..
Re:Guest WiFi using a QR code by tepitoperrito on Tuesday July 12, 2022 @02:22PM (#32073853)
You would use "H" for BSSID or a hidden network I assume
Re:Guest WiFi using a QR code by andix on Tuesday July 12, 2022 @04:20PM (#32075120)
Can I also put my networks with Emoji SSIDs into the QR code?
Re:Guest WiFi using a QR code by InvaderFizz on Tuesday July 12, 2022 @05:22PM (#32075856)
Yes, I've been doing this for years with QR codes for WiFi.

Works for emoji in both the SSID and Password.