One Solution, Many Problems

You might think you’re lucky when one of your problems has multiple solutions, and you get to pick and choose, but you’re even luckier when one solution has many problems! This week I stumbled on an old solution in a new place. The project was a fantastic old MIDI guitar build, the Tryndelka by [Aleksandr Goltsov]. And the old solution? Switch matrix diodes.

You see, [Aleksandr] is making an electric guitar where the strings are pulled up to a certain voltage and then make contact with metal frets. Each fret is cut into six pieces, so that the strings can be read out individually, and the microcontroller scans each string in succession to test if it’s pressed down or not. Done, right? Wrong! The problem comes when two or more strings are pressed at once — the electrical path from the string you want will travel through the closed switch on a string that you’re not scanning. The solution is a ton of diodes.

I learned this problem the hard way in wiring up a MAME cabinet, at about 3 A.M. the night before we were going to bring it to Shmoocon. We finally got the whole USB/button code working, so we played some celebratory rounds of Street Fighter. We eventually noticed that hitting one button, or even moving the joystick in a particular direction, would block some of the other buttons from working, or change their function entirely. Quick Internet search later, and we were hand soldering 64 diodes until dawn. Good times!

But the fact that switch matrices need diodes, and exactly why, is forevermore burned in my brain. It’s fun to see it pop up in all sorts of contexts, from DIY keyboards to MIDI guitars, to Charliplexing. (It’s the “D” in LED!) It’s one of the classics — a solution to many problems.

Hackaday Podcast 169: 3D Printing In Vase Mode, Measuring Nanovolts Through Mega DIY, And The Softest Pants Are Software Pants

Join Hackaday Editor-in-Chief Elliot Williams and Assignments Editor Kristina Panos as we take a tour of our top hacks from the past week. Elliot brought some fairly nerdy fare to the table this time, and Kristina pines for physical media as we discuss the demise of the iPod Touch, the last fruit-flavored mp3-playing soldier to fall.

But first, we talk about a why-didn’t-I-think-of-that 3D printing hack that leverages vase mode into something structural. We’ll take a look inside a see-through cyberdeck made from laptop parts, marvel over the minuscule voltages that can be picked up with a bit of meticulous meter design, and chew the fat about old rotary phones.

We also put in some overtime discussing a cheap fix for an expensive time card clock part, and rock out to a guitar that can use various things for its resonant cavity. Finally, Elliot questions the difference between software and firmware when it comes to hiding your dirty secrets, and Kristina bloviates about see-through electronics and music appreciation using whatever format you can afford.

Check out the links below if you want to follow along, and as always, tell us what you think about this episode in the comments below!

Direct Download link

Continue reading “Hackaday Podcast 169: 3D Printing In Vase Mode, Measuring Nanovolts Through Mega DIY, And The Softest Pants Are Software Pants”

This Week In Security: IPhone Unpowered, Python Unsandboxed, And Wizard Spider Unmasked

As conspiracy theories go, one of the more plausible is that a cell phone could be running malicious firmware on its baseband processor, and be listening and transmitting data even when powered off. Nowadays, this sort of behavior is called a feature, at least if your phone is made by Apple, with their Find My functionality. Even with the phone off, the Bluetooth chip runs happily in a low-power state, making these features work. The problem is that this chip doesn’t do signed firmware. All it takes is root-level access to the phone’s primary OS to load a potentially malicious firmware image to the Bluetooth chip.

Researchers at TU Darmstadt in Germany demonstrated the approach, writing up a great paper on their work (PDF). There are a few really interesting possibilities this research suggests. The simplest is hijacking Apple’s Find My system to track someone with a powered down phone. The greater danger is that this could be used to keep surveillance malware on a device even through power cycles. Devices tend to be secured reasonably well against attacks from the outside network, and hardly at all from attacks originating on the chips themselves. Unfortunately, since unsigned firmware is a hardware limitation, a security update can’t do much to mitigate this, other than the normal efforts to prevent attackers compromising the OS.
Continue reading “This Week In Security: IPhone Unpowered, Python Unsandboxed, And Wizard Spider Unmasked”

The Little Big Dogs Of Invention

This is a story about two dogs I know. It is also a story of the U.S. Navy, aviation, and nuclear weapons. Sometimes it is easy to see things in dogs or other people, but hard to see those same things in ourselves. It’s a good thing that dogs can’t read (that we know of) because this is a bit of an embarrassing story for Doc. He’s a sweet good-natured dog and he’s a rather large labradoodle. He occasionally visits another usually good-natured dog, Rocky — a sheltie who is much smaller than Doc.

I say Rocky is good-natured and with people, he is. But he doesn’t care so much for other dogs. I often suspect he doesn’t realize he’s a dog and he is puzzled by how other dogs behave. You would think that when Doc comes to visit, the big dog would lord it over the little dog, right? Turns out, Doc doesn’t realize he’s way bigger than Rocky and — apparently — Rocky doesn’t realize he should be terrified of Doc. So Rocky bullies Doc to the point of embarrassment. Rocky will block him from the door, for example, and Doc will sit quaking unable to muster the courage to pass the formidable Rocky.

