Getting an ESP32 prototype to work on your desk is the fun part. You flash it over USB, watch the serial monitor, and when something breaks you press reset. Once the same board is in someone else's living room, all of that is gone. You can't see the serial monitor, you can't press reset, and the person who owns it doesn't care why it crashed.
I build Frame on my own: a frame with a 64x64 LED panel that shows photos sent from a phone. It runs on an ESP32-S3 on a board I designed, driving a HUB75 panel, and it talks to my backend over MQTT. This guide is what I learned moving it from a prototype to units that live in other people's homes. None of it is theory. Each lesson comes from something that went wrong or almost did.
Some of these topics have their own deep dive, so here I summarize and link: wiring a 64x64 HUB75 panel to an ESP32, ESP32 brownout with WiFi on a LED matrix and why a HUB75 panel flickers on camera.
The short version
- Build the update path first, with a rollback that runs on the device, before a single unit leaves your desk.
- Know which firmware every device runs. Store the version per device in your database.
- Make every boot report itself, with the reset reason and the crash dump, and keep the
.elfof every release. - Power fails before software does. If you disabled the brownout detector to get a demo working, that's a debt.
- Dev builds must never ship. Mine did once, and it ignored updates.
- Have a recovery path a customer can use, like flashing over USB from the browser.
- Fewer hardware versions. Every variant doubles your releases and your testing.
- Ask for enclosure quotes early. Replies are slow.
1. Build OTA with rollback before you ship anything
The first thing a product needs that a prototype doesn't is a way to update it without touching it. The second is a way to survive a bad update, because sooner or later you'll publish one.
Frame uses the two app partitions of the min_spiffs.csv layout (app0 and app1), so the new firmware is written to the slot that isn't running and the previous one stays intact. On top of that, the firmware does its own rollback:
- After an OTA, it marks the new version as "on trial" in NVS and restarts.
- On every boot, while the version is on trial, it adds one to a boot counter in NVS. It saves the counter first thing, before anything that could crash.
- If it boots more than three times without the version being confirmed, it switches the boot partition back to the other slot with
esp_ota_set_boot_partition()and restarts into the last good version. - If it stays up for 60 seconds, the version is good: it becomes the "last good version", the counter is cleared and it calls
esp_ota_mark_app_valid_cancel_rollback().
I tested the rollback on a real ESP32-S3 with a small sketch that copied its own image to the second slot, forced a boot loop and checked that it went back to the good one. It did.
Two things I didn't see coming:
- The protection only starts with the update after the one that installs it. The firmware already in the field doesn't have the rollback code, so the first release that brings it is not protected. Try that one on a unit you can reach before sending it to everyone.
- Where the version number lives matters. In my setup the number isn't in the firmware. The release script asks the database for the last version of that hardware and adds one, and the device stores the number it installed in NVS. The device only installs a number higher than the one it has, and the backend offers the newest upload, not the highest number. So the number in the database is the source of truth, and the release script only ever goes up. Uploading a binary by hand with a lower number after a newer one would break that, so it's written down as a rule.
2. Know what every device is running
For a long time I had no way to answer a simple question: which firmware is that frame running, and is it the old board or the new one? With a handful of units you can remember. With more, you can't.
Now every time a frame asks for updates it sends its hardware version and its current firmware version, and the backend saves both on that device's row. It costs two columns and one line in the request, and it's the first thing I look at when someone writes to me with a problem.
3. Make every boot report itself
A device in someone's home that crashes and restarts looks, from the outside, like a device that works. The person might notice the screen going dark for a second. You won't notice anything.
So on every boot Frame publishes a small message with the reset reason (esp_reset_reason()), a total boot counter, the firmware and hardware versions, the free heap and, if the previous boot ended in a panic, a summary of the core dump: the task, the program counter, the exception cause and the backtrace. The backend stores it and classifies it.
What I learned building it:
- The core dumps were already there. The
min_spiffs.csvlayout reserves a 64 KB coredump partition, and the Arduino core comes with core dumps to flash enabled. My frames had been writing crash dumps for a long time that nobody ever read. - Send every boot, decide on the server. The device doesn't filter or rate limit anything. Classification and limits live in the backend, because I can change those without an OTA. A boot loop is the most valuable signal there is, not noise.
- Keep the
.elfof every release. The backtrace arrives as raw addresses, and you need the exact.elfof that version to turn them into function names withaddr2line. My release script only uploaded the.binat first, so now the.elffiles are archived per release. - Know what your reset reasons can't tell you. On Frame's v2 board the brownout detector is disabled (more on that below), so a power dip never shows up as
BROWNOUT. It shows up as a power on or a watchdog. Read the telemetry with that in mind.
The telemetry paid for itself quickly. A release that moved the network code to the other core had a multicore bug: a LoadProhibited panic about eight minutes after boot. The boot report caught it, the archived .elf pointed to the line, and the fix went out in the next release that same day. Then the telemetry caught a second panic in the heap's spinlock: Arduino String objects were being changed from both cores at once. Every assignment to a String touches the heap, so a "simple" shared string is shared heap. The lesson: when you split work across two cores, audit every piece of shared state, not just the obvious ones like the MQTT client and the buffers.
4. Power is the first thing to fail in the field
On my desk, Frame's v2 board ran for hours without a problem. In a home with weak WiFi and heavy animation downloads, it chained kernel crashes of different kinds: an assert in the WiFi interrupt handler while the CPU was idle, LoadProhibited, a debug exception with a corrupted stack and watchdogs without a trace. I decoded the traces and none of them went through my code.
That pattern looks like memory corruption from voltage dips, and it fits with the fact that the v2 supply is so tight that the firmware disables the brownout detector on purpose. It's a strong suspicion, not a proven cause yet: the test that would close it is running the same load on a much stronger supply.
What I'll change on the next board: a 3.3 V regulator just for the ESP32, separate from the panel, more bulk capacitance next to the panel, thicker 5 V paths, the antenna away from the HUB75 ribbon, the brownout detector back on, and a voltage divider so the firmware can report the 5 V rail in its telemetry. The full story, and the fixes for any build, are in my brownout guide.
The lesson for production: test your prototype in bad conditions on purpose. Weak WiFi, a bright image, a long download, all at once. Your desk is the best case your product will ever see.
5. What the panel does before your code runs
At boot, Frame used to light a couple of white lines on the panel for a few seconds. A HUB75 panel has no memory: it shows whatever its pins say at each moment, and between reset and the moment the display driver takes over, the pins float. OE (output enable) is active low, so noise can turn the panel on.
Setting OE high and the rest of the pins low as the very first thing in setup() cut the flash from about 3.3 seconds to about 0.3 seconds, measured on the hardware. The 300 ms left are the bootloader, before any of my code runs, so software can't fix them. That's a hardware fix for the next board: a pull-up resistor on OE, so the panel starts off from the moment of reset. More on the pins in the wiring guide.
A prototype can blink at boot. A product that flashes white lines every time it's plugged in looks broken.
6. Keep the network off the display's core
Frame plays short videos at 15 frames per second and downloads the next one while the current one plays. In the first version the download stuttered the video: the MQTT client is synchronous, and while it was busy the main loop wasn't drawing. Measured, I was losing about 13 frames per second during a burst that lasted 3.4 seconds.
The fix was a network task pinned to core 0 that owns the MQTT client, while core 1 only draws and queues what it wants to send. After that, the burst went down to 38 ms and no frames were skipped during the download. The same move fixed another stutter: the NTP update ran in the main loop and blocked for a second on every attempt when the time server didn't answer.
The lesson: anything that can block (network, NTP, a slow HTTP call) doesn't belong on the core that drives the display. And as the previous section showed, moving it to the other core is where the multicore bugs start, so do it with the telemetry already in place.
7. People will film it with their phone
On a product with a screen, people take photos and videos of it. A HUB75 panel that looks perfect to the eye can show dark bands on a phone camera. On my bench, the setting that worked at every brightness was 7 bits of color with a faster clock, for about 343 Hz, and the library had a trap: its color table is chosen at compile time, so changing the color depth at runtime without the matching build flag broke the colors and made a good setting look bad.
All the numbers, and what I ruled out, are in the guide on HUB75 flicker on camera. For production the lesson is short: test with a phone, not only with your eyes.
8. Some bugs live in the hardware you test with
While I was building the update screen, a few faint white pixels kept appearing in the last columns of the panel, only when pixels in that area were lit. I ruled out brightness, total current, latch blanking, clock phase and clock speed. It was physical crosstalk in that one panel's column driver, not the firmware and not the board.
Two habits came out of it:
- Confirm a strange visual bug on a second panel before you spend more time on the firmware.
- Photograph the back of your panel. The factory label and the driver chip (on mine, a Chipone ICN2037BP) are what lets a supplier identify the exact model when you ask for a quote. A "64x64 HUB75 panel" isn't specific enough to get the same one twice.
9. The screen is your only interface, so design it
A product without a serial monitor speaks through its screen. Two small things I changed:
- Boot messages for people, not for me. "Open the app", "Almost ready", "Updating". The pixel font I use has no accents, so they're plain ASCII and in English.
- No flicker on the update screen. The OTA screen fills the logo with white as the percentage goes up. Drawing the background and then the text on top flickered on every update, so everything is composed in a single pass, pixel by pixel, using a 1 bit canvas as a mask for the text. I built a firmware environment that only animates that screen from 0 to 100 % without WiFi, so I could test it on the panel without running a real update.
10. Dev builds must never leave your house
This one is very recent. Frame's firmware has a development build with a DEV_MODE flag. It's useful on the desk: it skips the update check at boot and ignores the remote "update now" command, so a release never overwrites the firmware I'm testing. It also draws a small "Dev" in the top left corner of the screen.
In late November one of the beta units I shipped went out with that build. Everything worked, except the one thing that would have fixed it: a dev build never updates itself. The "Dev" marker was there, visible on the screen, and nothing in my shipping process checked for it.
The lessons:
- A visible marker is necessary but not enough. Something in the shipping process has to check it: look at the screen, or check that the unit reports a release version to the backend, before it goes in the box.
- A dev build that ignores OTA can only be fixed by hand. Think about what your development shortcuts do once a unit is out of your reach.
11. Have a recovery path that a customer can use
The way out of that dev build, and the safety net for anything else, is flashing over USB. On my desk that's PlatformIO. For a customer, it's a page: I built an install page on the Frame website with ESP Web Tools, so anyone with Chrome or Edge on a computer and a USB cable can reinstall the latest v2 firmware from the browser.
The details that mattered:
- Don't erase the whole flash by default. ESP Web Tools can wipe everything, which would delete the WiFi settings and the registration. The page leaves the erase checkbox unchecked, so only the firmware is replaced.
- Flash
boot_app0too. A frame that has received an OTA boots from the second app slot, and that choice is stored in the otadata partition. If you only write the firmware at 0x10000, it lands in the first slot and the frame keeps booting the old one. I ran into it flashing with PlatformIO: the fix was erasing the otadata region (esptool.py --chip esp32s3 erase_region 0xe000 0x2000, which leaves NVS, WiFi and photos alone). The install page writesboot_app0.binat 0xe000, which resets the selector in the same step. - Validate what you serve. The page only serves v2 releases, and checks each part before sending it: the ESP image header, the chip ID and the partition table.
12. Cut hardware versions
Frame has had two boards. The first one (v1) used a classic ESP32 without PSRAM; the second one (v2) uses an ESP32-S3. The only v1 unit I had data from couldn't finish a single animation download without resending frames: 65.6 % of frames resent and 15.3 seconds per download, over 23 downloads, while v2 units on decent WiFi resent none. That's a sample of one unit, so it doesn't prove the design is at fault, but it was another sign.
Every release meant two builds, two binaries and two sets of tests, and every feature needed a fallback for the board without PSRAM. In November I decided v1 is discontinued: it doesn't get updates anymore, and releases are only for v2. For a small product, each hardware variant you keep alive is a second product.
13. Ask for enclosure quotes early
A 3D printed case is fine for a prototype. For production you're looking at injection molding, and the quoting process is slower than any firmware bug. I asked several injection molders in Spain and one overseas rapid manufacturing service. One of the references I got was about $3,720 for the mold and $1.26 per part at 500 units. Many didn't answer at all, and the ones that did often took a long time.
The mold is a fixed cost you pay before selling a single unit, and the per part price drops with volume, so the quotes shape how many units you need to sell for the numbers to work. Start asking long before you need the parts.
A checklist before the first unit leaves your desk
- OTA works, and a bad version rolls itself back. Tested on real hardware.
- The backend knows the firmware and hardware version of every device.
- Every boot reports its reset reason, and crashes send a core dump summary.
- The
.elfof every release is archived. - The prototype has run in bad conditions: weak WiFi, bright images, long downloads.
- The brownout detector is on, or you know exactly why it isn't.
- The panel doesn't flash at boot.
- Nothing that blocks runs on the display's core.
- It looks fine on a phone camera.
- No dev build goes in a box, and something checks it.
- A customer can reflash it without your help, and without losing their settings.
- One hardware version, if you can.
- Enclosure quotes requested months before you need them.
Frame

If you'd rather have a 64x64 panel at home that lights up with photos from the people you love, without wiring anything or debugging a power rail, that's what I'm building. Frame is a small frame with a 64x64 LED grid. Your partner, your parents or your friends open the free Frame app on their phone (iPhone and Android), take or choose a photo, and it shows up on your Frame as pixel art, wherever they are. There's no subscription. I'm building it on my own, and you can read the whole story here.
You can't buy it yet. Frame launches on Kickstarter on February 1, 2027, so it's not a gift for this Christmas. Reserving a Founders spot costs 1 € and gets it for 75 € ($85 in the US and Canada).
If that sounds like you, leave your email below. People on the list get the link on launch day, and whoever reserves gets it for 75 € ($85). And if you're building your own, my guides on wiring a 64x64 HUB75 panel, ESP32 brownout with WiFi and HUB75 flicker on camera go deeper into the hardware.
Best,
Álvaro M.



