Deploy MimiClaw firmware to an ESP32-S3 board. Covers prerequisites, configuration, build, flash, verification, and troubleshooting.
End-to-end guide for deploying MimiClaw to an ESP32-S3 dev board.
# Install: https://docs.espressif.com/projects/esp-idf/en/v5.5.2/esp32s3/get-started/
# Verify:
idf.py --version # should show >= 5.5
git clone https://github.com/memovai/mimiclaw.git
cd mimiclaw
idf.py set-target esp32s3
cp main/mimi_secrets.h.example main/mimi_secrets.h
Edit main/mimi_secrets.h — fill in ALL required fields:
#define MIMI_SECRET_WIFI_SSID "YourWiFiName" // REQUIRED
#define MIMI_SECRET_WIFI_PASS "YourWiFiPassword" // REQUIRED
#define MIMI_SECRET_TG_TOKEN "123456:ABC-DEF..." // REQUIRED
#define MIMI_SECRET_API_KEY "sk-ant-api03-..." // REQUIRED
#define MIMI_SECRET_MODEL "" // optional, defaults to claude-opus-4-5
#define MIMI_SECRET_SEARCH_KEY "" // optional: Brave Search API key
#define MIMI_SECRET_PROXY_HOST "" // optional: e.g. "192.168.1.83"
#define MIMI_SECRET_PROXY_PORT "" // optional: e.g. "7897"
Proxy setup (China users):
If you need a proxy to reach Telegram/Anthropic APIs, set both PROXY_HOST and PROXY_PORT. The proxy machine must:
idf.py fullclean && idf.py build
IMPORTANT: Always fullclean after changing mimi_secrets.h — the secrets are compiled into the binary.
Expected output: Project build complete. To flash, run: idf.py flash
| Error | Fix |
|---|---|
mimi_secrets.h: No such file | Run cp main/mimi_secrets.h.example main/mimi_secrets.h |
esp_websocket_client not found | Run idf.py fullclean then idf.py build (managed component auto-downloads) |
Toolchain not found | Re-run ESP-IDF install.sh and source export.sh |
| Build runs out of memory | Close other apps, ESP-IDF build needs ~2GB RAM |
# macOS
ls /dev/cu.usb*
# Linux
ls /dev/ttyACM* /dev/ttyUSB*
Common ports:
/dev/cu.usbmodem1101 or /dev/cu.usbmodem11401/dev/ttyACM0If no port shows up:
idf.py -p PORT flash monitor
Replace PORT with your actual port. Example:
idf.py -p /dev/cu.usbmodem1101 flash monitor
The monitor shows boot logs. Look for:
I (xxx) mimi: MimiClaw - ESP32-S3 AI Agent
I (xxx) mimi: PSRAM free: ~8000000 bytes
I (xxx) wifi: WiFi connected: 192.168.x.x
I (xxx) telegram: Telegram bot token loaded
I (xxx) mimi: All services started!
Exit monitor: Ctrl+]
HelloWhat time is it? — tests the get_current_time toolSearch for latest news about ESP32 — tests web_search (if Brave key set)Connect via serial (idf.py -p PORT monitor) and use CLI commands:
mimi> config_show # see current config
mimi> wifi_set NewSSID NewPass # change WiFi
mimi> set_tg_token 123456:ABC... # change Telegram token
mimi> set_api_key sk-ant-... # change API key
mimi> set_model claude-sonnet-4-5 # change model
mimi> set_proxy 192.168.1.83 7897 # set proxy
mimi> clear_proxy # remove proxy
mimi> heap_info # check memory
mimi> restart # reboot
CLI settings are stored in NVS flash and take priority over build-time values.
After initial USB flash, future updates can be done over WiFi:
idf.py build.bin file on a local HTTP server:
cd build && python3 -m http.server 8080
http://YOUR_PC_IP:8080/mimiclaw.bin
16 MB Flash:
├── 0x009000 NVS (24 KB) — runtime config
├── 0x020000 OTA_0 (2 MB) — active firmware
├── 0x220000 OTA_1 (2 MB) — update slot
├── 0x420000 SPIFFS (12 MB) — memory, sessions, config
└── 0xFF0000 Coredump (64 KB)
| Symptom | Cause | Fix |
|---|---|---|
| No WiFi connection | Wrong SSID/password | Check mimi_secrets.h, idf.py fullclean && build && flash |
| "No bot token" | Empty TG token | Set via mimi_secrets.h or CLI set_tg_token |
| Bot doesn't respond | API key invalid | Check key at console.anthropic.com, set via CLI |
| "Markdown send failed" | Normal with Markdown mode | Non-critical, falls back to plain text |
| Proxy timeout | Proxy not reachable | Ensure same LAN, proxy allows LAN connections |
| SPIFFS mount failed | First boot or corruption | Normal on first boot (auto-formats) |
| Port busy/not found | Wrong port or cable | Try different USB port/cable, check ls /dev/cu.usb* |
| Boot loop | Firmware crash | Flash via USB again, check serial logs for crash info |