Skip to content
AAAAAAAAA9aPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

XIAO ESP32S3 Sense — Remote Gateway

Microgate is build around Tailscale VPN that puts the device on your private network from anywhere — then camera, microphone, Wake-on-LAN, and network scanning are just HTTP endpoints.

Hardware

  • Seeed Studio XIAO ESP32S3 Sense (ESP32-S3, 8MB PSRAM, 8MB Flash)
  • Built-in OV2640 camera, PDM microphone, SD card slot
  • USB-C for power + initial flash

Features

All endpoints accessible over Tailscale from anywhere in the world.

Port Endpoint Description
80 / MicroLink config UI (WiFi, Tailscale settings)
8080 GET / Main dashboard UI
8080 GET /status Device status (heap, uptime, temp, version)
8080 POST /ota Upload firmware binary (OTA with auto-rollback)
8080 GET /ota/status Partition info + app version
8080 GET /capture Single JPEG snapshot
8080 GET /camera/{on,off,status} Camera power management (auto-off idle watchdog)
8080 GET /audio/test Microphone diagnostics (JSON)
8080 GET /wol?mac=AA:BB:CC:DD:EE:FF Wake-on-LAN magic packet
8080 GET /network ARP scan of local subnet
8082 GET /stream MJPEG camera stream (3 fps)
8084 GET /audio Live WAV audio stream (16kHz mono)

Prerequisites

Setup

# Clone with submodules
git clone --recursive https://github.com/YOUR_USERNAME/xiao-remote-gateway.git
cd xiao-remote-gateway

# If you forgot --recursive
git submodule update --init --recursive

# Configure credentials
cp sdkconfig.credentials.example sdkconfig.credentials
# Edit sdkconfig.credentials with your WiFi + Tailscale auth key

# Build
source ~/esp/esp-idf/export.sh   # Linux/macOS
# or use ESP-IDF Command Prompt on Windows

idf.py set-target esp32s3
idf.py build

# Flash (first time — must erase for new partition table)
idf.py -p COMx erase-flash
idf.py -p COMx flash monitor

OTA Updates

Once the device is on Tailscale, you never need USB again:

idf.py build
curl -X POST --data-binary @build/xiao_remote_gateway.bin http://TAILSCALE_IP:8080/ota

If new firmware crashes before confirming, the bootloader automatically rolls back to the previous working version.

Architecture

Your PC/Phone (anywhere)
    │ Tailscale (WireGuard tunnel, NAT traversal via DERP/STUN)
    │
XIAO ESP32S3 Sense (deployed at remote location)
    ├── MicroLink v2 (Tailscale client) — port 80 config UI
    ├── Main httpd — port 8080
    │   ├── /, /status          (dashboard UI, device stats)
    │   ├── /ota, /ota/status   (firmware updates)
    │   ├── /capture, /camera/* (camera snapshot, power control)
    │   ├── /audio/test         (mic diagnostics)
    │   ├── /wol                (Wake-on-LAN)
    │   └── /network            (ARP scanner)
    ├── Stream httpd — port 8082
    │   └── /stream             (MJPEG camera)
    └── Audio httpd — port 8084
        └── /audio              (WAV mic stream)

Project Structure

├── CMakeLists.txt              Root build config
├── partitions_ota.csv          Dual OTA partition table (8MB flash)
├── sdkconfig.defaults          Build configuration
├── sdkconfig.credentials       Your secrets (gitignored)
├── sdkconfig.credentials.example
├── components/
│   └── microlink-repo/         MicroLink (git submodule)
└── main/
    ├── CMakeLists.txt          Component registration
    ├── Kconfig.projbuild       Menuconfig entries
    ├── idf_component.yml       ESP32-camera dependency
    ├── main.c                  App entry, WiFi, MicroLink init
    ├── app_httpd.c/h           Shared HTTP server (port 8080)
    ├── ota_server.c/h          OTA firmware update
    ├── camera_stream.c/h       MJPEG stream + snapshot
    ├── audio_stream.c/h        PDM mic → WAV stream
    ├── wol_server.c/h          Wake-on-LAN
    └── arp_scanner.c/h         ARP network scanner

Dependencies

  • MicroLink v2 — Tailscale client for ESP32
  • esp32-camera — Camera driver (auto-fetched by ESP-IDF component manager)

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages