elementary / switchboard-plug-network

Switchboard Network Plug
GNU General Public License v3.0
20 stars 23 forks source link

QR code Wi-Fi sharing #195

Open cassidyjames opened 4 years ago

cassidyjames commented 4 years ago

Android 10 added this, but iirc it's standardized somehow. Once you've connected to a Wi-Fi network, you can share that network with others with a QR code.

https://twitter.com/ArtemR/status/1169322099678142464

The plug could generate and display the QR code to make it easier to join other devices to the network.

cassidyjames commented 4 years ago

It's apparently related to Wi-Fi Easy Connect, but it seems to work on Android on any password-protected networks.

cassidyjames commented 4 years ago

Apparently this QR code format has been around for a while as well, as the barcode scanner on a super old Samsung tablet read it and connected to the network. And iDevices can do it as of iOS 11 as well. So this is pretty generally useful.

cassidyjames commented 4 years ago

In Android, they require you to authenticate before showing the QR code (since non-admins might not know the Wi-Fi password), so we'll probably also want to use PolicyKit to make sure the user is authenticated.

cassidyjames commented 4 years ago

Here is some documentation for the format, as implemented in iOS and Android (and a super-popular third-party Android barcode scanning library): https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11

cassidyjames commented 4 years ago

GNOME is adding this now as well. https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/644

Apparently Network Manager has a widget for this: https://gitlab.gnome.org/GNOME/network-manager-applet/commit/6a8dd865

GammaGames commented 3 years ago

I saw that it was an upcoming feature in gnome and checked if anyone had suggested it here. I've been using a simple python script to generate qr codes for a few years now, it's been helpful

https://gist.github.com/GammaGames/7736c7741879e32b5ad2c8b587216445