Remoticon 2021: Uri Shaked Reverses The ESP32 WiFi

You know how when you’re working on a project, other side quests pop up left and right? You can choose to handle them briefly and summarily, or you can dive into them as projects in their own right. Well, Uri Shaked is the author of Wokwi, an online Arduino simulator that allows you to test our your code on emulated hardware. (It’s very, very cool.) Back in the day, Arduino meant AVR, and he put in some awesome effort on reverse engineering that chip in order to emulate it successfully. But then “Arduino” means so much more than just AVR these days, so Uri had to tackle the STM32 ARM chips and even the recent RP2040.

Arduino runs on the ESP32, too, so Uri put on his reverse engineering hat (literally) and took aim at that chip as well. But the ESP32 is a ton more complicated than any of these other microcontrollers, being based not only on the slightly niche Xtensa chip, but also having onboard WiFi and its associated binary firmware. Reverse engineering the ESP32’s WiFi is the side-quest that Uri embarks on, totally crushes, and documents for us in this standout Remoticon 2021 talk. Continue reading “Remoticon 2021: Uri Shaked Reverses The ESP32 WiFi”

Mike Szczys at the 2018 Hackaday Superconference

Today Is My Last Day At Hackaday; Thanks For All The Hacks!

I have decided to make a career move and have accepted a position as Developer Relations Engineer at Golioth.io. I’m happy to announce that Elliot Williams will be the next Editor in Chief of Hackaday.

Right now I’m in my 13th year at Hackaday, having started in the summer of 2009. But like all of the Hackaday writing crew, I began as a loyal reader of the site. I remember hearing about Hackaday when Kevin Rose mentioned in on an episode of the old CNET TV program The Screensavers early in 2005. Having already been building robots and just starting on 8-bit AVR microcontrollers, Hackaday was exactly the source of new and interesting projects I was looking for.

Remember when all Hackaday photos looked like this? This one is actually the first time I had a project featured on the site!

An enormous amount has changed since then. When I started as a writer we had just stopped using black and white photos. A few articles later, we removed the CSS that forced all articles to be lowercase. When I became head editor in 2013 we stopped calling it Hack a Day in favor of Hackaday, and about a year later we overhauled the site, moving from green-on-black to yellow-on black and expanding the 470 pixel content width to 800. Progress.

What hasn’t changed is how we stay fresh. Hackaday has always trusted our writers to guide us by following their own interests. The people who write for Hackaday have far better things to do, but they use their writing as a creative outlet to focus on leveling up their skills, to discover new uses of available technology, and to share that energy with the greater Hackaday community. They live all over the world and work in many different fields. These experiences come together in there collective writings. I’m lucky to have this great group of writers, and so are you. When their time has ended, the hope is that a new group of readers will step up to the plate and make sure the good times never end.

Continue reading “Today Is My Last Day At Hackaday; Thanks For All The Hacks!”

Up Close And Personal With Some Busted Avionics

When he found this broken Narco DME 890 that was headed for the trash, [Yeo Kheng Meng] did what any self-respecting hardware hacker would do: he took it back to his workbench so he could crack it open. After all, it’s not often you get to look at a piece of tech built to the exacting standards required by even outdated avionics.

DME stands for “Distance Measuring Equipment”, and as you might expect from the name, it indicates how far the aircraft is from a given target. [Yeo Kheng Meng] actually goes pretty deep into the theory behind how it works in his write-up if you’re interested in the nuts and bolts of it all, but the short version is that the pilot selects the frequency of a known station on the ground, and the distance to the target is displayed on the screen.

Inside the device, [Yeo Kheng Meng] found several densely packed boards, each isolated to minimize interference. The main PCB plays host to the Mostek MK3870 microcontroller, an 8-bit chip that screams along at 4 MHz and offers a spacious 128 bytes of RAM. It doesn’t sound like much to the modern AVR wrangler, but for 1977, it was cutting edge stuff.

Digging further, [Yeo Kheng Meng] opens up the metal cans that hold the transmitter and receiver. Thanks to the excellent documentation available for the device, which contains extensive schematics and block diagrams, he was able to ascertain the function of many of the components. Even if you’re unlikely to ever go hands on with this type of technology, it’s fascinating to see the thought and attention to detail that goes into even seemingly mundane aspects of the hardware.

Hungry for more airworthy engineering? We’ve taken a close look at some hardware pulled from a civilian airliner, as well as some battle-hardened electronics that once graced the cockpit of an AH-64 Apache attack helicopter.

DIY Forth On Arduino

On a recent rainy afternoon, [Thanassis Tsiodras] decided to build his own Forth for the Arduino to relieve the boredom. One week of intense hacking later, he called it done and released his project as MiniForth on GitHub. [Thanassis] says he was inspired by our series of Forth articles from a few years back, and his goal was to build a Forth interpreter / compiler from scratch, put it into a Blue Pill microcontroller. That accomplished, he naturally decides to squeeze it into an Arduino Uno with only 2K of RAM.

Even if you are ambivalent about the Forth language, [Thanissis]’s project has some great ideas to check out. For example, he’s a big proponent of Makefile automation for repetitive tasks, and the project’s Makefile targets implements almost every task needed for development, building and testing his code.

