Small, Embedded Graphical User Interface (GUI) Potentially Known as ZPUI
Ain't it a pain in the neck when you get your hands on a swanky single board computer (SBC) and all you want to do is dive in and tinker, but reaching that dang shell feels like a witch hunt? Time after time, I've found myself losing precious time trying to figure out the best way to get to the shell on an SBC.
Your go-to solution would be to have a keyboard, monitor, and an Ethernet cable handy. But hey, we don't always got that luxury. Maybe a UART connection could work for you - unless it's broken or misconfigured. Check your pinouts twice. Now, if you've managed to put WiFi credentials into a text file, good for you! But guessing the IP address and debugging formatting mistakes can make your head spin.
Alas, some SBCs don't even expose a USB gadget connection on the USB-C port, or you're already powering the SBC from there. Ain't no shortage of failure modes here.
When you put an SBC on your network and it goes offline, you're usually left in the dark unless you reboot it. This can make debugging a living hell, especially when dealing with SBCs mounted above fiberglass lifted ceilings, fleets of SBCs at workshops I organized, or even pocket-carried SBCs. Enough is enough! A hacker-aimed computer is meant to be accessible, not painful.
Give 'Em a Server-Grade Interface
That's why for years now, I've been working on a cheap and accessible embedded UI, called ZPUI (Zippy UI). With its help, a cheap I2C screen and a few buttons are all it takes to keep track of your Pi, or any other Linux device you’ve got your hands on.
Remember the good old era of character LCDs and those cute non-standard mounting boxy servers? Back then, you could grab a 16x2 display and five arrow keys, and with a little bespoke software, you could do basic management actions on your server without needing a KVM.
In 2014, one of my first semi-serious projects was writing a HD44780 library for Raspberry Pi use, universal and lightweight, supporting both direct GPIO access and I2C backpacks with ease. People had been using it for IP address display by then, but it wasn’t enough for me. I wanted to easily power off my boards, figure out their IP addresses without Nmap scans, and connect to WiFi networks without SD card machinations. It felt like someone should've written this years ago. It’s a simple concept - if I have physical access to my SBC, I should be able to take control of it.
So, with a HD44780, a USB numpad, a heap of Python code, I’ve built the first version of the software I called pyLCI - for Linux Control Interface. I gave it app loading support, then wrote code to parse commands for WiFi connection management, HDMI monitor connection debug, and a few others. It only required five buttons at all times - up, down, left, right, enter. I’ve built it into a number of my portable devices, most of them Pi-powered. Whether it's a portable hardware hacking workbench for SPI flash and general hardware tinkering, a home automation Pi board, or a pocket Pi that served as my only computer for almost half a year, pyLCI had been a helpful tool.
When I ran Raspberry Pi workshops in our hackerspace, I even used a few character-LCD-and-button HATs to determine the IP addresses of student-issued Pi boards, so I wouldn’t need to drag a monitor around or do USB-UART interventions. Entering WiFi passwords with arrow keys wasn’t ideal, but it was miles ahead of the frustration I used to routinely experience before, every time I brought a Pi somewhere for a project, only to get effectively locked out of a computer I own.
ZPUI for the Big Screens
When I worked on ZeroPhone, an open-source Raspberry Pi Zero-based numpad phone, I forked pyLCI into a base for the UI, called it ZPUI (stands for ZeroPhone UI), and targeted the super common 128x64 screens. Initially, I made the color screen imitate a character screen - it worked kind of well as a stopgap, but the resulting text was tiny. It took a good while to make the screen readable, make apps work passably well and write new better-working ones, implement numpad input in addition to arrow keys input, and I ended up learning a ton by building an UI framework where none was intended to be.
Recently, I reignited my portable platform building ambitions, and as part of a hacker collective, I’ve been working on a Beepy derivative device - a QWERTY PDA-like Pi Zero-based pocket Linux terminal. Just like many portable Linux devices in this form factor, it's lacking a low-frills graphical UI. I ported ZPUI to a larger screen, borrowed a UI layout mockup from one of the more successful Beepy UI projects, and am now porting ZPUI to larger screens. My goal with ZPUI is making your Linux devices accessible and friendly, and the Beepy community could definitely benefit from a software boost like that.
My goal is creating a UI that you can use to make any of your Linux devices accessible - no matter if you’re building a home automation panel with a Pi at its heart, an OpenWRT-powered pocket router, an overpowered Meshtastic node, a PWN4Pi device with RubberDucky scripts, or a robot with computer vision. Hell, maybe even when you're organizing workshops where seeing your Pi's IP address is crucial and you've got twenty students all needing your attention during setup. This year, I've started working on ZPUI again, bringing it up to speed with modern software realities. I invite you to try it out in your projects.
ZPUI: Your Swiss Army Knife for Linux Devices
At minimum, you only need a small 128x64 OLED screen and give buttons - for instance, if you have a Waveshare Pi Zero hat, it will do just fine. In case you're ordering PCBs anytime soon, I've also designed a business card form factor Pi shield, which fits on any Pi and even works over QWIIC if you want - throw the board into your next JLC order, solder an OLED and a few jellybean buttons to it, follow the install instructions, and enjoy the extra point of control over your Linux install.
As-is, ZPUI can do most of the basic tasks for you - show network info, connect to WiFi networks (and even display known network passwords), manage system services with help of a systemctl API, mount partitions so you don't have to SSH in to unplug that flash drive, list USB devices so you know if your digital treasure has fallen off the bus, search for files, and do a number of other things (there's even an AVRDUDE app!). It'll even let you input console commands through arrow keys in a pinch.
Currently, apart from UI improvements, I'm working on a heap of mechanisms to make third-party app designs easier. You already can develop ZPUI apps, and you can distribute ZPUI apps as Python packages, but there's still work to do. If you want to help contribute and tackle goals like, say, an Arduino app or a Bluetooth config interface, hook up and lend a hand - there's even a ZPUI emulator for app development purposes!
ZPUI is a project aimed to make your other projects easier. I invite you to try it out, especially if you've faced the kind of problems I've mentioned here. If it were up to me, SBCs like Raspberry Pi would come with these kinds of interfaces out of the box, simply because of the insanely large amount of problems I've had it solve and figure out.
- The text file approach for inputting WiFi credentials can be challenging, as guessing the IP address and debugging formatting mistakes can be overwhelming.
- In situations where a UART connection is unavailable or problematic, a custom-designed embedded UI, such as the one offered by ZPUI, can provide a reliable alternative for managing SBCs like Raspberry Pi.
- When dealing with smart-home devices or gadgets, a user-friendly interface like ZPUI can help in accessing, troubleshooting, and managing various technology components without the need for external peripherals like keyboards and monitors.
- The ZPUI project aims to create a versatile interface that addresses the accessibility issues often encountered with Linux devices, such as SBCs, smart-home devices, and even workshop circumstances where seeing device IP addresses is crucial with multiple users.