Linux Fu: Heads Or Tails For VPN

If you’ve done much networking, you surely know the frustration of trying to connect to something, say a Raspberry Pi, that lives behind your consumer router. There are a number of solutions for this, ranging from opening ports on your router along with dynamic DNS. Or, you can operate a VPN server on your network. Modern Linux has a facility called Wireguard that lets you create secure network tunnels very easily, but it is a little difficult to set up. But there are tools like Tailscale that can do most of the work for you. There’s only one problem: Tailscale is sorta-kinda free, but not really. But it turns out, you can build your own Tailscale network, and it is easier than you might imagine.

In all fairness, Tailscale’s free tier is good and recently got even more generous, allowing unlimited nodes and up to six users. That’s plenty for most hackers. However, as we’ve seen before, what they can give they can also take away. Besides, there are some extra services you still have to pay for if you want them, but overall, the free tier is more than enough for most people.

On the other hand, no matter how great the free tier may be, some people don’t want to run things on other people’s hardware. Or you need that 7th user. Or you need paywalled features. No worries. Headscale is a self-hosted service that can do nearly everything the cloud portion of Tailscale does, and if you have a place to host it, you can be your own Tailscale server.

For the client side? That’s the best part. Headscale works seamlessly with the existing Tailscale clients. You simply have to point them to your server instead of the defaults.

Continue reading “Linux Fu: Heads Or Tails For VPN”

Retrotechtacular: A View Of The Moon From 1964

If you didn’t live through it, it is hard to understand how excited the general public was about the race for the moon. You can capture some of it by watching “Lunar Bridgehead,” a film about JPL monitoring the Ranger spacecraft as it hit, rather hard, on the lunar surface.

The Ranger program had been plagued with problems. The first five didn’t make it to the moon. Ranger 6 hit the moon, but failed to start its cameras. Ranger 7 was the first successful mission. There would be two more successful missions before the end of the program.

Continue reading “Retrotechtacular: A View Of The Moon From 1964”

Tracking Bees With A Stereo Camera

For whatever reason, [Jeremy] wants to photograph bees in flight. This is one of those things that doesn’t seem that hard until you try to do it. He’s got the mechanical part that can move the camera as fast as the bee flies. But you still have to point the camera correctly. He considered quite a few methods of acquiring and tracking the bee, but he finally settled on a stereo camera. His requirements also made the camera design challenging. In particular, the bees move fast enough that things like USB transmission times become significant. You can see his solution in the video below.

[Jeremy] does a great job explaining all the tradeoffs between frame rate, resolution, focal length, and other optical issues. Of course, he also wanted a global shutter sensor. Rolling shutter cameras scan row-by-row, creating the well-known “jello effect”. Global shutters capture all pixels at once. That also removes any uncertainty as to “when” the shutter fired.

Continue reading “Tracking Bees With A Stereo Camera”

Grading Tomatoes With An ESP32 And ML

If you’ve ever worked with produce, you might know about grading. In addition to deciding if, say, a strawberry is good or not, they also have to sort them by color. Turns out, you don’t care if one package of berries is a bit redder than another, but you do care if one package has too much color variation. [Pmalfa31] applied an ESP32 and machine learning to grading tomatoes.

The system knows in advance if you are processing standard tomatoes or cherry tomatoes and uses two different sets of learned data depending on which you select. The program receives raw data from an optical sensor and then processes it to remove empty belt images, compute statistical information, and group readings for a single fruit together.

Continue reading “Grading Tomatoes With An ESP32 And ML”

The BBC Tetris Companion

[Leaded Solder] took on an interesting challenge. The BBC, apparently, produced a game console known as the BBC Bridge Companion that connected to your TV and helped you learn to play Bridge back in 1985. At £200, we doubt many were sold new, but there were nine ROM cartridges available, presumably at an additional cost. [Leaded Solder] doesn’t care about playing bridge, but decided to teach the computer itself to play Tetris.

Inside is what you might expect for 1985. A Z80 and TI video chip, although naturally enough, it is the PAL variant. With 16K of VRAM the machine would have been very capable for its day. Unlike some game systems, the Bridge Companion runs its own code before launching what’s on the ROM cartridge. That required a few evenings of reverse engineering to figure out the correct header. Meanwhile, the surplus real hardware needed a quick repair on its cartridge slot before he could test it with real metal.

There were more hurdles, including adapting the PAL output for a composite monitor. Don’t miss the second part of the series for more technical details, and we’ll be interested in following the posts to their conclusion later this month.

Oddly enough, we think this is the first time the BBC Bridge Companion has made an appearance on Hackaday. However, we’ve had no shortage of card shufflers.

This Filesystem Is Born To Fail

Sandboxing a Linux process usually means spending a lot of effort deciding what it isn’t allowed to see. You might put it in a mount namespace, bind-mount a few directories into place, hide some others, add a chroot, and generally construct a carefully restricted version of the filesystem. But a new Linux kernel feature is about to change all of that. Instead of carefully hiding most of the filesystem, why not just take the filesystem away?

That’s essentially the idea behind FailFS, a tiny pseudo-filesystem expected to land in Linux 7.3. As the name suggests, it doesn’t do very much. In fact, that’s the point: every operation that reaches FailFS returns EOPNOTSUPP, meaning “operation not supported.”

The interesting bit is what happens when a process uses FailFS as its root or current working directory. At that point, normal pathname lookup essentially ceases to work. Absolute paths fail. Absolute symbolic links fail. Relative paths using the normal current-directory mechanism fail. If the application tries to open /etc/passwd, there simply isn’t a useful /etc to find.

Continue reading “This Filesystem Is Born To Fail”

A 3D Printed Cycloidal Gearbox

Stepper motors are undeniably useful, but sometimes they need a bit of gearing to help perform their task. [Gjhudson2008] has a compact gearbox for NEMA 17 or 23 steppers that is mostly 3D printed. How compact? The gearbox, named VANTIX, is exactly the height of a standard NEMA 17 axle.

However, for it to be that thin, your stepper has to have the D-bore on the shaft go all the way down. Some steppers leave a shank uncut at the base, and that won’t work for VANTIX.

The recommendation is to print in ABS with a 0.2 mm nozzle for certain parts to help improve tolerance. Most of the assembly is either press fit or installed during the printing process. Some parts of the gearbox are better to print with a larger nozzle, too.

There are some heat-set inserts and, of course, you’ll need lube to keep everything moving smoothly. There are a few top plates you can print to fit various mounting scenarios.

We have seen a number of similar designs. We’ve also looked at some e-bike-inspired drives.