Linux Fu: The Local Phonebook

I’ll admit it: I miss the simplicity of /etc/hosts. There was something elegant about it. You wanted laserprinter to mean 192.168.1.40, so you opened a text file and wrote:

192.168.1.40 laserprinter

Done. No cloud account, no discovery daemon, no dashboard with material-themed icons. Just a name and an address. The trouble, of course, is that /etc/hosts is only simple when you have one machine. The moment you have a desktop, a laptop, a Raspberry Pi, a NAS, a test box, and a phone or two, every little network change becomes a tiny distributed-database problem. Which copy of /etc/hosts is authoritative? Did you update the laptop? What about the machine you only boot once a month?

One Solution

Modern LANs solved this with mDNS, using Avahi on Linux. It resolves addresses that end in .local. Instead of asking a central DNS server “who is thing.local?”, a machine sends a multicast query on the local network: “who has thing.local?” The device that owns the name answers. This is why your Linux box named spock and usually be reached as spock.local on your LAN.

There are limits. mDNS is link-local; it is meant for the local LAN, not the whole Internet and shouldn’t route across subnets. Each device is supposed to publish its own name. That works fine when the device cooperates. But what about devices that do not publish mDNS? Or little embedded things that barely even have an IP address?

That is where I wanted the best of both worlds: keep a small authoritative /etc/hosts file on one Linux box, but publish selected entries onto the LAN using mDNS.

Continue reading “Linux Fu: The Local Phonebook”

This DIY Time Server Is More Accurate Than You Need

You almost certainly don’t have an application for the sort of accurate timekeeping that’s made possible by this enhanced version of [Cristiano Monteiro]’s satellite-backed time server. By his own admission, the vast majority of users will be more than happy to have their system’s time synchronized by the traditional Network Time Protocol (NTP). But if you’re really chasing those last few microseconds, that’s where the Precision Time Protocol (PTP) comes in.

With NTP, you can get within 10 milliseconds or so of your upstream time source — but PTP is accurate down to nanoseconds. Unless you’re performing some kind of scientific research, running a robotic assembly line, or perhaps doing high-speed financial trading, there’s no reason for this level of accuracy. In fact, PTP is such a niche technology that until the release of the ESP32-P4, [Cristiano] couldn’t even find an affordable enough chip that supported it.

Hardware-level support for PTP is important as there’s no way to achieve this level of accuracy with software alone, the capability needs to be baked into the Ethernet controller. As you might expect, it takes a highly accurate time source to make the most of PTP, and that’s where the navigation-grade Global Navigation Satellite System (GNSS) receiver comes in. All told the cost of the build is unsurprisingly higher than that of its predecessor, but [Cristiano] says it’s still a couple zeros shy of what a commercial offering would run.

As with his original time server from 2021, [Cristiano] made sure this build was as friendly as possible for hackers and makers. We especially like the 3D printed case designed in OpenSCAD, and his insistence that the gadget have a front panel with blinking status LEDs. Again, the vast majority of us don’t need our clocks to be accurate down to the nanosecond…but it’s nice to know we have the option.

ESP32 Keeps Tabs On Your Local Airspace

We know, we know. Despite being called ESP32-Plane-Radar, this project from [Mateusz Juszczyk] isn’t actually using radar. But thanks to the round LCD this desktop gadget does a fantastic job of recreating a classic radar display, and by pulling in Automatic Dependent Surveillance–Broadcast (ADS-B) data, the visuals even match nearby real-world aircraft.

Perhaps the best part of this project is just how easy it is for others to get in on the action. Although the presentation certainly looks professional — and expensive, if we’re being honest — there’s nothing particularly exotic going on here. Specifically, there’s ESP32-C3 Super Mini behind the scenes cranking through the ADS-B data and pushing it out to a circular GC9A01 display. A minimalistic 3D printed enclosure holds both components, and while it’s undeniably slick as-is, we can’t help but think there’s potential here for more elaborate designs.

As you probably guessed from the lack of a radio in the parts list, the code [Mateusz] provides doesn’t actually sniff ADS-B out of the air. It connects to the local network over WiFi, and then hits adsb.fi to pull in crowdsourced flight data. Since the device has to connect to the network anyway, the code also offers up a web-based configuration interface which puts a little more polish on what’s already an impressive presentation.

We used a round GC9A01 display on the Vectorscope back in 2023, so if anyone ports this over to their old Supercon badge we’d love to see it in action.

Thanks to [Mauricio] for the tip.

The Atari Jaguar Runs Linux

Among the many forgotten might-have-beens of the games console world, the Atari Jaguar occupies a special place. It was the final gasp of Atari Corporation, the Jack Tramiel-era incarnation of the famous pioneering game console brand that brought us the ST line of computers, and like Marlon Brando’s Terry Malloy character from On the Waterfront, it coulda been a contender. But the early ’90s games business wasn’t kind to the console from Sunnyvale, and it was squeezed from behind by the SNES and Genesis/MegaDrive, and in front from the PlayStation. Thirty years later then, can it run Linux? [Cakehonolulu] is here to show us how.

With only 2 megabytes of RAM and space for 8 megabytes of ROM, this is hardly a powerhouse. But its 16-bit 68000 processor is a supported Linux architecture, albeit with the -nommu flag on compilation. The “Jerry” DSP chip has the required serial port and timer to boot a first Linux kernel, and after a bit of hackery to make it jump to the ROM location, something boots. There’s no init process until the flat executable file for a -nommu kernel is navigated, but with that past a BusyBox userspace and a graphics driver for the “Tom” graphics chip gives it a chunky on-screen console. The code can be found in a GitHub repository, for the curious.