Some development and testing tasks are easier to perform on the host computer. To that end, [Thanassis] tests his programs locally using the simavr simulator. The code is also portable, and he can compile it locally on the host and debug it using GDB along with Valgrind and AddressSanitizer to check for memory issues. He chose to write the program in C++ using only zero-cost abstractions, but found that compiling with the ArduinoSTL was too slow and used too much memory. No problem, [Thanassis] writes his own minimalist STL and implements several memory-saving hacks. As a final test, the Makefile can also execute a test suite of Forth commands, including a FizzBuzz algorithm, to check the resulting implementation.

Here’s a short video of MiniForth in action, blinking an LED on an UNO, and the video below the break shows each of the various Makefile tasks in operation. If you want to learn more, check out Elliot Williams’s Forth series which inspired [Thanassis] and this 2017 article discussing several different Forth implementations. Have you ever built your own compiler? Let us know in the comments below.

Continue reading “DIY Forth On Arduino”

Human Google: Ruth Freitag, Isaac Asimov, And Bibliographies

You don’t often turn on a light and think, “That power company is sure on the ball!” You generally only think of them when the lights go out without warning. I think the same is true of search. You don’t use Google or DuckDuckGo or any of the other search engines and think “Wow! How awesome it is to have this much information at your fingertips.” Well. Maybe a little, but it is hard to remember just how hard it was to get at information in the pre-search-engine age.

I were thinking about this the other day when I read that Ruth Freitag had died last year. Ruth had the unglamorous but very important title of reference librarian. But she wasn’t just an ordinary librarian. She worked for the Library of Congress and was famous in certain circles, counting among her admirers Isaac Asimov and Carl Sagan.

Ruth Freitag in 1985

You might wonder why a reference librarian would have fans. Turns out, high-powered librarians do more than just find books on the shelves for you. They produced bibliographies. If you wanted to know about, say, Halley’s comet today, you’d just do a Google search. Even if you wanted to find physical books, there are plenty of places to search: Google Books, online bookstores, and so on. But in the 1970s your options were much more limited.

Turns out, Ruth had an interest and expertise in astronomy, but she also had a keen knowledge of science and technology in general. By assembling comprehensive annotated bibliographies she could point people like Asimov and Sagan to the books they needed just like we would use Google, today.

Continue reading “Human Google: Ruth Freitag, Isaac Asimov, And Bibliographies”

Arduino Nano Memory Upgrade With No Soldering

Ok, we’ll come clean. [Design Build Destroy] didn’t really add any memory to his Arduino Nano. But he did get about 1.5K more program space when compared to the stock setup. The trick? On some Nano boards and clones, the bootloader is set to use a large block of reserved memory, but Optiboot only requires a fraction of that reserved memory. By reprogramming the bootloader and changing the configuration fuses, you can reclaim that unused memory.

Of course, you can’t easily overwrite the bootloader and fuses over the serial port to prevent you from bricking your device. The video below shows how to connect another Arduino to do the programming. You could also use any dedicated AVR programmer you happen to have. Oddly, the Uno already uses Optiboot with the same processors, and is set correctly and the video shows the differences in the configuration between the two in their default state.

Of course, depending on where you get your Nano devices and their age, you may already have this set up at which point you won’t gain anything, but you should be able to easily tell if you need to go through the steps or not. The same trick will probably work with any older Arduino boards you have laying around if Optiboot supports them. What can you do with the extra memory? Maybe speech recognition?

Continue reading “Arduino Nano Memory Upgrade With No Soldering”

Custom Num Pad Does Double Duty As Macro Pad

Why buy a num pad or a macropad when you can build something new and beautiful, open source that bad boy, and be a hero to the community? We think that should be all the justification you ever need to build instead of buy, even if you think your thing is Just Another Keypad [JAnK] as [Clewsy] claims.

At first glance, JAnK appears to be a standard number pad with four macro keys across the top. But when you roll your own ‘board, all the keys are programmable. [Clewsy] took advantage of this by adding a second layer that’s accessible with (what else?) the Num Lock key. This switches JAnK over to 21-key macro pad mode.

[Clewsy] rolled their own PCB for this and used the venerable ATMega32u4 because of its HID and USB host capabilities. Every key is backlit, and these LEDs are driven by an MP3202 LED driver and PWM from the AVR. [Clewsy] was able to build a prototype by sawing the num pad off of a stainless steel key switch plate from another build, but eventually ordered JAnK its own custom, laser-cut, stainless steel plate. The lovely enclosure is made of spotted gum wood and an acrylic base.

Putting it all together proved to be a bit problematic. [Clewsy] soldered up the minimum viable components for testing and discovered that the ATMega’s VCC and GND pins were both shorted. This killed the AVR programmer, but not the chip itself, and [Clewsy] happened to have a spare. To add insult to injury, the Num Lock light didn’t work, but [Clewsy] was able to simply reverse the LED instead of ordering a new pile of boards. Check out the detailed write-up with code and tons of pictures over on [Clewsy]’s personal site.

One of the awesome things about this build is that [Clewsy] was able to re-use the code from macr0, which began life as a proof of concept for scanning key matrices, and retired to become a music and media controller.