Pi Pico QR Display Hands Out WiFi Info With Style

At this point, you’re likely aware that you can store your wireless network’s credentials in a QR code, so that anyone who wants to connect with their smartphone need only scan the 2D barcode. Whether you print it out on paper, extrude it out of plastic, or paint the thing on the wall, it still works the same. It’s a neat trick for when you’ve got friends and family over, and saves you having to explain your ponderously long WPA key.

But what if you want to change up the encryption key every so often? Sure would be a hassle to have to repaint the wall. Enter this interesting project from [Predrag Mijatovic], which uses a few scripts to automatically set up a new encrypted guest WiFi network and present the appropriate QR code on an OLED display attached to a Raspberry Pi Pico. It’s a bit convoluted, and almost certainly won’t work on your network without significant tweaks, but we’re intrigued by the idea.

As [Predrag] explains, the whole thing is based on a Latvian MikroTik router that can be configured over SSH. A Bash script generates a new encryption key by base64 encoding the output /dev/urandom,  logs into the router to set up a new network using it, and then generates the matching ASCII QR code. With some sed trickery, the code is then embedded into a MicroPython program that gets uploaded to the connected Pi Pico.

In the video after the break [Predrag] takes us through the process manually so it’s easier to see what’s going on. Under normal circumstances, it would all happen automatically and would take just a few seconds to complete. We’d feel more comfortable if the scripts had some error correction that would allow them to gracefully exit if something goes wrong, but as a proof of concept, it certainly works.

We’d like to see this concept explored a bit further, perhaps using one of the physical QR code displays we’ve seen over the years. A programmable electronic paper display would also be a logical way to show off a dynamic QR code.

3 thoughts on “Pi Pico QR Display Hands Out WiFi Info With Style

  1. It doesn’t “set up a new encrypted guest WiFi network” it changes the password each time on the existing wireless network profile – this sadly means that each time a new QR code is generated it would invalidate the last. Would be good if it were able to use RADIUS and generate a new QR for each new user that persists longer and could be individually revoked.

    1. Didn’t want to believe you but yep, see the source:

      https://github.com/predmijat/qr_wifi/blob/main/create_new_password_and_regenerate_qr_code.sh#L9

      I will say, I would still use this procedure so N number of guests can use the guest network but when the next set arrive at a different time or date the previous ones would be locked out.

      Though from a user experience previously connected clients will report “incorrect password” which will be more annoying that that first QR code scan.

    2. I don’t understand the distinction you’re trying to make here. A new password means a new network, it intentionally makes it so the last group of guests can’t get online anymore. Generate a new code each time you have a party, and you don’t have to worry about an ex-guest getting in your network.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.