It seems to be the moment for 68k consoles to receive the Linux treatment, as it’s only a few weeks since we saw it on a MegaDrive. Other ’90s consoles aren’t far behind though, with the Nintendo 64 falling to the penguin a few years ago. Meanwhile, the Dreamcast had Linux running decades ago.


Jaguar image: Evan-Amos, Public domain.

It’s Now Imperative That You Copy That Floppy

In the early 1990s, Don’t Copy That Floppy was an anti-piracy campaign that attempted to connect with computer-savvy youth through the power of hip-hop. While somewhat difficult to imagine given our current draconian Digital Rights Management (DRM) hellscape, warning kids about the potential legal ramifications of duplicating floppy disks containing copyrighted software was seen as necessary since at the time there was usually nothing preventing users from simply copying the contents of one disk to another.

Unfortunately 30+ years down the road, we’re now finding that somebody really should have been backing up some of those disks. Which is why the University of Cambridge of launched the Future Nostalgia project and produced Copy That Floppy! — a phenomenal guide on preserving the contents of floppy disks while we still can.

Visualizing a disk’s flux stream can identify debris and damage.

There’s no telling how much data could potentially be lost to time because its stuck on such an antiquated and fragile storage media, and the situation only gets worse with the passage of time. The problem isn’t just that modern computers don’t have floppy drives. The disks themselves degrade with age, a process which is accelerated if they aren’t stored properly.

As such, Copy That Floppy! only briefly touches on the most ideal situation — that is, buying a USB floppy drive and making copies of the bog standard 3.5 inch disks you might come across. It then moves right on into more advanced topics, such as interfacing with less common drive types, how to safely clean floppies, and the use of advanced tools such as Greaseweazle to analyze captured disk images.

We’ve seen demonstrations of some of these techniques before, and a few years back Adafruit got interested in floppy preservation with modern hardware. But in-depth guides like these that pull all that information together into one place are valuable resources.

It’s Full Steam Ahead For This Motorized Canoe

In some parts of Canada, you’ll rarely hear someone use the phrase “whatever paddles your canoe” instead of the more usual “whatever floats your boat”– and apparently, at least for one Swede, that’s steam power. The video, linked and embedded below, is a detailed tour of a canoe equipped with a small boiler and an outboard motor that has been converted to run using steam pressure by [Kenneth Karlsson].

The canoe itself appears to be a Grumman of the “prospector” type, wide in body to hold all the gear you’d need for extended wilderness trips– or, in this case, a small boiler. Amidships is the ideal place, as it won’t affect the balance of the boat. Amidships is an odd place to put an outboard– in the North American homeland of the canoe, if you aren’t moving under your own power, it is more common to cut off the curved stern of the canoe and mount the outboard to the newly-made transom. [Karlsson]’s choice to put the outboard off one side will be less maneuverable than a stern mount, but saves the need to modify the canoe and makes for much shorter steam lines. Shorter steam lines means less hose to potentially leak and scald the occupants, as well as fewer losses, so we can’t really argue with the tradeoffs.

The engine is an old two-stroke outboard that has a single steam cylinder retrofitted to it, along with a heat exchanger to warm up lake water with exhaust steam before it heads the boiler. The water is filtered first, of course, but we do hope the new owner– who posts on YouTube with channel “Steam Canoe” is diligent about cleaning the boiler. It doesn’t look like super high pressure steam, but the vapour phase of water is always something to be respected.

If the potential of scalding steam leaks and boiler explosions put you off, but you still won’t pick up a paddle, canoes can be rigged with sails— or you can just hand the paddle to a robot arm. Though given this is Hackaday, maybe you’d rather skip the canoe and climb aboard the good ship Benchy instead. Continue reading “It’s Full Steam Ahead For This Motorized Canoe”

Reverse Engineering And Self-Hosting The OBI Smart Energy Tracker

Sold by German DIY store OBI, the OBI Energy Tracker is a €15 set of two devices, one of which you essentially stick on top of your existing electricity meter. This then allows for electricity usage to be measured and tracked, with the data sent to the second, gateway device. This latter cloud-bound device is linked to an OBI account via the heyOBI app. This correspondingly called for the gateway device to be reverse-engineered and freed from its cloud-based shackles, a task that [Aaron Christophel] happily took upon himself.

The whole process is also covered in two videos, with the first providing all the essentials on reprovisioning the original firmware for a local MQTT server in English, while the second, German-language video focuses on custom firmware for the ESP32-C3 inside of the gateway device.

Inside the reader device is a Cortex-M0+-based BAT32G135 MCU that communicates with the meter via its IR protocol. This is then communicated via 868 MHz LoRa to the gateway device that will be placed somewhere within Wi-Fi reach by the user. Inside this latter device is as mentioned the ESP32-C3, which by default runs firmware that communicates via secure MQTT with an AWS cloud instance for the typical cloud-based shenanigans.

The aforementioned reprovisioning option doesn’t require firmware flashing, just a handful of steps to follow. This involves fetching the 32-bit TEA key, generating your own PKI, running your own MQTTS-capable broker and having the provided Python script handle the rest from there.

Flashing custom firmware is the other option, with straightforward UART/JTAG reflashing sadly disabled by the manufacturer. With the effort required here you could perhaps argue that simply connecting the reader device to a custom gateway device might be a lot easier, especially if you already have a LoRa transceiver and associated hardware.

Continue reading “Reverse Engineering And Self-Hosting The OBI Smart Energy Tracker”