It makes you wonder how many times we could do something except for the fact that we “know” we can’t do it. Or we believe someone who tells us we can’t. Doc could barge right past Rocky if he wanted to and he could also put Rocky in his place. But he doesn’t realize that those things are possible.

You see this a lot in the areas of technology and innovation. Often big advances come from people who don’t know that the experts say something is impossible or they don’t believe them. Case in point: people were anxious to fly around the start of the 1900s. People had dreamed of flying since the dawn of time and it seemed like it might actually be possible. People like Alberto Santos-Dumont, the Wright brothers, ClĂ©ment Ader, and Gustave Whitehead all have claimed that they were the first to fly. Others like Sir George Cayley, William Henson, Otto Lilienthal, and Octave Chanute were all experimenting with gliders and powered craft even earlier with some success.

Continue reading “The Little Big Dogs Of Invention”

Natural Language AI In Your Next Project? It’s Easier Than You Think

Want your next project to trash talk? Dynamically rewrite boring log messages as sci-fi technobabble? Happily (or grudgingly) answer questions? Doing that sort of thing and more can be done with OpenAI’s GPT-3, a natural language prediction model with an API that is probably a lot easier to use than you might think.

In fact, if you have basic Python coding skills, or even just the ability to craft a curl statement, you have just about everything you need to add this ability to your next project. It’s not free in the long run, although initial use is free on signup, but for personal projects the costs will be very small.

Basic Concepts

OpenAI has an API that provides access to GPT-3, a machine learning model with the ability to perform just about any task that involves understanding or generating natural-sounding language.

OpenAI provides some excellent documentation as well as a web tool through which one can experiment interactively. First, however, one must create an account and receive an API key. After that is done, the doors are open.

Creating an account also gives one a number of free credits that can be used to experiment with ideas. Once the free trial is used up or expires, using the API will cost money. How much? Not a lot, frankly. Everything sent to (and received from) the API is broken into tokens, and pricing is from $0.0008 to $0.06 per thousand tokens. A thousand tokens is roughly 750 words, so small projects are really not a big financial commitment. My free trial came with 18 USD of credits, of which I have so far barely managed to spend 5%.

Let’s take a closer look at how it works, and what can be done with it!

Continue reading “Natural Language AI In Your Next Project? It’s Easier Than You Think”

Kindle, EPUB, And Amazon’s Love Of Reinventing Wheels

Last last month, a post from the relatively obscure Good e-Reader claimed that Amazon would finally allow the Kindle to read EPUB files. The story was picked up by all the major tech sites, and for a time, there was much rejoicing. After all, it was a feature that owners have been asking for since the Kindle was first released in 2007. But rather than supporting the open eBook format, Amazon had always insisted in coming up with their own proprietary formats to use on their readers. Accordingly, many users have turned to third party programs which can reliably convert their personal libraries over to whatever Amazon format their particular Kindle is most compatible with.

Native support for EPUB would make using the Kindle a lot less of a hassle for many folks, but alas, it was not to be. It wasn’t long before the original post was updated to clarify that Amazon had simply added support for EPUB to their Send to Kindle service. Granted this is still an improvement, as it represents a relatively low-effort way to get the open format files on your personal device; but in sending the files through the service they would be converted to Amazon’s KF8/AZW3 format, the result of which may not always be what you expected. At the same time the Send to Kindle documentation noted that support for AZW and MOBI files would be removed later on this year, as the older formats weren’t compatible with all the features of the latest Kindle models.

If you think this is a lot of unnecessary confusion just to get plain-text files to display on the world’s most popular ereader, you aren’t alone. Users shouldn’t have to wade through an alphabet soup of oddball file formats when there’s already an accepted industry standard in EPUB. But given that it’s the reality when using one of Amazon’s readers, this seems a good a time as any for a brief rundown of the different ebook formats, and a look at how we got into this mess in the first place.

Continue reading “Kindle, EPUB, And Amazon’s Love Of Reinventing Wheels”

Striping A Disk Drive The 1970 Way

These days, mass storage for computers is pretty simple. It either uses a rotating disk or else it is solid state. There are a few holdouts using tape, too, but compared to how much there used to be, tape is all but dead. But it wasn’t that long ago that there were many kinds of mass storage. Tapes, disks, drums, punched cards, paper tape, and even stranger things. Perhaps none were quite so strange though as the IBM 2321 Data Cell drive — something IBM internally called MARS.

What is a data cell you might ask? A data cell was a mass storage device from IBM in 1964 that could store about 400 megabytes using magnetic strips that looked something like about a foot of photographic film. The strips resided inside a drum that could rotate. When you needed a record, the drum would rotate the strip you needed to the working part and an automated process would remove the strip in question, wrap it around a read/write head and then put it back when it was done.

Continue reading “Striping A Disk Drive The 1970 Way”