Mini Browser (BadgeVMS / ESP-IDF)
A tiny text-mode web viewer for the WHY2025 badge, built on SDL3 + libcurl.
It renders plain ASCII text, extracts <a href> links as numbered markers like [12],
and is controlled entirely from the badge keyboard.
github.com/mactjaap/mini_browser
Features
- Simple HTML→Text renderer
- Strips
<head>, <script>, and <style>.
- Decodes &, <, >, ", ', .
- Collapses whitespace and wraps to the device width.
- Anchors become
[n] markers (up to 128 links).
- Lightweight networking
- libcurl with conservative defaults (HTTP/1.1 preferred, identity encoding).
- Redirects (up to 5), connection/overall timeouts, low-speed aborts.
- URL bar with icon
- Cyan square at the top-left with a yellow magnifying glass icon.
- Long URLs are left-clipped with an ellipsis.
- Keyboard controls
- Typing: edits the URL (ASCII only).
- Enter: navigate to URL or follow selected link.
- Backspace: delete last character.
- Scrolling: ↓/ down,
↑/ up,
- Link selection: Tab next, Shift+Tab previous.
- WHY (accelerator) combos (hold WHY then press):
- E — Edit (
https:// prefill)
- H — Home
- R — Reload
- B — Back (history)
- Q — Quit
- Special quick-jump keys:
1 → https://text.npr.org
2 → https://news.ycombinator.com/
3 → http://www.textfiles.com/
4 → https://macip.net/
5 → https://ohmeadhbh.github.io/bobcat/
6 → https://curl.se/
-
Key 1 (Red Square)
Key 2 (Orange Triangle)
Key 3 (Yellow X)
Key 4 (Green Circle)
Key 5 (Blue Club / Clover)
Key 6 (Purple Diamond)
History: in-memory back stack (32 entries). Use WHY + B.
Serial content dump: sanitized + rate-limited to avoid SDIO RX overflow.
UI Layout
- Resolution:
716 × 716
- URL bar height:
24 px
- Logo: cyan square (20×20) with a yellow magnifying glass inside.
- URL text begins to the right of the icon, with spacing to prevent overlap.
Build & Run
Designed as a BadgeVMS SDK app under ESP-IDF.
- Requires ESP-IDF 5.5, SDL3 (BadgeVMS port), libcurl, Wi-Fi connectivity.
- Cross-compiles for ESP32-C6 (RISC-V) as part of the overall firmware bundle.
- Flash and launch via your normal BadgeVMS workflow.
Defaults
- Home page:
https://minibrowser.tjaap.com
- Max page size: 16 KB
- Max links per page: 128
- History size: 32
- User-Agent: MiniBrowser/1.0; +https://github.com/mactjaap/mini_browser/
-
Notes & Limitations
- ASCII-only draw: non-ASCII characters render as
?.
- No CSS, images, or JS execution—text-mode by design.
- Some sites may require TLS/HTTP features beyond the embedded libcurl settings.
Credits
Built on SDL3 and libcurl.
Runs on the WHY2025 badge under BadgeVMS / ESP-IDF.
Logo is drawn with SDL shapes (cyan square + yellow magnifying glass).
MacIP.net (mactjaap a.t. macip.net)