8 ms·
qrencode -t utf8 'WIFI:T:WPA;S:network;P:password;;'
by Zash 5y ago
qrencode -t utf8 'WIFI:T:WPA;S:network;P:password;;'
- floatingatoll 5y agoDid you type this in from memory?!
- captn3m0 5y agoThere is no real specification. This is the best source[1], which documents QR standards. >There are some standards -- de facto and otherwise -- already in use. This wiki attempts to catalog some possible standards for encoding various types of information, and suggest a standard action associated to them. [1]: https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11 https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-n...
- mdaniel 5y agoDamn, that's saddening, but also answers a question I had about what the escape character is for a password containing `;` -- I guess there's no specification to tell me :-( OTOH, I guess a "standard" is whatever the common implementations accept anyway, so if one could dig up the source to the WiFi QR scanner in source.android.com that's the 2nd best thing
- jaflo 5y agoNo specification, but the linked website mentions that they “propose a syntax like "MECARD" for specifying wi-fi configuration” and then later: > Special characters \, ;, ,, " and : should be escaped with a backslash (\) as in MECARD encoding.
- mdaniel 5y agoIn fairness, the string doesn't seem insaneo: T:=Type S:=SSID P:=Password then only the leading and trailing chars need to be "remembered", plus whatever the escape character is for that password string (or maybe even the SSID -- I'm not super clear on what characters can be in an SSID)
- bigiain 5y ago> I'm not super clear on what characters can be in an SSID) I hear “%s%s%s%s%p” is the preferred SSID these days…
- sp332 5y agoFor those playing along at home https://arstechnica.com/gadgets/2021/06/connecting-to-malicious-wi-fi-networks-can-mess-with-your-iphone/ https://arstechnica.com/gadgets/2021/06/connecting-to-malici...
- prophesi 5y agoNot OP, but I found that string from viewing the source code for Card.js in the sources tab.
- CraneWorm 5y agoA decade old SO adage comes o mind: "This should be the accepted answer."
- SubzeroCarnage 5y agoFor WPA3 WIFI:S:SSID;T:WPA3;P:PASSWORD;;
- m0dest 5y agoCan you elaborate? Why doesn't the traditional WPA1/WPA2 string work? What happens if a non-WPA3 client scans this new one?
- SubzeroCarnage 5y agoLate reply, but when I was setting up WPA3 a few months ago I used Android 11 as a reference and that is what it spits out from the Settings share screen. Without it iirc, it would search and search and never connect.
- tomjen3 5y ago>zsh: command not found: qrencode
- deleted 5y ago[deleted]
- chadlavi 5y agobrew install qrencode && !!
- vletal 5y agoSince OP intended to learn a bunch of technologies while developing this project I'd be amused to see a version of this based on qrencode complied to WASM.
- IgorPartola 5y agoWhy is this not a neural network?
- jdrek1 5y agoAnd why no blockchain?
- pawelduda 5y agoMint a WiFi Login Card NFT
- cto_of_antifa 5y agoI audibly lolled
- the_cat_kittles 5y agowow ok, so you expect me to have a computer (?!) with: - a keyboard? - access to a terminal??!?!?! - ability to install qrencode??? - knowledge of copy and paste!?!?! - some way to edit the command you posted to my specific username and password?! franky this is ridiculous when i could just make a repo that uses make, docker, yarn, npx, nginx, react, and jest /s
- jacobmischka 5y agoThis is a staggeringly passive aggressive comment, who hurt you?
- plandis 5y agoI disagree and I found both the command line and ui versions interesting, kudos to both OP and the CLI poster :) As stupid as it sounds I didn’t realize there was a wifi scheme for a uri-like syntax on phones
- jacobmischka 5y agoI definitely found the qrencode command interesting, just not the reply to which I replied.
- bigiain 5y agoNo no no! You’re supposed to deploy qrencode in a kubernates cluster on Oracle cloud to run it, and then go to your WiFi base station and change your SSID to “network” and it’s password to “password” <grin>
- Satam 5y agoAnd access to Linux. Which most of non-tech people are not going to have.
- opan 5y agoWorks on Android using Termux. libqrencode is a package in its default repo. From what I understand, Android is quite popular.
- 40four 5y agoI wouldn’t ask if it wasn’t the top comment, on the current #1 front page story, but Can someone please explain this command, and why it is presumably given as a criticism of this submission?
- enjoyyourlife 5y agoThe site requires you to put in your WiFi Network and Password even though it did not have to. (However nothing is actually sent to the server)
- playpause 5y ago> even though it did not have to How could it work if it didn’t?
- deleted 5y ago[deleted]
- mikkelam 5y agoBy generating the QR code locally via JS. You can check the source code https://github.com/bndw/wifi-card/blob/master/package.json#L9 https://github.com/bndw/wifi-card/blob/master/package.json#L...
- maddyboo 5y agoIf you want some interactivity (bash): read -rp "SSID: " ssid read -rsp "Password: " pass echo -e "\n" qrencode -t utf8 "WIFI:T:WPA;S:$ssid;P:$pass;;" echo "SSID: $ssid" Even better, generate a PDF with emojis and all! #!/usr/bin/env bash out="${1:-wifi-card.pdf}" read -rp "SSID: " ssid read -rsp "Password: " pass echo -e "\nGenerating PDF..." { cat << EOF <table> <tr> <td><img src="data:image/png;base64,$(qrencode -o - -t png "WIFI:T:WPA;S:$ssid;P:$pass;;" | base64)"></td> <td><span>SSID: $ssid</span><br><span>Password: $pass</span></td> </tr> </table> <p> <img width=16 height=16 src="https://raw.githubusercontent.com/iamcal/emoji-data/master/img-apple-64/1f4f8.png"> <img width=16 height=16 src="https://raw.githubusercontent.com/iamcal/emoji-data/master/img-apple-64/1f4f1.png"> Point your phone's camera at the QR Code to connect automatically. </p> EOF } | pandoc --pdf-engine=xelatex -f html -t pdf -o "$out" echo "$out" I used those GitHub URLs for the emojis because pandoc was being weird about the unicode versions.
- tclancy 5y agoNote to anyone blindly cutting and pasting this, the final EOF needs to be alone on the line with no indentation (VSCode did me a disservice and formatted it poorly which confused the hell out of shellcheck but left me learning something today, which was nice).
- alphachloride 5y agoWrite-Host "?"
- chrisxcross 5y agoFor users of NetworkManager: nmcli device wifi show-password
- alias_neo 5y agoWow thanks. I just learned something new. This is now my favourite way to grab the WiFi password.
- codethief 5y ago+1 Why has it never occurred to me that I might be able to use a QR code? I always do `sudo cat /etc/NetworkManager/system-connections/TheSSID.nmconnection | grep psk`, type in my root password and then re-type the passphrase manually on my phone. The amount of time this is going to save me…
- alias_neo 5y agoI was always aware my phone has an option to scan a QR to connect to WiFi, but I never thought to look up the QR spec for it. I had no idea nmcli had this functionality either, though I have used qrencode a lot for TOTP and WireGuard.