Howdy!
Last time I posted here I said ROM support and offline maps were "coming along". Both are done now, as well as a whole bunch of other new features. Mk5 was moved into main yesterday, as a result I wanted to do a follow-up on what changed on the ESP32 side!
For anyone new, Jcorp Nomad is an offline media server that runs entirely on an ESP32-S3 (the Waveshare 1.47" LCD board), about the size of a thumbdrive. It makes its own Wi-Fi hotspot and captive portal, then serves movies, shows, music, books, offline Wikipedia, maps and more from a microSD card to any browser nearby. Up to 8 phones, tablets or laptops at once, with no internet, no app and no account.
I started this project almost 2 years ago with a mini PC running a full Jellyfin stack for road trips with my friends, then a Pi, and I kept trying to get it smaller and smaller until I landed on the ESP32. I travel a TON, regularly ending up without internet, and my friend group uses it for movie nights every other week. I've also gotten tons of comments from people using Nomad in power outages, learning environments, and many unique situations beyond what I had designed it for, I always love hearing how people use it. It's intentionally designed to have few guardrails, opening it up to a lot of different uses and customization.
What's new:
Most of Mk5 is just stability fixes, but it also adds a bunch of "toybox" features that I have put off adding in previous updates. Maps now have full navigation support using your phone's GPS, ROMs play through EmulatorJS, and yes it runs DOOM.
Setup is a lot easier too, Nomad Flash flashes the firmware and sets up the card from Chrome or Edge, no Arduino IDE needed.
Here are some technical details from the update:
- 8 streams without running out of DMA memory. With 8 films going, internal RAM dropped under 600 bytes and card reads started failing. The Wi-Fi driver copies every frame into its own internal DMA buffer until it's sent, so now replies always leave it a reserve and films share a fixed amount of memory for what's being sent.
- Faster SD reads. The S3's SD controller can't DMA into PSRAM, so IDF was reading file replies one sector at a time with the card lock held. Nomad now reads whole aligned 8 KB chunks through one internal DMA buffer and keeps them in PSRAM.
- exFAT and files over 4 GB. The Arduino core's prebuilt filesystem library has exFAT compiled out, so Nomad runs SdFat on the SDMMC host for exFAT and FAT32 both. Cards work straight out of the package now, no reformat! (This was my most requested update for over a year)
- Offline Wikipedia on the chip. ZIM archives are served by Nomad itself now instead of the browser worker. This uses some of the precious RAM, but unlocks full support for all ZIM types. ZIM clusters are zstd, and with ZSTD_d_stableOutBuffer a ~2 MB cluster only costs its own size plus about 230 KB of decoder, all in PSRAM.
- Signed updates from the admin panel. Builds carry an ECDSA P-256 signature, and only the OTA slot that isn't running gets written. If the new build fails its self test after the restart it starts back up on the old one. USB flashing skips all of this, so your own builds flash like normal. Pulling an update from the flasher site only works in WiFi Mode, and uploading one needs the admin sign in, so it's hard to do unintentionally.
- About 5 KB back from the screen driver, which goes straight to streaming (we take what we can get).
Now the uhhh... limitations y'all have all been waiting to see:
- Nomad isn't designed for quality. Wi-Fi speed is the limit, so no 4K, Nomad is intended to run 480p, though it can handle higher quality trading off for lower total stream count.
- Internal RAM is tight. Every new feature takes memory away from streaming so it's a bit of a balancing act.
- Storage is a microSD card. It's great for space, but not long term storage. Keep a real backup of your files!! It also caps you at a max capacity of 2 TB (and with prices right now I would aim for 256 GB).
- No external drives on the S3, that's what the P4 branch is for (more on that below).
- It doesn't come with a battery, but since it's 5V any USB port should be enough to keep it going, even straight solar power usually does the trick. You can also power it off your phone like I usually do.
- It's still Arduino IDE (yea, I never made the PlatformIO jump lol). Every library is pinned to an exact version in the README, or the browser flasher skips all of that. MANY people here have insisted I make the switch but uhhh... it's comfy here!
- It's a student project, so there will be bugs. If you find one please let me know!
ESP32-P4 branch
The S3 is still the main version and it's my main focus for development. That being said, there's a P4 branch now for Waveshare's ESP32-P4-NANO and ESP32-P4-WIFI6. The NANO adds Ethernet and a USB-A port for external drives, unlocking much larger storage and generally more options. The Wi-Fi isn't any faster yet though. The P4 has no radio, both boards use a C6 for Wi-Fi, and the link between the two is the bottleneck right now. It's still pretty rough, and I haven't been able to test the WIFI6's Wi-Fi since I bricked the C6 on mine 😅. The hope is that I can find a way around the communication bottleneck to get the full speed of the C6, making streams a lot easier. In an ideal world the throughput limit would be the SD card.
Nomad Lite
Lite is out as a beta, a stripped down Nomad for most ESP32 boards with an SD attached or wired to it. It's read only, runs one loop on plain BSD sockets instead of the async library, and targets 4 MB boards with no PSRAM. It reads the same card as full Nomad, so one card works in both. I've only tested it on what I have lying around, so if you've got a C3, C5, C6 or a classic ESP32 in a drawer I'd love to know if it works. It's designed to be easy to adapt, but will take a lot more work before it's anything close to Nomad's usefulness.
Why an ESP32? (and not a Pi)
The whole idea was to go well below the usual self-hosted stack. No OS, no Docker, nothing to maintain, everything runs in the ESP32's firmware. I had trouble with normal SBCs on power, heat and stability, and with Pi prices going up it makes even less sense for this project. The biggest appeal to Nomad is the simplicity, it just runs when plugged in. The goal was something I could hand to my non-technical friends and have them be able to figure it out on their own. Eventually it also became about seeing how much I could squeeze out of a microcontroller lol.
I'm a mechanical engineering student, so software isn't really my specialty, Nomad has been how I learned to code. It's come a long way thanks to a LOT of help from y'all on past posts and the GitHub, and I'm sure there are still plenty of things I'm doing the wrong way, so any feedback is appreciated. There's no custom PCB, it's all off the shelf parts, and with Mk5 Nomad is now GPL-3.0 (Lite is MIT). If you want one of your own, building it is the way to go. Parts are cheap, it's under $40 to build, and I'd much rather people build their own. That being said I do sell prebuilts too, I won't say no to your money lol.
Now that you have gotten through my long ass post please enjoy this curated pile of links (I have many to offer):
Thanks for reading! I'll be lurking in the comments.
-Jackson