Today, everything from your computer to your dryer has wireless communications built in, but devices weren’t always so unencumbered by wires. What to do when you have a legacy serial device, but no serial port on the computer you want to connect? [vahidyou] designed a wireless serial dongle to solve this conundrum.
Faced with a CNC that took instructions over serial port, and not wanting to deal with the cabling involved in a serial to USB adapter, [vahidyou] turned to an ESP8266 to let his computer and device talk wirelessly. The hand-made PCB connects via a 3.5 mm headphone jack to DB9 adapter which he describes in another article. While [vahidyou] did write a small Windows program for managing the device, it is probably easier to simply access it in a web browser from any device you have handy.
Want to see another wireless serial port application? This Palm Portable Keyboard Bluetooth dongle will let you type in comfort on the go, or you can use a PiModem to get your retrocomputer online!
In the old days, if you wanted to snoop on a piece of serial gear, you probably had a serial monitor or, perhaps, an attachment for your scope or logic analyzer. Today, you can get cheap logic analyzers that can do the job, but what if you want a software-only solution? Recently, I needed to do a little debugging on a USB serial port and, of course, there isn’t really anywhere to easily tie in a monitor or a logic analyzer. So I started looking for an alternate solution.
If you recall, in a previous Linux Fu we talked about pseudoterminals which look like serial ports but actually talk to a piece of software. That might make you think: why not put a piece of monitor software between the serial port and a pty? Why not, indeed? That’s such a good idea that it has already been done. When it works, it works well. The only issue is, of course, that it doesn’t always work.
[greenluigi1] bought a Hyundai Ioniq car, and then, to our astonishment, absolutely demolished the Linux-based head unit firmware. By that, we mean that he bypassed all of the firmware update authentication mechanisms, reverse-engineered the firmware updates, and created subversive update files that gave him a root shell on his own unit. Then, he reverse-engineered the app framework running the dash and created his own app. Not just for show – after hooking into the APIs available to the dash and accessible through header files, he was able to monitor car state from his app, and even lock/unlock doors. In the end, the dash got completely conquered – and he even wrote a tutorial showing how anyone can compile their own apps for the Hyundai Ionic D-Audio 2V dash.
In this series of write-ups [greenluigi1] put together for us, he walks us through the entire hacking process — and they’re a real treat to read. He covers a wide variety of things: breaking encryption of .zip files, reprogramming efused MAC addresses on USB-Ethernet dongles, locating keys for encrypted firmware files, carefully placing backdoors into a Linux system, fighting cryptic C++ compilation errors and flag combinations while cross-compiling the software for the head unit, making plugins for proprietary undocumented frameworks; and many other reverse-engineering aspects that we will encounter when domesticating consumer hardware.
This marks a hacker’s victory over yet another computer in our life that we aren’t meant to modify, and a meticulously documented victory at that — helping each one of us fight back against “unmodifiable” gadgets like these. After reading these tutorials, you’ll leave with a good few new techniques under your belt. We’ve covered head units hacks like these before, for instance, for Subaru and Nissan, and each time it was a journey to behold.
With Linux and the serial port there is good news and there is bad news. The good news is that Linux has great support for serial hardware of all sorts and a host of tools for accessing the serial port. That’s important when you use a lot of serial-like devices like Arduinos with USB ports and the like. The bad news is that most of the terminal software is made to accommodate the days when a computer had real serial terminals and modems with people interacting with them. We bet that’s why [lundmar] developed tio, a serial device I/O tool for people like us.
Honestly, how many times have you needed Zmodem file transfers and recognition of the DCD signal to detect an incoming connection? Sure there are many other programs that will do the job, but tio brings a clean simplicity along with functionality that embedded developers need.
The software will support arbitrary devices, show statistics, and give you control of the RS232 lines. There’s support for delayed characters and lines, useful if you are dealing with a super simple device with no handshaking. There’s also hex support and many ways to log data and statistics. We especially like that it can automatically reconnect which is a great feature.
Of course, you want some terminal features and tio includes those. For example, you can elect to have local echo turned on or map characters so that, for example, a carriage return turns into a carriage return and a line feed. You can use command line options to set up most items including features like redirecting to a network socket. Other commands inside the program — by default, triggered by Control+T — let you do things like send a break, toggle handshaking lines, and more.
You might think the serial port is dead, but it really just transformed into a USB port. Of course, like everything else these days, you can also get your terminal in the browser.
Last year we wrote about [Alex Spataru]’s Serial Studio project, which started life as serial port data visualizer, like a souped-up version of the Arduino serial plotter. [Alex] has been actively improving the project ever since, adding a variety of new features, including
JSON editor for data formats
TCP, UDP, and Multicast
New and more flexible display widgets
Multi-signal plots
FFT and logarithmic plots
VT-100 emulation
Support for plugins and themes
Added MQTT support
[Alex] originally came up with Serial Studio because he was involved in ground station software for various CanSat projects, each one with similar yet slightly different data formats and display requirements. Rather than make several different programs, he decided to make Serial Studio which could be configured using JSON descriptor files.
The program is open-source and multi-platform. You can build it yourself or download pre-compiled binaries for Windows, Linux, and Mac. See the project GitHub repository for more details. In addition to English, it has also been translated into Spanish, Chinese, and German. What is your go-to tool for visualizing serial data telemetry these days? Let us know in the comments below.
Single-board computers have been around a long time: today you might be using a Raspberry Pi, an Arduino, or an ESP32, but three decades ago you might find yourself programming a KIM-1, an Intel SDK-85, or a Motorola 68000 Educational Computer Board. These kind of boards were usually made by processor manufacturers to show off their latest chips and to train engineers who might use these chips in their designs.
[Adam Podstawczyński] found himself trying to operate one of these Motorola ECBs from 1981. This board contains a 68000 CPU (as used in several Macintoshes and Amigas), 32 kB of RAM, and a ROM program called TUTOR. Lacking any keyboard or monitor connections, the only way to communicate with this system is a pair of serial ports. [Adam] decided to make the board more accessible by adding a Raspberry Pi extended with an RS232 Hat. This add-on board comes with two serial ports supporting the +/- 12 V signal levels used in older equipment.
It took several hours of experimenting, debugging, and reading the extensive ECB documentation to set up a reliable connection; as it turns out, the serial ports can operate in different modes depending on the state of the handshake lines. When the Pi’s serial ports were finally set up in the right mode, the old computer started to respond to commands entered in the terminal window. The audio interface, meant for recording programs on tape, proved more difficult to operate reliably, possibly due to deteriorating capacitors. This was not a great issue, because the ECB’s second serial port could also be used to save and load programs directly into its memory.
With the serial connections working, [Adam] then turned to the aesthetics of his setup and decided to make a simple case out of laser-cut acrylic and metal spacers. Custom ribbon cables for the serial ports and an ATX break-out board for power connections completed the project, and the 40-year-old educational computer is now ready to educate its new owner on all the finer points of 68000 programming. In the video (embedded after the break) he shows the whole process of getting the ECB up and running.
These days we expect even the cheapest of burner smartphones to feature a multi-core processor, at least a gigabyte of RAM, and a Linux-based operating system. But obviously those sort of specs are unnecessary for an old school POTS desktop phone. Well, that’s what we thought. Then [Josh Max] wrote in to tell us about his adventures in hacking the CaptionCall, and now we’re eager to see what the community can do with root access on a surprisingly powerful Linux phone.
As the names implies, the CaptionCall is a desk phone with an LCD above the keypad that shows real-time captions. Anyone in the United States with hearing loss can get one of these phones for free from the government, so naturally they sell for peanuts on the second hand market. Well, at least they did. Then [Josh] had to go ahead and crack the root password for the ARMv7 i.MX6 powered phone, started poking around inside of its 4 GB of onboard NAND, and got the thing running DOOM.
Tapping into the serial port.
If you’re interested in the technical details, [Josh] has done a great job taking us step by step through his process. It’s a story that will be at least somewhat familiar to anyone who’s played around with embedded Linux devices, and unsurprisingly, starts with locating a serial port header on the PCB.
Finding the environment variables to pretty tightly locked down, he took the slow-route and dumped the phone’s firmware 80 characters at a time with U-Boot’s “memory display” command. Passing the recovered firmware image through binwalk and a password cracker got him the root credentials in short order, and from there, that serial port got a whole lot more useful.
[Josh] kicked the phone’s original UI to the curb, set up an ARM Debian Jessie chroot, and started working his way towards a fully functional Linux environment. With audio, video, and even keypad support secured, he was ready to boot up everyone’s favorite 1993 shooter. He’s been kind enough to share his work in a GitHub repository, and while it might not be a turn-key experience, all the pieces are here to fully bend the hardware to your will.
Historically, running DOOM on a new piece of hardware has been the harbinger of bigger and better things to come. With unfettered access to its Linux operating system up for grabs, we predict the CaptionCall is going to become a popular hacking target going forward, and we can’t wait to see it.