by bndw on 5/31/20, 4:34 PM with 88 comments
by graton on 5/31/20, 7:30 PM
As mentioned by someone else it uses the form of:
WIFI:T:WPA;S:{ssid};P:{password};;
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\";;As of January 2018, iPhones have this feature built into the camera app under iOS 11.x. Android users may have the feature built into one of the device's stock apps (e.g. Samsung Galaxy S8/S8+/Note8 users can launch the stock browser, tap the browser's 3-dot menu, then choose "Scan QR code") or can install one of several available free apps such as "Barcode Scanner" or "QR Droid" to perform the QR Wi-Fi join.
by chrismorgan on 5/31/20, 5:48 PM
WIFI:T:WPA;S:{ssid};P:{password};;
https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-n... seems to be where this format came from. (That page describes various other forms of QR codes too.)bndw: looks like some characters need escaping: backslash, semicolon, comma and colon. Maybe more too, given the treatment of double quotes in that last link (I’ve filed https://github.com/zxing/zxing/issues/1292 about that inconsistency).
by chrismorgan on 5/31/20, 6:16 PM
Error: code length overflow. (28252>23648)
So yeah, seems like all you have to do is paste 24KB of data in and it blows up. :)I see this failure mode in React apps a lot, where a bug causes an exception to be thrown, and the page just vanishes in a puff of smoke, as though it never was.
Half the time I’ve seen this failure mode it’s also been combined with persisting the bad value, so that the site is permanently broken until you can unpersist the value (e.g. clear localStorage or IndexedDB or cookie; but if the bad value is stored on a server you’re truly stuck).
The impression I’ve taken away is that it’s entirely unacceptable for a React component to throw an exception, because it will immediately destroy everything. Wonder how common such failures actually are, and whether there’s anything React itself could do about it (my guess is not).
by CapriciousCptl on 5/31/20, 6:15 PM
by pathseeker on 5/31/20, 8:26 PM
Imagine if this was a web-based password strength meter.
by wiml on 5/31/20, 7:52 PM
I'm not sure how useful it would be beyond the cool factor, of course … the cafés in my area don't seem to change their wifi passwords often at all, so I assume they're not very concerned about leeching. The typical practice of printing it on a receipt or writing it on the board next to the soup-of-the-day is probably hard to beat.
by seesawtron on 5/31/20, 6:55 PM
by lucb1e on 5/31/20, 5:54 PM
Edit: perhaps I should clarify that that's my network's name. In the qr code reader it shows up as ¯_(ツ)_/¯ and it's stored in wpa_supplicant.conf as c2af5f28e38384295f2fc2af (indeed missing the backslash).
by toomuchtodo on 5/31/20, 6:10 PM
Edit: Thank you to those who replied!
by canada_dry on 6/1/20, 2:35 AM
Be a decent solution for a business that wants to offer guest wifi with a little less risk of abuse.
by jedberg on 6/1/20, 4:13 AM
by tzs on 6/1/20, 5:28 AM
Someone suggested it on the 1Password forums [1] and one of their employees said it it was a great idea and would pass it to the development team, but that was in September, 2017, so apparently it didn't go anywhere.
About 18 months ago, someone suggested it on /r/1password [2], and again someone from 1Password liked it and said they would pass it on to the devs.
[1] https://discussions.agilebits.com/discussion/82070/feature-r...
[2] https://www.reddit.com/r/1Password/comments/a1udg2/feature_r...
by encom on 5/31/20, 10:31 PM
Emoji SSID just kind of works in most cases, because an encoding was never specified for that string, afaik.
TL;DR: I shoot myself in the foot for entertainment.
by srhngpr on 5/31/20, 8:32 PM
[1] http://niftypdf.com/Barcoder/QRCoder [2] http://niftypdf.com/Barcoder/API
by groundpepper on 5/31/20, 5:38 PM
by dheera on 5/31/20, 9:23 PM
by thephyber on 5/31/20, 8:04 PM
https://www.qr-code-generator.com/
(not trying to advertise the site, just saying it wasn't worth my time to reinvent something)
by Flimm on 5/31/20, 6:15 PM
by hikari_techlab on 6/1/20, 10:15 PM
by castratikron on 5/31/20, 9:38 PM
by paddlesteamer on 5/31/20, 7:25 PM
by djronin47 on 6/1/20, 1:11 PM