Wonderful things happen when we read the documentation. For instance, we’ve all seen a Raspberry Pi work as an Ethernet adapter over USB, or a ESP32-S2 presenting as a storage device. Well, [parkerlreed] has made his Steam Deck work as a USB printer after reading the Linux kernel docs on the USB gadget configuration, and all it took was some C code and a BIOS setting change.
“Wouldn’t it be cool if our USB tablets exposed a fake printer interface and saved the received documents as PDF?” With a SteamDeck, you can do just that – thanks to the g_printer
kernel module. The C code is fairly straightforward, and even lets you configure some aspects of the printer device.
Of course, there’s gotta be a cherry on the cake, and [parkerlreed]’s shell script hides an addition that makes your PDF printing experience all that more realistic! Not to spoil it too much – you should watch the video of the script in action, showcasing both the ease of use and the added realism.
Jokes aside, the usefulness of this script is undeniable, and owners of USB-device-capable portable Linux devices will find this script a must-have. It’s seriously cool when someone dives into documentation and pulls out a clever solution to a “wouldn’t it be cool” idea – fundamentally, it is the same mindset that gave us the venerable RTL-SDR. What’s your favourite ‘dig into docs and figure out a clever feature’ hack?
We thank [Myself] for sharing this with us on the Hackaday Discord!
Thank you, I’m here all night!
Crazy seeing this sent to me and I was like “Hah”
I’ve had two other ventures on Hackaday for anyone curious
https://hackaday.com/2009/09/28/internal-wireless-headphones/ https://hackaday.com/2014/06/23/raspberry-pi-bluetooth-receiver-for-your-car-stereo/
Now the PC in “PC LOAD LETTER” finally makes sense!
Or you know…. Paper Cassette.
That’s cool, can you do the same and make the steam deck be recognized as a gamepad when you plug it in? That would be awesome
Nice work.
What benefits does this have over selecting print to pdf in the print options on the host computer?
Not needing to move documents to the tablet.
Not having the cool line printer sound.
Corporate machines often have USB-write locked down for data exfiltration concerns, but they can still print….
Just waiting for the tablet to say it’s out of Cyan.
Still somewhat amusing. No doubt three’s a wireless printer version available too and perhaps a multi-drop. Marty, you’re fired, style, print to all printers in the local vicinity option.
Of course this also has been done with a Pi
https://github.com/Raspberryy/Emulated_USB_Printer