Supercon 2024: Repurposing ESP32 Based Commercial Products

It’s easy to think of commercial products as black boxes, built with proprietary hardware that’s locked down from the factory. However, that’s not always the case. A great many companies are now turning out commercial products that rely on the very same microcontrollers that hackers and makers use on the regular, making them far more accessible for the end user to peek inside and poke around a bit.

Jim Scarletta has been doing just that with a wide variety of off-the-shelf gear. He came down to the 2024 Hackaday Superconference to tell us all about how you can repurpose ESP32-based commercial products.

Drop It Like It’s Hot

Jim starts off this talk by explaining just why the ESP32 is so popular. Long story short, it’s a powerful and highly capable microcontroller that can talk WiFi and Bluetooth out of the box and costs just a few bucks even in small quantities. That makes it the perfect platform for all kinds of modern hardware that might want to interact with smartphones, the Internet, or home networks at some point or other. It’s even got hardware accelerated cryptography built-in. It’s essentially a one-stop shop for building something connected.

Jim notes that while some commercial ESP32-based products are easy to disassemble and work with, others can be much harder to get into. He had particular trouble with some variants of a smartbulb that differed inside from what he’d expected.

You might ask why you’d want to repurpose a commercial product that has an ESP32 in it, when even fully-built devboards are relatively cheap. “It’s fun!” explains Jim. Beyond that, he notes there are other reasons, too.

You might like re-configuring a commercial product that doesn’t quite do what you want, or you might want to restore functionality to a device that has been deactivated or is no longer supported by its original manufacturer. You can even take a device with known security vulnerabilities and patch them or rebuild them with a firmware that isn’t so horridly dangerous.

It’s also a great way to reuse hardware and stop it becoming e-waste. Commercial hardware often comes with great enclosures, knobs, buttons, and screens that are far nicer than what most of us can whip up in our home labs. Repurposing a commercial product to do something else can be a really neat way to build a polished project.

While we often think of Apple’s ecosystem as a closed shop, Jim explains that you can actually get ESP32 hardware hooked up with HomeKit if you know what you’re doing.

Jim then explains how best to pursue your goal of repurposing a commercial product based on the ESP32. He suggests starting with an ESP32 devboard to learn the platform and how it works. He also recommends researching the product’s specifications so you can figure out what it’s got and how it all works.

Once you’ve got into the thing, you can start experimenting to create your hacked prototype device, but there’s one more thing he reckons you should be thinking about. It’s important to have a security plan from the beginning. If you’re building a connected device, you need to make sure you’re not putting something vulnerable on your home network that could leave you exposed.

You also need to think about physical safety. A lot of ESP32 devices run on mains power—smart bulbs, appliances, and the like. You need to know what you’re doing and observe the proper safety precautions before you go tinkering with anything that plugs into the hot wires coming out of the wall. It’s outside the scope of Jim’s talk to cover this in detail, but you’re well advised to do the reading and learn from those more experienced before you get involved with mains-powered gear.

Jim uses the Shelly as a great example of a commercial ESP32-based product. Credit: via eBay

The rest of Jim’s talk covers the practical details of working with the ESP32. He notes that it’s important to think about GPIO pin statuses at startup, and to ensure you’re not mixing up 5 V and 3.3 V signals, which is an easy way to release some of that precious Magic Smoke.

He also outlines the value of using tools like QEMU and Wokwi for emulation, in addition to having a simple devboard for development purposes. He explores a wide range of other topics that may be relevant to your hacking journey—using JTAG for debugging, working with Apple HomeKit, and even the basics of working with SSL and cryptography. And, naturally, he shows off some real ESP32-based products that you can go out and buy and start tinkering with right away!

Jim’s talk was one of the longer ones, and absolutely jam packed with information at that. No surprise given the topic is such a rich one. We’re blessed these days that companies are turning out all sorts of hackable devices using the popular ESP32 at their heart. They’re ripe for all kinds of tinkering; you just need to be willing to dive in, poke around, and do what you want with them!

4 thoughts on “Supercon 2024: Repurposing ESP32 Based Commercial Products

  1. Our company was manufacturing a Bluetooth-connected smart scale. But due to component shortages, at some point we had to either redesign all the electronics, or opt to a (Chinese) 3rd party scale that we could rebrand. It came with a whole set of bureaucracy for adding features and fixing issues. As I had to implement support for it, there were days that I was tearing my hair out because of simple things that they just wouldn’t change because it didn’t fit into their API philosophy. For instance user-management. A scale will be used by multiple people, and the scale will have profiles, and try to guess who is on the scale. But they did not want to add the possibility to read the profiles that were already on the scale, or to force the scale to use a specific profile. So all I could do was make best guesses. And if I detected something out of sync, or if the customer had complaints, all we could do was tell the customer to factory reset the scale and re-onboard everyone. But then the scale would assign new unique ids to those users, and I had to match them up with the previous ids. Long list of problems I had to solve, it doesn’t end here. ;)

    Then, at some point I opened the scale to see what’s inside. And I found out that it was built around an ESP32. And I was SO VERY tempted to just write our own firmware from scratch for it…

    I didn’t do it, I had much more pressing things to do. But the temptation was SO very strong… :D I still feel it now that I’m writing this story, which is 4 years after this all happened. ;) Maybe I should do it in my spare time, just to get rid of the temptation. ;)

  2. Go check out “Annex RDS” which is a rapid development system for all things ESP (8266 and esp32).
    Drop dead easy to flash onto the modules. It makes it very easy to create a webpage that you land on when you connect to the wifi of the ESP module. Very easy to implement buttons, graphs, I/O, displays, etc.
    The website is… https://cicciocb.com/forum/ (you may need to create a login)

Leave a Reply to DMCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.