Tiny Programming Language In 25 Lines Of Code

There are certain kinds of programs that fascinate certain kinds of software hackers. Maybe you are into number crunching, chess programs, operating systems, or artificial intelligence. However, on any significant machine, most of the time those activities will require some sort of language. Sure, we all have some processor we can write hex code for in our head, but you really want at least an assembler if not something sturdier. Writing languages can be addictive, but jumping right into a big system like gcc and trying to make changes is daunting for anyone. If you want a gentle introduction, check out [mgechev’s] language that resides in 25 lines of Javascript.

The GitHub page bills it as a tiny compiler, although that is a bit misleading and even the README says it is a transpiler. Actually, the code reads a simple language, uses recursive descent parsing to build a tree, and then uses a “compiler” to convert the tree to JavaScript (which can then be executed, of course). It can also just interpret the tree and produce a numerical answer.

Continue reading “Tiny Programming Language In 25 Lines Of Code”

Reverse Engineering The TEC-06 Battery Tester

[Syonyk] read that you could solder a few wires to a TEC-06 battery capacity tester, connect it to a TTL serial adapter, and it would interface with some Windows software via a serial port. You can buy it already enabled for serial, but since he had the non-connected version, he was interested in trying it. Not only did it work, but he took the time to reverse engineer the protocol and made a detailed write up about his findings and how he attacked the problem.

Around here, we never need an excuse to reverse engineer anything. But [Synonyk] mentions that he didn’t like using Windows-only software from China. If he wants it on Linux, or if Windows compatibility breaks with a new version, or if the software has spyware in it, he wants to be able to continue using the device. Of course, he also admits — and we get it — that he just enjoys doing it, too.

Continue reading “Reverse Engineering The TEC-06 Battery Tester”

Shah Selbe: Science In The World’s Wildest Places

When we think of building research hardware, lab coats and pristine workbenches come to mind. Shah Selbe used to do something kind of like that when he was engineering satellite propulsion systems. But after putting twelve of them into space, he ditched the office gig and took his gear to some of the wildest places on earth. He’s an explorer and fellow with the National Geographic Society, and at the Hackaday Superconference he shared his experiences building research hardware that gathers data in incredibly remote places.

Shah makes a really good point about two very different trends in our world over the past several decades. While we’ve had unparalleled technological growth, we’ve also seen horrifying wildlife trends to the point that some scientists believe we’re currently in a sixth mass extinction event. But to know that for sure, and look for ways to prevent and reverse it, we need reliable data. This is a fascinating problem because the world is huge, and we simply can’t monitor everything.

Continue reading “Shah Selbe: Science In The World’s Wildest Places”

Teardown: What’s Inside A Christmas Laser Projector?

In the world of big-box retail, December 26th is a very special day. The Christmas music playing on the overhead speakers switches back to the family friendly Top 40, the store’s decorations get tossed in the compactor, and everything that’s even remotely related to the holiday is put on steep clearance. No more money to be made on the most commercialized of all holidays, so back to business as usual.

It’s in this narrow corridor of time, between the Great Holiday Unloading and the new spring products coming in, that you can find some fantastic deals on Christmas decorations. Not that long ago, this would hardly be exciting news for the readers of Hackaday. But Christmas lights and decorations have really started pushing the envelope in terms of technology: addressable RGB LED strands, Bluetooth controlled effects, and as of the last couple years, friggin’ lasers.

That’s right, you’ve seen them all over the neighborhood, probably took a few stray beams to the eye, you might even own your own. Laser projectors have been one of the most popular Christmas decorations for the last couple of years, and it’s not hard to see why. Just set the projector up in front of your house, and you’re done. No need to get on a ladder and string lights on the roof when you can just blast some directed energy up there instead.

Given how popular they are, I was surprised to see a lone Home Accents Holiday Multi-Color Light Projector on the clearance rack at Home Depot for around $14 a few days after Christmas. This was a 75% price reduction from normal MSRP, and right in that sweet impulse-buy price range. Let’s see what’s hiding inside!

Continue reading “Teardown: What’s Inside A Christmas Laser Projector?”

Seek And Exploit Security Vulnerabilities In An Infusion Pump

Infusion pumps and other medical devices are not your typical everyday, off-the-shelf embedded system. Best case scenario, you will rarely, if ever, come across one in your life. So for wide-spread exploitation, chances are that they simply seem too exotic for anyone to bother exploring their weaknesses. Yet their impact on a person’s well-being makes potential security holes tremendously more severe in case someone decides to bother one day after all.

[Scott Gayou] is one of those someones, and he didn’t shy away from spending hundreds of hours of his free time inspecting the Smiths Medical Medfusion 4000 infusion pump for any possible security vulnerabilities. Looking at different angles for his threat model, he started with the physical handling of the device’s user interface. This allowed him to enable the external communication protocols settings, which in turn opened to the device’s FTP and Telnet ports. Not to give too much away, but he manages to gain access to both the file system content and — as a result of that — to the system’s login credentials. This alone can be clearly considered a success, but for [Scott], it merely opened a door that eventually resulted in desoldering the memory chips to reverse engineer the bootloader and firmware, and ultimately executing his own code on the device.

Understanding the implications of his discoveries, [Scott] waited long enough to publish his research so the manufacturer could address and handle these security issues. So kudos to him for fighting the good fight. And just in case the thought of someone gaining control over a machine that is crucial to your vitality doesn’t scare you enough yet, go ahead and imagine that device was actually implanted in your body.

Hackaday Belgrade Call For Proposals Now Open!

Prepare yourself for the return of Hackaday Belgrade! Our premier European conference — Hackaday Belgrade — is on 26 May and we want to hear what you’ve been working on. The Call for Proposals is now open. We seek talks and workshops exploring the most interesting uses of technology and the culture that goes along with it. This includes design, prototyping, research, manufacturing, and the stories of people and progress that move hardware hacking forward.

We’ve booked Dom Omladine for the event because it was perfect for our previous Belgrade conference in 2016. The sold-out conference became a living organism of excitement when the Hackaday community from across Europe came together. A spectacular slate of speakers presented topics like designing computing clusters for use in University research programs, combining projection mapping with high powered lasers, building hardware for advertising campaigns, uncovering forgotten projector technology called Eidophor, fully embracing Open Hardware during product development, and so much more. All of this while hundreds in attendance joined forces for some of the best hardware badge hacking we’ve ever seen.

Hackaday Belgrade is the rare kind of opportunity that is worth reorganizing your life to attend. Want to guarantee yourself a ticket? They’re not available yet, but you can hack your way into the conference: submit a proposal! In addition to the adoration of the Hackaday community, accepted speakers will receive free admission. Everyone who submits a quality talk proposal will be given priority when tickets do go on sale. This event will sell out!

For updates, keep an eye on the conference page and pop into the chat on the project page by clicking “Join this project’s team”. Do you know someone who should be a speaker at this conference? Reach out to them personally, share this CFP on social media, or let us know in the comments below so we can make it happen.

Quantum Computing Hardware Teardown

Although quantum computing is still in its infancy, enough progress is being made for it to look a little more promising than other “revolutionary” technologies, like fusion power or flying cars. IBM, Intel, and Google all either operate or are producing double-digit qubit computers right now, and there are plans for even larger quantum computers in the future. With this amount of inertia, our quantum computing revolution seems almost certain.

There’s still a lot of work to be done, though, before all of our encryption is rendered moot by these new devices. Since nothing is easy (or intuitive) at the quantum level, progress has been considerably slower than it was during the transistor revolution of the previous century. These computers work because of two phenomena: superposition and entanglement. A quantum bit, or qubit, works because unlike a transistor it can exist in multiple states at once, rather than just “zero” or “one”. These states are difficult to determine because in general a qubit is built using a single atom. Adding to the complexity, quantum computers must utilize quantum entanglement too, whereby a pair of particles are linked. This is the only way for any hardware to “observe” the state of the computer without affecting any qubits themselves. In fact, the observations often don’t yet have the highest accuracy themselves.

There are some other challenges with the hardware as well. All quantum computers that exist today must be cooled to a temperature very close to absolute zero in order to take advantage of superconductivity. Whether this is because of a reduction in thermal noise, as is the case with universal quantum computers based on ion traps or other technology, or because it is possible to take advantage of other interesting characteristics of superconductivity like the D-Wave computers do, all of them must be cooled to a critical temperature. A further challenge is that even at these low temperatures, the qubits still interact with each other and their read/write devices in unpredictable ways that get more unpredictable as the number of qubits scales up.

So, once the physics and the refrigeration are sorted out, let’s take a look at how a few of the quantum computing technologies actually manipulate these quantum curiosities to come up with working, programmable computers. Continue reading “Quantum Computing Hardware Teardown”